diff options
Diffstat (limited to 'scene/2d/y_sort.cpp')
-rw-r--r-- | scene/2d/y_sort.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/scene/2d/y_sort.cpp b/scene/2d/y_sort.cpp index cb9a494e87..760139287c 100644 --- a/scene/2d/y_sort.cpp +++ b/scene/2d/y_sort.cpp @@ -28,12 +28,10 @@ /*************************************************************************/ #include "y_sort.h" - - void YSort::set_sort_enabled(bool p_enabled) { - sort_enabled=p_enabled; - VS::get_singleton()->canvas_item_set_sort_children_by_y(get_canvas_item(),sort_enabled); + sort_enabled = p_enabled; + VS::get_singleton()->canvas_item_set_sort_children_by_y(get_canvas_item(), sort_enabled); } bool YSort::is_sort_enabled() const { @@ -43,16 +41,15 @@ bool YSort::is_sort_enabled() const { void YSort::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_sort_enabled","enabled"),&YSort::set_sort_enabled); - ClassDB::bind_method(D_METHOD("is_sort_enabled"),&YSort::is_sort_enabled); + ClassDB::bind_method(D_METHOD("set_sort_enabled", "enabled"), &YSort::set_sort_enabled); + ClassDB::bind_method(D_METHOD("is_sort_enabled"), &YSort::is_sort_enabled); - ADD_GROUP("Sort","sort_"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL,"sort_enabled"),"set_sort_enabled","is_sort_enabled"); + ADD_GROUP("Sort", "sort_"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sort_enabled"), "set_sort_enabled", "is_sort_enabled"); } - YSort::YSort() { - sort_enabled=true; - VS::get_singleton()->canvas_item_set_sort_children_by_y(get_canvas_item(),true); + sort_enabled = true; + VS::get_singleton()->canvas_item_set_sort_children_by_y(get_canvas_item(), true); } |