summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/input_map_editor.cpp54
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp3
-rw-r--r--editor/project_manager.cpp4
5 files changed, 35 insertions, 30 deletions
diff --git a/editor/input_map_editor.cpp b/editor/input_map_editor.cpp
index c67e16d371..5b6d850096 100644
--- a/editor/input_map_editor.cpp
+++ b/editor/input_map_editor.cpp
@@ -35,37 +35,37 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
-static const char *_button_descriptions[JOY_SDL_BUTTONS] = {
- TTRC("Face Bottom, DualShock Cross, Xbox A, Nintendo B"),
- TTRC("Face Right, DualShock Circle, Xbox B, Nintendo A"),
- TTRC("Face Left, DualShock Square, Xbox X, Nintendo Y"),
- TTRC("Face Top, DualShock Triangle, Xbox Y, Nintendo X"),
- TTRC("DualShock Select, Xbox Back, Nintendo -"),
- TTRC("Home, DualShock PS, Guide"),
+static const char *_button_descriptions[JOY_BUTTON_SDL_MAX] = {
+ TTRC("Bottom Action, Sony Cross, Xbox A, Nintendo B"),
+ TTRC("Right Action, Sony Circle, Xbox B, Nintendo A"),
+ TTRC("Left Action, Sony Square, Xbox X, Nintendo Y"),
+ TTRC("Top Action, Sony Triangle, Xbox Y, Nintendo X"),
+ TTRC("Back, Sony Select, Xbox Back, Nintendo -"),
+ TTRC("Guide, Sony PS, Xbox Home"),
TTRC("Start, Nintendo +"),
- TTRC("Left Stick, DualShock L3, Xbox L/LS"),
- TTRC("Right Stick, DualShock R3, Xbox R/RS"),
- TTRC("Left Shoulder, DualShock L1, Xbox LB"),
- TTRC("Right Shoulder, DualShock R1, Xbox RB"),
- TTRC("D-Pad Up"),
- TTRC("D-Pad Down"),
- TTRC("D-Pad Left"),
- TTRC("D-Pad Right")
+ TTRC("Left Stick, Sony L3, Xbox L/LS"),
+ TTRC("Right Stick, Sony R3, Xbox R/RS"),
+ TTRC("Left Shoulder, Sony L1, Xbox LB"),
+ TTRC("Right Shoulder, Sony R1, Xbox RB"),
+ TTRC("D-pad Up"),
+ TTRC("D-pad Down"),
+ TTRC("D-pad Left"),
+ TTRC("D-pad Right"),
};
static const char *_axis_descriptions[JOY_AXIS_MAX * 2] = {
- TTRC("Left Stick Left"),
- TTRC("Left Stick Right"),
- TTRC("Left Stick Up"),
- TTRC("Left Stick Down"),
- TTRC("Right Stick Left"),
- TTRC("Right Stick Right"),
- TTRC("Right Stick Up"),
- TTRC("Right Stick Down"),
+ TTRC("Left Stick Left, Joystick 0 Left"),
+ TTRC("Left Stick Right, Joystick 0 Right"),
+ TTRC("Left Stick Up, Joystick 0 Up"),
+ TTRC("Left Stick Down, Joystick 0 Down"),
+ TTRC("Right Stick Left, Joystick 1 Left"),
+ TTRC("Right Stick Right, Joystick 1 Right"),
+ TTRC("Right Stick Up, Joystick 1 Up"),
+ TTRC("Right Stick Down, Joystick 1 Down"),
TTRC("Joystick 2 Left"),
- TTRC("Joystick 2 Right, Left Trigger, L2, LT"),
+ TTRC("Left Trigger, L2, LT, Joystick 2 Right"),
TTRC("Joystick 2 Up"),
- TTRC("Joystick 2 Down, Right Trigger, R2, RT"),
+ TTRC("Right Trigger, R2, RT, Joystick 2 Down"),
TTRC("Joystick 3 Left"),
TTRC("Joystick 3 Right"),
TTRC("Joystick 3 Up"),
@@ -503,7 +503,7 @@ void InputMapEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_event) {
device_index->clear();
for (int i = 0; i < JOY_BUTTON_MAX; i++) {
String desc = TTR("Button") + " " + itos(i);
- if (i < JOY_SDL_BUTTONS) {
+ if (i < JOY_BUTTON_SDL_MAX) {
desc += " (" + TTR(_button_descriptions[i]) + ")";
}
device_index->add_item(desc);
@@ -717,7 +717,7 @@ void InputMapEditor::_update_actions() {
const int idx = jb->get_button_index();
String str = _get_device_string(jb->get_device()) + ", " +
TTR("Button") + " " + itos(idx);
- if (idx >= 0 && idx < JOY_SDL_BUTTONS) {
+ if (idx >= 0 && idx < JOY_BUTTON_SDL_MAX) {
str += String() + " (" + TTR(_button_descriptions[jb->get_button_index()]) + ")";
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index fc433b5e63..6acf80a2c1 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -1513,7 +1513,7 @@ bool CanvasItemEditor::_gui_input_rotate(const Ref<InputEvent> &p_event) {
// Start rotation
if (drag_type == DRAG_NONE) {
if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && b->is_pressed()) {
- if ((b->get_control() && !b->get_alt() && tool == TOOL_SELECT) || tool == TOOL_ROTATE) {
+ if ((b->get_command() && !b->get_alt() && tool == TOOL_SELECT) || tool == TOOL_ROTATE) {
List<CanvasItem *> selection = _get_edited_canvas_items();
// Remove not movable nodes
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 28acb26012..fa7300c930 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -5013,6 +5013,8 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
}
}
}
+ _finish_grid();
+ _init_grid();
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(p_option), grid_enabled);
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 9c589267fc..714f38bd56 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -500,6 +500,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", callable_mp(this, &TileSetEditor::_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(Button);
toolbar->add_child(tools[SHAPE_NEW_POLYGON]);
@@ -508,6 +509,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", callable_mp(this, &TileSetEditor::_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);
@@ -521,6 +523,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tools[SHAPE_DELETE] = memnew(Button);
tools[SHAPE_DELETE]->set_flat(true);
tools[SHAPE_DELETE]->connect("pressed", callable_mp(this, &TileSetEditor::_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);
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 167cd3ac35..f26d44d75a 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -2105,7 +2105,7 @@ void ProjectManager::_run_project_confirm() {
if (selected_main == "") {
run_error_diag->set_text(TTR("Can't run project: no main scene defined.\nPlease edit the project and set the main scene in the Project Settings under the \"Application\" category."));
run_error_diag->popup_centered();
- return;
+ continue;
}
const String &selected = selected_list[i].project_key;
@@ -2115,7 +2115,7 @@ void ProjectManager::_run_project_confirm() {
if (!DirAccess::exists(path.plus_file(ProjectSettings::IMPORTED_FILES_PATH.right(6)))) {
run_error_diag->set_text(TTR("Can't run project: Assets need to be imported.\nPlease edit the project to trigger the initial import."));
run_error_diag->popup_centered();
- return;
+ continue;
}
print_line("Running project: " + path + " (" + selected + ")");