diff options
author | toger5 <toger5@hotmail.de> | 2017-08-31 15:11:10 +0200 |
---|---|---|
committer | toger5 <toger5@hotmail.de> | 2017-08-31 15:25:24 +0200 |
commit | 2aa735757a31d4ae02ed72f76dedc98a851c3f7d (patch) | |
tree | 827630418b2e5ba855f4a18da760aa26d4270a38 /scene/gui | |
parent | 41e1bbd30c1e6db57e3fbbc037f6ce4645e20fb9 (diff) |
unified draw_center naming for (9patch,StyleBoxes)
- filled -> draw_center
- is_draw_center -> is_draw_center_enabled
- get_draw_center -> is_draw_center_enabled
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/patch_9_rect.cpp | 10 | ||||
-rw-r--r-- | scene/gui/patch_9_rect.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/scene/gui/patch_9_rect.cpp b/scene/gui/patch_9_rect.cpp index 6b2deeb209..92c34dd3f9 100644 --- a/scene/gui/patch_9_rect.cpp +++ b/scene/gui/patch_9_rect.cpp @@ -61,7 +61,7 @@ void NinePatchRect::_bind_methods() { ClassDB::bind_method(D_METHOD("set_region_rect", "rect"), &NinePatchRect::set_region_rect); ClassDB::bind_method(D_METHOD("get_region_rect"), &NinePatchRect::get_region_rect); ClassDB::bind_method(D_METHOD("set_draw_center", "draw_center"), &NinePatchRect::set_draw_center); - ClassDB::bind_method(D_METHOD("get_draw_center"), &NinePatchRect::get_draw_center); + ClassDB::bind_method(D_METHOD("is_draw_center_enabled"), &NinePatchRect::is_draw_center_enabled); ClassDB::bind_method(D_METHOD("set_h_axis_stretch_mode", "mode"), &NinePatchRect::set_h_axis_stretch_mode); ClassDB::bind_method(D_METHOD("get_h_axis_stretch_mode"), &NinePatchRect::get_h_axis_stretch_mode); ClassDB::bind_method(D_METHOD("set_v_axis_stretch_mode", "mode"), &NinePatchRect::set_v_axis_stretch_mode); @@ -70,7 +70,7 @@ void NinePatchRect::_bind_methods() { ADD_SIGNAL(MethodInfo("texture_changed")); ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture"); - ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "draw_center"), "set_draw_center", "get_draw_center"); + ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "draw_center"), "set_draw_center", "is_draw_center_enabled"); ADD_PROPERTYNZ(PropertyInfo(Variant::RECT2, "region_rect"), "set_region_rect", "get_region_rect"); ADD_GROUP("Patch Margin", "patch_margin_"); @@ -151,13 +151,13 @@ Rect2 NinePatchRect::get_region_rect() const { return region_rect; } -void NinePatchRect::set_draw_center(bool p_draw) { +void NinePatchRect::set_draw_center(bool p_enabled) { - draw_center = p_draw; + draw_center = p_enabled; update(); } -bool NinePatchRect::get_draw_center() const { +bool NinePatchRect::is_draw_center_enabled() const { return draw_center; } diff --git a/scene/gui/patch_9_rect.h b/scene/gui/patch_9_rect.h index 4cf93e4c05..808b7a1f5d 100644 --- a/scene/gui/patch_9_rect.h +++ b/scene/gui/patch_9_rect.h @@ -67,8 +67,8 @@ public: void set_region_rect(const Rect2 &p_region_rect); Rect2 get_region_rect() const; - void set_draw_center(bool p_draw); - bool get_draw_center() const; + void set_draw_center(bool p_enabled); + bool is_draw_center_enabled() const; void set_h_axis_stretch_mode(AxisStretchMode p_mode); AxisStretchMode get_h_axis_stretch_mode() const; |