Merge pull request #42904 from Xrayez/rects-rename-fixup
Fixup `ColorRect` and `TextureRect` renames
This commit is contained in:
commit
17f682226d
|
@ -44,8 +44,8 @@ void AudioStreamEditor::_notification(int p_what) {
|
||||||
if (p_what == NOTIFICATION_THEME_CHANGED || p_what == NOTIFICATION_ENTER_TREE) {
|
if (p_what == NOTIFICATION_THEME_CHANGED || p_what == NOTIFICATION_ENTER_TREE) {
|
||||||
_play_button->set_icon(get_theme_icon("MainPlay", "EditorIcons"));
|
_play_button->set_icon(get_theme_icon("MainPlay", "EditorIcons"));
|
||||||
_stop_button->set_icon(get_theme_icon("Stop", "EditorIcons"));
|
_stop_button->set_icon(get_theme_icon("Stop", "EditorIcons"));
|
||||||
_preview->set_frame_color(get_theme_color("dark_color_2", "Editor"));
|
_preview->set_color(get_theme_color("dark_color_2", "Editor"));
|
||||||
set_frame_color(get_theme_color("dark_color_1", "Editor"));
|
set_color(get_theme_color("dark_color_1", "Editor"));
|
||||||
|
|
||||||
_indicator->update();
|
_indicator->update();
|
||||||
_preview->update();
|
_preview->update();
|
||||||
|
|
|
@ -30,12 +30,12 @@
|
||||||
|
|
||||||
#include "color_rect.h"
|
#include "color_rect.h"
|
||||||
|
|
||||||
void ColorRect::set_frame_color(const Color &p_color) {
|
void ColorRect::set_color(const Color &p_color) {
|
||||||
color = p_color;
|
color = p_color;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
Color ColorRect::get_frame_color() const {
|
Color ColorRect::get_color() const {
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,12 +46,8 @@ void ColorRect::_notification(int p_what) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorRect::_bind_methods() {
|
void ColorRect::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("set_frame_color", "color"), &ColorRect::set_frame_color);
|
ClassDB::bind_method(D_METHOD("set_color", "color"), &ColorRect::set_color);
|
||||||
ClassDB::bind_method(D_METHOD("get_frame_color"), &ColorRect::get_frame_color);
|
ClassDB::bind_method(D_METHOD("get_color"), &ColorRect::get_color);
|
||||||
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_frame_color", "get_frame_color");
|
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
|
||||||
}
|
|
||||||
|
|
||||||
ColorRect::ColorRect() {
|
|
||||||
color = Color(1, 1, 1);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,17 +36,15 @@
|
||||||
class ColorRect : public Control {
|
class ColorRect : public Control {
|
||||||
GDCLASS(ColorRect, Control);
|
GDCLASS(ColorRect, Control);
|
||||||
|
|
||||||
Color color;
|
Color color = Color(1, 1, 1);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void set_frame_color(const Color &p_color);
|
void set_color(const Color &p_color);
|
||||||
Color get_frame_color() const;
|
Color get_color() const;
|
||||||
|
|
||||||
ColorRect();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COLOR_RECT_H
|
#endif // COLOR_RECT_H
|
||||||
|
|
|
@ -79,4 +79,5 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
VARIANT_ENUM_CAST(NinePatchRect::AxisStretchMode)
|
VARIANT_ENUM_CAST(NinePatchRect::AxisStretchMode)
|
||||||
|
|
||||||
#endif // NINE_PATCH_RECT_H
|
#endif // NINE_PATCH_RECT_H
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#ifndef TEXTURE_FRAME_H
|
#ifndef TEXTURE_RECT_H
|
||||||
#define TEXTURE_FRAME_H
|
#define TEXTURE_RECT_H
|
||||||
|
|
||||||
#include "scene/gui/control.h"
|
#include "scene/gui/control.h"
|
||||||
|
|
||||||
|
@ -83,4 +83,5 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
VARIANT_ENUM_CAST(TextureRect::StretchMode);
|
VARIANT_ENUM_CAST(TextureRect::StretchMode);
|
||||||
#endif // TEXTURE_FRAME_H
|
|
||||||
|
#endif // TEXTURE_RECT_H
|
||||||
|
|
Loading…
Reference in New Issue