-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add player customizable button hotkeys #326
Add player customizable button hotkeys #326
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- On Windows the initially loaded keybindings are fine but anything I change them to doesn't work and the original biinding keeps working instead. Also the original binding has "(Unicode)" after it in the options menu controls UI which disappears after changing the binding, not even coming back when you type in the original binding manually.
- This doesn't allow setting shortcuts on anything without a shortcut already set in the defines, even
shortcut = ""
won't generate an action that can be customised - We should start thinking about how to display shortcuts in tooltips, depending on how complicated it is to generate a string representation of a key binding we should either cache or just always create a shortcut section for the tooltip and add it automatically any time the tooltip is updated. We'd need to detect when to update the shortcut text too if it's cached, and maybe refresh the tooltip when bindings change. Even if they're otherwise empty, tooltips should generate with the shortcut displayed at the minimum.
That is irrelevant, that's just a product of what is required to try and somewhat mimic what Victoria 2 tries to do.
Its not intended to be, this is not intended to add hotkeys to things that don't have them, this only would allow customizing things that already have hotkeys.
Why would we need to cache it? Godot makes this trivial to do already, it already tries to do it automatically by displaying the first valid event key in a tooltip which is why I call |
bd46e99
to
4670910
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts are working including new ones like manually adding shortcut = "F"
to button_goto
in menubar.gui
to open the search panel with shift+F, although I can't see the new actions in the Options/Control menu at all now 😕
8fef7b5
to
7aafc8c
Compare
7aafc8c
to
0b0d0a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We get a bunch of warnings from UI elements with the same name but different values, not sure if these are fine to ignore or if we want to be able to handle them separately (e.g. create a 2
-suffixed version if a regular action already exists)
WARNING: 'button_rallypoint_checkbox_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_rallypoint_merge_checkbox_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_rallypoint_checkbox_naval_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_rallypoint_merge_checkbox_naval_hotkey' already found in InputMap with different values, reusing hotkey at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_rallypoint_checkbox_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_rallypoint_merge_checkbox_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_rallypoint_checkbox_naval_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_rallypoint_merge_checkbox_naval_hotkey' already found in InputMap with different values, reusing hotkey at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
Mapmode set to "Terrain Mapmode" (index: 0, identifier: mapmode_terrain)
WARNING: 'button_close_hotkey' already found in InputMap with different values, reusing hotkey
at: try_create_shortcut_action_for_button (extension\src\openvic-extension\utility\UITools.cpp:172)
Fix potential button generation fail for invalid hotkeys Add Keychain action grouping organization Change default action map_zoom_in from Q to Shift+Q Change default action map_zoom_out from E to Shift+E Add `Keychain.reload_keychain` signal Add `keep_binding_check` Callable to Keychain.gd Prevents removal of unfounded action bindings Update Orama-Interactive/Keychain@0ddeb6f
0b0d0a1
to
8e1d25b
Compare
Fix potential button generation fail for invalid hotkeys