added shortcuts/hotkeys for tileset editor plugin collision buttons, with suggested changes.

(cherry picked from commit cf582262c2)
This commit is contained in:
GryphonClaw 2020-11-18 19:54:27 -08:00 committed by Rémi Verschelde
parent 9df6edc7d7
commit 27eaf357fc
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 0 deletions

View File

@ -517,6 +517,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tools[SHAPE_NEW_RECTANGLE]->set_button_group(tg);
tools[SHAPE_NEW_RECTANGLE]->set_tooltip(TTR("Create a new rectangle."));
tools[SHAPE_NEW_RECTANGLE]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_NEW_RECTANGLE));
tools[SHAPE_NEW_RECTANGLE]->set_shortcut(ED_SHORTCUT("tileset_editor/shape_new_rectangle", TTR("New Rectangle"), KEY_MASK_SHIFT | KEY_R));
tools[SHAPE_NEW_POLYGON] = memnew(ToolButton);
toolbar->add_child(tools[SHAPE_NEW_POLYGON]);
@ -524,6 +525,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tools[SHAPE_NEW_POLYGON]->set_button_group(tg);
tools[SHAPE_NEW_POLYGON]->set_tooltip(TTR("Create a new polygon."));
tools[SHAPE_NEW_POLYGON]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_NEW_POLYGON));
tools[SHAPE_NEW_POLYGON]->set_shortcut(ED_SHORTCUT("tileset_editor/shape_new_polygon", TTR("New Polygon"), KEY_MASK_SHIFT | KEY_P));
separator_shape_toggle = memnew(VSeparator);
toolbar->add_child(separator_shape_toggle);
@ -535,6 +537,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
toolbar->add_child(separator_delete);
tools[SHAPE_DELETE] = memnew(ToolButton);
tools[SHAPE_DELETE]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_DELETE));
tools[SHAPE_DELETE]->set_shortcut(ED_SHORTCUT("tileset_editor/shape_delete", TTR("Delete Selected Shape"), KEY_MASK_SHIFT | KEY_BACKSPACE));
toolbar->add_child(tools[SHAPE_DELETE]);
spin_priority = memnew(SpinBox);