diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-03-16 20:55:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-16 20:55:11 +0100 |
commit | c531262190d7b75238e60565a3a59f13feed2ffa (patch) | |
tree | 8bed4bea6d93cb8478a9a4cda0cd6f746014d318 /core | |
parent | e06a56eac8c1fbf36e985697d3b6b1a66ec8ac0e (diff) | |
parent | 920d2bfdfa582b81b0e47d8a0a5de5817289c6dc (diff) |
Merge pull request #16947 from Faless/ui_actions
GUI elements ui_action usage, improvements
Diffstat (limited to 'core')
-rw-r--r-- | core/input_map.cpp | 10 | ||||
-rw-r--r-- | core/project_settings.cpp | 14 |
2 files changed, 24 insertions, 0 deletions
diff --git a/core/input_map.cpp b/core/input_map.cpp index a9ea1d9545..bd03d61196 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -282,6 +282,16 @@ void InputMap::load_default() { key->set_scancode(KEY_PAGEDOWN); action_add_event("ui_page_down", key); + add_action("ui_home"); + key.instance(); + key->set_scancode(KEY_HOME); + action_add_event("ui_home", key); + + add_action("ui_end"); + key.instance(); + key->set_scancode(KEY_END); + action_add_event("ui_end", key); + //set("display/window/handheld/orientation", "landscape"); } diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 3eb8ad7bf5..20d91e7940 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -1030,6 +1030,20 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("input/ui_page_down", va); input_presets.push_back("input/ui_page_down"); + va = Array(); + key.instance(); + key->set_scancode(KEY_HOME); + va.push_back(key); + GLOBAL_DEF("input/ui_home", va); + input_presets.push_back("input/ui_home"); + + va = Array(); + key.instance(); + key->set_scancode(KEY_END); + va.push_back(key); + GLOBAL_DEF("input/ui_end", va); + input_presets.push_back("input/ui_end"); + //GLOBAL_DEF("display/window/handheld/orientation", "landscape"); custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::STRING, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "landscape,portrait,reverse_landscape,reverse_portrait,sensor_landscape,sensor_portrait,sensor"); |