You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
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.
This commit is contained in:
@@ -1502,24 +1502,29 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
|
||||
HBoxContainer *hb = memnew(HBoxContainer);
|
||||
add_child(hb);
|
||||
|
||||
play_bw_from = memnew(ToolButton);
|
||||
play_bw_from = memnew(Button);
|
||||
play_bw_from->set_flat(true);
|
||||
play_bw_from->set_tooltip(TTR("Play selected animation backwards from current pos. (A)"));
|
||||
hb->add_child(play_bw_from);
|
||||
|
||||
play_bw = memnew(ToolButton);
|
||||
play_bw = memnew(Button);
|
||||
play_bw->set_flat(true);
|
||||
play_bw->set_tooltip(TTR("Play selected animation backwards from end. (Shift+A)"));
|
||||
hb->add_child(play_bw);
|
||||
|
||||
stop = memnew(ToolButton);
|
||||
stop = memnew(Button);
|
||||
stop->set_flat(true);
|
||||
stop->set_toggle_mode(true);
|
||||
hb->add_child(stop);
|
||||
stop->set_tooltip(TTR("Stop animation playback. (S)"));
|
||||
|
||||
play = memnew(ToolButton);
|
||||
play = memnew(Button);
|
||||
play->set_flat(true);
|
||||
play->set_tooltip(TTR("Play selected animation from start. (Shift+D)"));
|
||||
hb->add_child(play);
|
||||
|
||||
play_from = memnew(ToolButton);
|
||||
play_from = memnew(Button);
|
||||
play_from->set_flat(true);
|
||||
play_from->set_tooltip(TTR("Play selected animation from current pos. (D)"));
|
||||
hb->add_child(play_from);
|
||||
|
||||
@@ -1571,7 +1576,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
|
||||
animation->set_tooltip(TTR("Display list of animations in player."));
|
||||
animation->set_clip_text(true);
|
||||
|
||||
autoplay = memnew(ToolButton);
|
||||
autoplay = memnew(Button);
|
||||
autoplay->set_flat(true);
|
||||
hb->add_child(autoplay);
|
||||
autoplay->set_tooltip(TTR("Autoplay on Load"));
|
||||
|
||||
@@ -1583,7 +1589,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
|
||||
|
||||
hb->add_child(memnew(VSeparator));
|
||||
|
||||
onion_toggle = memnew(ToolButton);
|
||||
onion_toggle = memnew(Button);
|
||||
onion_toggle->set_flat(true);
|
||||
onion_toggle->set_toggle_mode(true);
|
||||
onion_toggle->set_tooltip(TTR("Enable Onion Skinning"));
|
||||
onion_toggle->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu), varray(ONION_SKINNING_ENABLE));
|
||||
@@ -1608,7 +1615,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
|
||||
|
||||
hb->add_child(memnew(VSeparator));
|
||||
|
||||
pin = memnew(ToolButton);
|
||||
pin = memnew(Button);
|
||||
pin->set_flat(true);
|
||||
pin->set_toggle_mode(true);
|
||||
pin->set_tooltip(TTR("Pin AnimationPlayer"));
|
||||
hb->add_child(pin);
|
||||
|
||||
Reference in New Issue
Block a user