Add hotkey settings panel with a hotkey remap dialog
* Add HotkeyDialogLogic.cs * Add dialog-hotkey.yaml to all mods * Add `GetFirstDuplicate` method to HotkeyManager to aid in validation * Add "Player" and/or "Spectator" type to all hotkeys to allow for validation based on overlapping types * Change settings.yaml and SettingsLogic.cs to work with the new dialog
This commit is contained in:
committed by
abcdefg30
parent
9783fdaf78
commit
c9ff54bfd5
69
mods/common/chrome/dialog-hotkey.yaml
Normal file
69
mods/common/chrome/dialog-hotkey.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
Background@HOTKEY_DIALOG:
|
||||
Logic: HotkeyDialogLogic
|
||||
Width: PARENT_RIGHT
|
||||
Height: PARENT_BOTTOM
|
||||
Background: dialog3
|
||||
Children:
|
||||
Label@HOTKEY_LABEL:
|
||||
X: 20
|
||||
Y: 14
|
||||
Width: PARENT_RIGHT - 40
|
||||
Height: 25
|
||||
Font: Bold
|
||||
HotkeyEntry@HOTKEY_ENTRY:
|
||||
X: 20
|
||||
Y: 40
|
||||
Width: 280
|
||||
Height: 25
|
||||
Container@NOTICES:
|
||||
X: 20
|
||||
Y: 65
|
||||
Width: PARENT_RIGHT - 40
|
||||
Height: 25
|
||||
Children:
|
||||
Label@DEFAULT_NOTICE:
|
||||
Width: PARENT_RIGHT
|
||||
Height: PARENT_BOTTOM
|
||||
Font: Tiny
|
||||
Align: Left
|
||||
Text: This is the default
|
||||
Label@ORIGINAL_NOTICE:
|
||||
Width: PARENT_RIGHT
|
||||
Height: PARENT_BOTTOM
|
||||
Font: Tiny
|
||||
Align: Left
|
||||
Text: The default is "{0}"
|
||||
Label@DUPLICATE_NOTICE:
|
||||
Width: PARENT_RIGHT
|
||||
Height: PARENT_BOTTOM
|
||||
Font: Tiny
|
||||
Align: Left
|
||||
Text: This hotkey is already used for "{0}"
|
||||
Button@CLEAR_BUTTON:
|
||||
X: PARENT_RIGHT - 3 * WIDTH - 40
|
||||
Y: 41
|
||||
Width: 65
|
||||
Height: 25
|
||||
Text: Clear
|
||||
TooltipText: Unbind the hotkey
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
TooltipTemplate: SIMPLE_TOOLTIP
|
||||
Button@RESET_BUTTON:
|
||||
X: PARENT_RIGHT - 2 * WIDTH - 30
|
||||
Y: 41
|
||||
Width: 65
|
||||
Height: 25
|
||||
Text: Reset
|
||||
TooltipText: Reset to default
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
TooltipTemplate: SIMPLE_TOOLTIP
|
||||
Button@CANCEL_BUTTON:
|
||||
X: PARENT_RIGHT - WIDTH - 20
|
||||
Y: 41
|
||||
Width: 65
|
||||
Height: 25
|
||||
Text: Cancel
|
||||
TooltipText: Cancel the operation
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
TooltipTemplate: SIMPLE_TOOLTIP
|
||||
TooltipContainer@TOOLTIP_CONTAINER:
|
||||
Reference in New Issue
Block a user