Move hotkey dialog logic into SettingsLogic, fix bugs and improve usability of the dialog
This commit is contained in:
committed by
reaperrr
parent
ed8abe9861
commit
be1f820674
@@ -1,83 +0,0 @@
|
||||
Background@HOTKEY_DIALOG:
|
||||
Logic: HotkeyDialogLogic
|
||||
Width: PARENT_RIGHT
|
||||
Height: PARENT_BOTTOM
|
||||
Background: panel-gray
|
||||
Children:
|
||||
Label@HOTKEY_LABEL:
|
||||
X: 15
|
||||
Y: 14
|
||||
Width: PARENT_RIGHT - 40
|
||||
Height: 25
|
||||
Font: Bold
|
||||
HotkeyEntry@HOTKEY_ENTRY:
|
||||
X: 15
|
||||
Y: 40
|
||||
Width: 382
|
||||
Height: 25
|
||||
Container@NOTICES:
|
||||
X: 15
|
||||
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 hotkey.
|
||||
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 - 65 - 15 - 2 * (WIDTH + 10)
|
||||
Y: 40
|
||||
Width: 25
|
||||
Height: 25
|
||||
TooltipText: Unbind the hotkey
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
TooltipTemplate: SIMPLE_TOOLTIP
|
||||
Children:
|
||||
Image:
|
||||
ImageCollection: lobby-bits
|
||||
ImageName: kick
|
||||
X: 7
|
||||
Y: 8
|
||||
IgnoreMouseOver: True
|
||||
Button@RESET_BUTTON:
|
||||
X: PARENT_RIGHT - 65 - 15 - WIDTH - 10
|
||||
Y: 40
|
||||
Width: 25
|
||||
Height: 25
|
||||
TooltipText: Reset to default
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
TooltipTemplate: SIMPLE_TOOLTIP
|
||||
Children:
|
||||
Image@IMAGE_RELOAD:
|
||||
X: 5
|
||||
Y: 5
|
||||
Width: 16
|
||||
Height: 16
|
||||
ImageCollection: reload-icon
|
||||
ImageName: enabled
|
||||
IgnoreMouseOver: True
|
||||
Button@CANCEL_BUTTON:
|
||||
X: PARENT_RIGHT - WIDTH - 15
|
||||
Y: 40
|
||||
Width: 65
|
||||
Height: 25
|
||||
Text: Cancel
|
||||
TooltipText: Cancel the operation
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
TooltipTemplate: SIMPLE_TOOLTIP
|
||||
TooltipContainer@TOOLTIP_CONTAINER:
|
||||
@@ -480,7 +480,7 @@ Container@SETTINGS_PANEL:
|
||||
Width: PARENT_RIGHT - 15
|
||||
TopBottomSpacing: 4
|
||||
ItemSpacing: 4
|
||||
Height: 210
|
||||
Height: 242
|
||||
Children:
|
||||
ScrollItem@HEADER:
|
||||
Width: 528
|
||||
@@ -526,23 +526,80 @@ Container@SETTINGS_PANEL:
|
||||
Height: 25
|
||||
Align: Left
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
Background@HOTKEY_DIALOG_PLACEHOLDER:
|
||||
Y: 225
|
||||
Background@HOTKEY_DIALOG_ROOT:
|
||||
Y: 255
|
||||
Width: PARENT_RIGHT - 15
|
||||
Height: 105
|
||||
Height: 75
|
||||
Background: panel-gray
|
||||
Children:
|
||||
Label@HOTKEY_DIALOG_HELPTEXT:
|
||||
Y: PARENT_BOTTOM / 2 - 12
|
||||
Width: PARENT_RIGHT
|
||||
Label@HOTKEY_LABEL:
|
||||
X: 15
|
||||
Y: 14
|
||||
Width: 220 - 15 - 10
|
||||
Height: 25
|
||||
Font: Tiny
|
||||
Align: Center
|
||||
Text: Click on a hotkey to start rebinding
|
||||
Container@HOTKEY_DIALOG_ROOT:
|
||||
Y: 225
|
||||
Width: PARENT_RIGHT - 15
|
||||
Height: 105
|
||||
Font: Bold
|
||||
Align: Right
|
||||
HotkeyEntry@HOTKEY_ENTRY:
|
||||
X: 220
|
||||
Y: 15
|
||||
Width: 254
|
||||
Height: 25
|
||||
Container@NOTICES:
|
||||
X: 220
|
||||
Y: 40
|
||||
Width: 254
|
||||
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 is already used for "{0}"
|
||||
Button@CLEAR_HOTKEY_BUTTON:
|
||||
X: PARENT_RIGHT - 25 - 15 - WIDTH - 10
|
||||
Y: 15
|
||||
Width: 25
|
||||
Height: 25
|
||||
TooltipText: Unbind the hotkey
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
TooltipTemplate: SIMPLE_TOOLTIP
|
||||
Children:
|
||||
Image:
|
||||
ImageCollection: lobby-bits
|
||||
ImageName: kick
|
||||
X: 7
|
||||
Y: 8
|
||||
IgnoreMouseOver: True
|
||||
Button@RESET_HOTKEY_BUTTON:
|
||||
X: PARENT_RIGHT - WIDTH - 15
|
||||
Y: 15
|
||||
Width: 25
|
||||
Height: 25
|
||||
TooltipText: Reset to default
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
TooltipTemplate: SIMPLE_TOOLTIP
|
||||
Children:
|
||||
Image@IMAGE_RELOAD:
|
||||
X: 5
|
||||
Y: 5
|
||||
Width: 16
|
||||
Height: 16
|
||||
ImageCollection: reload-icon
|
||||
ImageName: enabled
|
||||
IgnoreMouseOver: True
|
||||
Container@ADVANCED_PANEL:
|
||||
Width: PARENT_RIGHT
|
||||
Height: PARENT_BOTTOM
|
||||
|
||||
@@ -128,7 +128,6 @@ ChromeLayout:
|
||||
cnc|chrome/assetbrowser.yaml
|
||||
cnc|chrome/missionbrowser.yaml
|
||||
cnc|chrome/editor.yaml
|
||||
cnc|chrome/dialog-hotkey.yaml
|
||||
|
||||
Voices:
|
||||
cnc|audio/voices.yaml
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
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:
|
||||
@@ -482,7 +482,7 @@ Background@SETTINGS_PANEL:
|
||||
Width: PARENT_RIGHT - 30
|
||||
TopBottomSpacing: 4
|
||||
ItemSpacing: 4
|
||||
Height: 183
|
||||
Height: 222
|
||||
Children:
|
||||
ScrollItem@HEADER:
|
||||
BaseName: scrollheader
|
||||
@@ -539,25 +539,69 @@ Background@SETTINGS_PANEL:
|
||||
Height: 25
|
||||
Align: Left
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
Background@HOTKEY_DIALOG_PLACEHOLDER:
|
||||
Background@HOTKEY_DIALOG_ROOT:
|
||||
X: 15
|
||||
Y: 232
|
||||
Y: 270
|
||||
Width: PARENT_RIGHT - 30
|
||||
Height: 108
|
||||
Height: 73
|
||||
Background: dialog3
|
||||
Children:
|
||||
Label@HOTKEY_DIALOG_HELPTEXT:
|
||||
Y: PARENT_BOTTOM / 2 - 12
|
||||
Width: PARENT_RIGHT
|
||||
Label@HOTKEY_LABEL:
|
||||
X: 15
|
||||
Y: 19
|
||||
Width: 219 - 15 - 10
|
||||
Height: 25
|
||||
Font: Tiny
|
||||
Align: Center
|
||||
Text: Click on a hotkey to start rebinding
|
||||
Container@HOTKEY_DIALOG_ROOT:
|
||||
X: 15
|
||||
Y: 232
|
||||
Width: PARENT_RIGHT - 30
|
||||
Height: 108
|
||||
Font: Bold
|
||||
Align: Right
|
||||
HotkeyEntry@HOTKEY_ENTRY:
|
||||
X: 219
|
||||
Y: 20
|
||||
Width: 170
|
||||
Height: 25
|
||||
Container@NOTICES:
|
||||
X: 219
|
||||
Y: 42
|
||||
Width: 170
|
||||
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 is already used for "{0}"
|
||||
Button@CLEAR_HOTKEY_BUTTON:
|
||||
X: PARENT_RIGHT - 2 * WIDTH - 30
|
||||
Y: 20
|
||||
Width: 65
|
||||
Height: 25
|
||||
Text: Clear
|
||||
Font: Bold
|
||||
TooltipText: Unbind the hotkey
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
TooltipTemplate: SIMPLE_TOOLTIP
|
||||
Button@RESET_HOTKEY_BUTTON:
|
||||
X: PARENT_RIGHT - WIDTH - 20
|
||||
Y: 20
|
||||
Width: 65
|
||||
Height: 25
|
||||
Text: Reset
|
||||
Font: Bold
|
||||
TooltipText: Reset to default
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
TooltipTemplate: SIMPLE_TOOLTIP
|
||||
Container@ADVANCED_PANEL:
|
||||
X: 5
|
||||
Y: 50
|
||||
|
||||
@@ -109,7 +109,6 @@ ChromeLayout:
|
||||
common|chrome/replaybrowser.yaml
|
||||
common|chrome/gamesave-browser.yaml
|
||||
common|chrome/gamesave-loading.yaml
|
||||
common|chrome/dialog-hotkey.yaml
|
||||
|
||||
Weapons:
|
||||
d2k|weapons/debris.yaml
|
||||
|
||||
@@ -124,7 +124,6 @@ ChromeLayout:
|
||||
common|chrome/confirmation-dialogs.yaml
|
||||
common|chrome/editor.yaml
|
||||
common|chrome/playerprofile.yaml
|
||||
common|chrome/dialog-hotkey.yaml
|
||||
|
||||
Weapons:
|
||||
ra|weapons/explosions.yaml
|
||||
|
||||
@@ -172,7 +172,6 @@ ChromeLayout:
|
||||
common|chrome/missionbrowser.yaml
|
||||
common|chrome/confirmation-dialogs.yaml
|
||||
common|chrome/editor.yaml
|
||||
common|chrome/dialog-hotkey.yaml
|
||||
|
||||
Voices:
|
||||
ts|audio/voices.yaml
|
||||
|
||||
Reference in New Issue
Block a user