summaryrefslogtreecommitdiffstats
path: root/editor/editor_settings.h
diff options
context:
space:
mode:
authorEric M <itsjusteza@gmail.com>2020-12-07 21:31:51 +1000
committerEric M <itsjusteza@gmail.com>2021-02-18 16:22:50 +0100
commit074f53563d6955dfddaf7d7b4b787664af2c29a7 (patch)
tree89528e45a67f4d8949a51c175ffc6fd6b8f4035a /editor/editor_settings.h
parentca1abc7352ed3d8e9ca82eb4838777270f7c27a9 (diff)
downloadredot-engine-074f53563d6955dfddaf7d7b4b787664af2c29a7.tar.gz
Added ability to override built-in actions for the editor
This adds the ability to add overrides for built-in actions (i.e. ui_*) in the editor. Also added a number of additional built-in actions for various text-related actions, gui-generic actions (like copy and paste) and graph-related actions (duplicate nodes), etc. Moved the definition of input actions to input_map, rather than in project_settings so the editor can make use of these actions as well.
Diffstat (limited to 'editor/editor_settings.h')
-rw-r--r--editor/editor_settings.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 616a938a86..e5f8527faf 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -84,7 +84,8 @@ private:
int last_order;
Ref<Resource> clipboard;
- Map<String, Ref<Shortcut>> shortcuts;
+ mutable Map<String, Ref<Shortcut>> shortcuts;
+ Map<String, List<Ref<InputEvent>>> builtin_action_overrides;
String resource_path;
String settings_dir;
@@ -186,6 +187,9 @@ public:
Ref<Shortcut> get_shortcut(const String &p_name) const;
void get_shortcut_list(List<String> *r_shortcuts);
+ void set_builtin_action_override(const String &p_name, const Array &p_events);
+ const Array get_builtin_action_overrides(const String &p_name) const;
+
void notify_changes();
EditorSettings();