summaryrefslogtreecommitdiffstats
path: root/editor/input_event_configuration_dialog.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2023-12-17 22:56:26 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2023-12-18 01:42:59 +0100
commit8e2f3191e71eef54a958ee07d46b38e7ef263b25 (patch)
tree39ca6f0864d31d192509c748e52e05893efcfcd4 /editor/input_event_configuration_dialog.cpp
parent2d0ee20ff30461b6b10f6fdfba87511a0ebc6642 (diff)
downloadredot-engine-8e2f3191e71eef54a958ee07d46b38e7ef263b25.tar.gz
Add input action name to window title in input map editor
Diffstat (limited to 'editor/input_event_configuration_dialog.cpp')
-rw-r--r--editor/input_event_configuration_dialog.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/editor/input_event_configuration_dialog.cpp b/editor/input_event_configuration_dialog.cpp
index a0d2662045..db7922233e 100644
--- a/editor/input_event_configuration_dialog.cpp
+++ b/editor/input_event_configuration_dialog.cpp
@@ -572,7 +572,7 @@ void InputEventConfigurationDialog::_notification(int p_what) {
}
}
-void InputEventConfigurationDialog::popup_and_configure(const Ref<InputEvent> &p_event) {
+void InputEventConfigurationDialog::popup_and_configure(const Ref<InputEvent> &p_event, const String &p_current_action_name) {
if (p_event.is_valid()) {
_set_event(p_event->duplicate(), p_event);
} else {
@@ -596,6 +596,12 @@ void InputEventConfigurationDialog::popup_and_configure(const Ref<InputEvent> &p
device_id_option->select(0);
}
+ if (!p_current_action_name.is_empty()) {
+ set_title(vformat(TTR("Event Configuration for \"%s\""), p_current_action_name));
+ } else {
+ set_title(TTR("Event Configuration"));
+ }
+
popup_centered(Size2(0, 400) * EDSCALE);
}
@@ -611,7 +617,6 @@ void InputEventConfigurationDialog::set_allowed_input_types(int p_type_masks) {
InputEventConfigurationDialog::InputEventConfigurationDialog() {
allowed_input_types = INPUT_KEY | INPUT_MOUSE_BUTTON | INPUT_JOY_BUTTON | INPUT_JOY_MOTION;
- set_title(TTR("Event Configuration"));
set_min_size(Size2i(550, 0) * EDSCALE);
VBoxContainer *main_vbox = memnew(VBoxContainer);