|
@@ -30,12 +30,12 @@
|
|
|
|
|
|
#include "color_rect.h"
|
|
|
|
|
|
-void ColorRect::set_frame_color(const Color &p_color) {
|
|
|
+void ColorRect::set_color(const Color &p_color) {
|
|
|
color = p_color;
|
|
|
update();
|
|
|
}
|
|
|
|
|
|
-Color ColorRect::get_frame_color() const {
|
|
|
+Color ColorRect::get_color() const {
|
|
|
return color;
|
|
|
}
|
|
|
|
|
@@ -46,12 +46,8 @@ void ColorRect::_notification(int p_what) {
|
|
|
}
|
|
|
|
|
|
void ColorRect::_bind_methods() {
|
|
|
- ClassDB::bind_method(D_METHOD("set_frame_color", "color"), &ColorRect::set_frame_color);
|
|
|
- ClassDB::bind_method(D_METHOD("get_frame_color"), &ColorRect::get_frame_color);
|
|
|
+ ClassDB::bind_method(D_METHOD("set_color", "color"), &ColorRect::set_color);
|
|
|
+ ClassDB::bind_method(D_METHOD("get_color"), &ColorRect::get_color);
|
|
|
|
|
|
- ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_frame_color", "get_frame_color");
|
|
|
-}
|
|
|
-
|
|
|
-ColorRect::ColorRect() {
|
|
|
- color = Color(1, 1, 1);
|
|
|
+ ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
|
|
|
}
|