diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-31 19:16:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-31 19:16:07 +0200 |
commit | 4722593448b93e34d84a55010c10770c2d12e223 (patch) | |
tree | 7cd8cd47f5baa5da476febe39db775749ad15252 /scene/gui/patch_9_rect.cpp | |
parent | 849d2e346204559f35f8f430b1c13c03d579a36e (diff) | |
parent | 2aa735757a31d4ae02ed72f76dedc98a851c3f7d (diff) |
Merge pull request #10816 from toger5/style_box_texture_set_fill
unified draw_center naming for (9patch,StyleBoxes)
Diffstat (limited to 'scene/gui/patch_9_rect.cpp')
-rw-r--r-- | scene/gui/patch_9_rect.cpp | 10 |
1 files changed, 5 insertions, 5 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; } |