aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/animation_player_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2016-06-19 12:50:35 +0200
committerGitHub2016-06-19 12:50:35 +0200
commitf70aa176e5b84c3029078ceb4941fd6234ff7680 (patch)
tree589bfdab0715ac138ceba1b685b2a897d438df59 /tools/editor/plugins/animation_player_editor_plugin.cpp
parent8f2115529ec861d3d4184091dabbd063e5684983 (diff)
parent5524bcd2b5dd798c2ef054e5c475d2d3e4845d51 (diff)
downloadgodot-f70aa176e5b84c3029078ceb4941fd6234ff7680.tar.gz
godot-f70aa176e5b84c3029078ceb4941fd6234ff7680.tar.zst
godot-f70aa176e5b84c3029078ceb4941fd6234ff7680.zip
Merge pull request #5166 from djrm/shortcuts
Added customizable shortcuts for tile map editor
Diffstat (limited to 'tools/editor/plugins/animation_player_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp
index 1455d2fc2..10c7bf79a 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_player_editor_plugin.cpp
@@ -1356,19 +1356,23 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
add_anim = memnew( ToolButton );
+ ED_SHORTCUT("animation_player_editor/add_animation", TTR("Create new animation in player."));
+ add_anim->set_shortcut(ED_GET_SHORTCUT("animation_player_editor/add_animation"));
add_anim->set_tooltip(TTR("Create new animation in player."));
hb->add_child(add_anim);
load_anim = memnew( ToolButton );
+ ED_SHORTCUT("animation_player_editor/load_from_disk", TTR("Load animation from disk."));
+ add_anim->set_shortcut(ED_GET_SHORTCUT("animation_player_editor/load_from_disk"));
load_anim->set_tooltip(TTR("Load an animation from disk."));
hb->add_child(load_anim);
save_anim = memnew(MenuButton);
save_anim->set_tooltip(TTR("Save the current animation"));
- save_anim->get_popup()->add_item(TTR("Save"), ANIM_SAVE);
- save_anim->get_popup()->add_item(TTR("Save As.."), ANIM_SAVE_AS);
+ save_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/save", TTR("Save")), ANIM_SAVE);
+ save_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/save_as", TTR("Save As")), ANIM_SAVE_AS);
save_anim->set_focus_mode(Control::FOCUS_NONE);
hb->add_child(save_anim);
@@ -1378,15 +1382,21 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
duplicate_anim = memnew( ToolButton );
hb->add_child(duplicate_anim);
+ ED_SHORTCUT("animation_player_editor/duplicate_animation", TTR("Duplicate Animation"));
+ duplicate_anim->set_shortcut(ED_GET_SHORTCUT("animation_player_editor/duplicate_animation"));
duplicate_anim->set_tooltip(TTR("Duplicate Animation"));
rename_anim = memnew( ToolButton );
hb->add_child(rename_anim);
+ ED_SHORTCUT("animation_player_editor/rename_animation", TTR("Rename Animation"));
+ rename_anim->set_shortcut(ED_GET_SHORTCUT("animation_player_editor/rename_animation"));
rename_anim->set_tooltip(TTR("Rename Animation"));
remove_anim = memnew( ToolButton );
hb->add_child(remove_anim);
+ ED_SHORTCUT("animation_player_editor/remove_animation", TTR("Remove Animation"));
+ remove_anim->set_shortcut(ED_GET_SHORTCUT("animation_player_editor/remove_animation"));
remove_anim->set_tooltip(TTR("Remove Animation"));
@@ -1408,8 +1418,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
tool_anim = memnew( MenuButton);
//tool_anim->set_flat(false);
tool_anim->set_tooltip(TTR("Animation Tools"));
- tool_anim->get_popup()->add_item(TTR("Copy Animation"),TOOL_COPY_ANIM);
- tool_anim->get_popup()->add_item(TTR("Paste Animation"),TOOL_PASTE_ANIM);
+ tool_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/copy_animation", TTR("Copy Animation")),TOOL_COPY_ANIM);
+ tool_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/paste_animation", TTR("Paste Animation")),TOOL_PASTE_ANIM);
//tool_anim->get_popup()->add_separator();
//tool_anim->get_popup()->add_item("Edit Anim Resource",TOOL_PASTE_ANIM);
hb->add_child(tool_anim);
@@ -1493,8 +1503,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
animation->connect("item_selected", this,"_animation_selected",Vector<Variant>(),true);
resource_edit_anim->connect("pressed", this,"_animation_resource_edit");
file->connect("file_selected", this,"_dialog_action");
- frame->connect("value_changed", this, "_seek_value_changed",Vector<Variant>(),true);
- scale->connect("text_entered", this, "_scale_changed",Vector<Variant>(),true);
+ frame->connect("value_changed", this, "_seek_value_changed",Vector<Variant>(),true);
+ scale->connect("text_entered", this, "_scale_changed",Vector<Variant>(),true);