diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-06-19 20:49:04 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-06-19 20:49:49 +0200 |
commit | 31b7f02a29cdf4f1c30cfc37962f43f67380b9ad (patch) | |
tree | 1c0de1bac35046915575687e8d8993643d372474 /scene/register_scene_types.cpp | |
parent | cb9d02a8d1b5bb71abcec6be0e75002c5ea656c4 (diff) | |
download | redot-engine-31b7f02a29cdf4f1c30cfc37962f43f67380b9ad.tar.gz |
Remove ToolButton in favor of Button
ToolButton has no redeeming differences with Button;
it's just a Button with the Flat property enabled by default.
Removing it avoids some confusion when creating GUIs.
Existing ToolButtons will be converted to Buttons, but the Flat
property won't be enabled automatically.
This closes https://github.com/godotengine/godot-proposals/issues/1081.
Diffstat (limited to 'scene/register_scene_types.cpp')
-rw-r--r-- | scene/register_scene_types.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index ad8a43743a..54112ef2bd 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -117,7 +117,6 @@ #include "scene/gui/texture_button.h" #include "scene/gui/texture_progress.h" #include "scene/gui/texture_rect.h" -#include "scene/gui/tool_button.h" #include "scene/gui/tree.h" #include "scene/gui/video_player.h" #include "scene/main/canvas_item.h" @@ -306,7 +305,6 @@ void register_scene_types() { ClassDB::register_class<MenuButton>(); ClassDB::register_class<CheckBox>(); ClassDB::register_class<CheckButton>(); - ClassDB::register_class<ToolButton>(); ClassDB::register_class<LinkButton>(); ClassDB::register_class<Panel>(); ClassDB::register_virtual_class<Range>(); @@ -767,6 +765,7 @@ void register_scene_types() { #ifndef DISABLE_DEPRECATED // Dropped in 4.0, near approximation. ClassDB::add_compatibility_class("AnimationTreePlayer", "AnimationTree"); + ClassDB::add_compatibility_class("ToolButton", "Button"); // Renamed in 4.0. // Keep alphabetical ordering to easily locate classes and avoid duplicates. |