Rework D2k Chrome in preparation for UI scaling.

This commit is contained in:
Paul Chote
2020-01-13 23:10:35 +00:00
committed by abcdefg30
parent 9f66e3936d
commit f37d9a7010
11 changed files with 130 additions and 148 deletions

View File

@@ -4,8 +4,8 @@
^Dialog: ^Dialog:
Image: dialog.png Image: dialog.png
^Buttons: ^Glyphs:
Image: buttons.png Image: glyphs.png
^LoadScreen: ^LoadScreen:
Image: loadscreen.png Image: loadscreen.png
@@ -19,11 +19,11 @@ sidebar:
sidebar-button: sidebar-button:
Inherits: ^Chrome Inherits: ^Chrome
PanelRegion: 377, 0, 0, 0, 25, 25, 0, 0 PanelRegion: 381, 0, 0, 0, 25, 25, 0, 0
PanelSides: Center PanelSides: Center
sidebar-button-pressed: sidebar-button-pressed:
Inherits: ^Chrome Inherits: ^Chrome
PanelRegion: 402, 0, 0, 0, 25, 25, 0, 0 PanelRegion: 407, 0, 0, 0, 25, 25, 0, 0
PanelSides: Center PanelSides: Center
sidebar-button-hover: sidebar-button-hover:
Inherits: sidebar-button-pressed Inherits: sidebar-button-pressed
@@ -35,75 +35,80 @@ sidebar-button-highlighted-pressed:
Inherits: sidebar-button-pressed Inherits: sidebar-button-pressed
sidebar-button-disabled: sidebar-button-disabled:
Inherits: ^Chrome Inherits: ^Chrome
PanelRegion: 427, 0, 0, 0, 25, 25, 0, 0 PanelRegion: 433, 0, 0, 0, 25, 25, 0, 0
PanelSides: Center PanelSides: Center
sidebar-button-highlighted-disabled: sidebar-button-highlighted-disabled:
Inherits: sidebar-button-disabled Inherits: sidebar-button-disabled
sidebar-bits: sidebar-bits:
Inherits: ^Glyphs
Regions:
production-tooltip-time: 136, 51, 16, 16
production-tooltip-power: 102, 51, 16, 16
production-tooltip-cost: 68, 51, 16, 16
indicator-muted: 0, 119, 24, 24
commandbar:
Inherits: ^Chrome Inherits: ^Chrome
Regions: Regions:
production-tooltip-time: 480, 112, 16, 16 background: 0, 469, 454, 43
production-tooltip-power: 496, 112, 16, 16
production-tooltip-cost: 464, 112, 16, 16
commandbar-background: 0, 469, 454, 43
minimap-overlay: minimap-overlay:
Inherits: ^Chrome Inherits: ^Chrome
Regions: Regions:
top-left: 236, 15, 7, 7 top-left: 239, 15, 7, 7
top: 236, 0, 141, 4 top: 239, 0, 141, 4
top-right: 243, 15, 7, 7 top-right: 247, 15, 7, 7
left: 231, 0, 5, 22 left: 233, 0, 5, 22
right: 226, 0, 5, 22 right: 227, 0, 5, 22
bottom-left: 236, 8, 7, 7 bottom-left: 239, 7, 7, 7
bottom-right: 243, 8, 7, 7 bottom-right: 247, 7, 7, 7
radar-atreides: radar-atreides:
Inherits: ^Chrome Inherits: ^Chrome
Regions: Regions:
insignia: 226, 25, 100, 100 insignia: 227, 26, 100, 100
radar-ordos: radar-ordos:
Inherits: ^Chrome Inherits: ^Chrome
Regions: Regions:
insignia: 326, 25, 100, 100 insignia: 328, 26, 100, 100
radar-harkonnen: radar-harkonnen:
Inherits: ^Chrome Inherits: ^Chrome
Regions: Regions:
insignia: 226, 125, 100, 100 insignia: 227, 127, 100, 100
power-icons: power-icons:
Inherits: ^Chrome Inherits: ^Glyphs
Regions: Regions:
power-normal: 496, 112, 16, 16 power-normal: 102, 51, 16, 16
power-critical: 496, 128, 16, 16 power-critical: 119, 51, 16, 16
production-icons: production-icons:
Inherits: ^Chrome Inherits: ^Glyphs
Regions: Regions:
building: 464, 0, 16, 16 building: 0, 68, 16, 16
building-disabled: 480, 0, 16, 16 building-disabled: 0, 85, 16, 16
building-alert: 496, 0, 16, 16 building-alert: 0, 102, 16, 16
upgrade: 464, 16, 16, 16 upgrade: 17, 68, 16, 16
upgrade-disabled: 480, 16, 16, 16 upgrade-disabled: 17, 85, 16, 16
upgrade-alert: 496, 16, 16, 16 upgrade-alert: 17, 102, 16, 16
infantry: 464, 32, 16, 16 infantry: 34, 68, 16, 16
infantry-disabled: 480, 32, 16, 16 infantry-disabled: 34, 85, 16, 16
infantry-alert: 496, 32, 16, 16 infantry-alert: 34, 102, 16, 16
vehicle: 464, 48, 16, 16 vehicle: 51, 68, 16, 16
vehicle-disabled: 480, 48, 16, 16 vehicle-disabled: 51, 85, 16, 16
vehicle-alert: 496, 48, 16, 16 vehicle-alert: 51, 102, 16, 16
armor: 464, 64, 16, 16 armor: 68, 68, 16, 16
armor-disabled: 480, 64, 16, 16 armor-disabled: 68, 85, 16, 16
armor-alert: 496, 64, 16, 16 armor-alert: 68, 102, 16, 16
aircraft: 464, 80, 16, 16 aircraft: 85, 68, 16, 16
aircraft-disabled: 480, 80, 16, 16 aircraft-disabled: 85, 85, 16, 16
aircraft-alert: 496, 80, 16, 16 aircraft-alert: 85, 102, 16, 16
starport: 464, 96, 16, 16 starport: 102, 68, 16, 16
starport-disabled: 480, 96, 16, 16 starport-disabled: 102, 85, 16, 16
starport-alert: 496, 96, 16, 16 starport-alert: 102, 102, 16, 16
order-icons: order-icons:
Inherits: ^Chrome Inherits: ^Chrome
@@ -135,13 +140,13 @@ order-icons:
command-button: command-button:
Inherits: ^Chrome Inherits: ^Chrome
PanelRegion: 332, 428, 0, 0, 34, 41, 0, 0 PanelRegion: 331, 427, 0, 0, 34, 41, 0, 0
PanelSides: Center PanelSides: Center
command-button-hover: command-button-hover:
Inherits: command-button Inherits: command-button
command-button-pressed: command-button-pressed:
Inherits: ^Chrome Inherits: ^Chrome
PanelRegion: 400, 428, 0, 0, 34, 41, 0, 0 PanelRegion: 401, 427, 0, 0, 34, 41, 0, 0
PanelSides: Center PanelSides: Center
command-button-highlighted: command-button-highlighted:
Inherits: command-button-pressed Inherits: command-button-pressed
@@ -151,7 +156,7 @@ command-button-highlighted-pressed:
Inherits: command-button-pressed Inherits: command-button-pressed
command-button-disabled: command-button-disabled:
Inherits: ^Chrome Inherits: ^Chrome
PanelRegion: 366, 428, 0, 0, 34, 41, 0, 0 PanelRegion: 366, 427, 0, 0, 34, 41, 0, 0
PanelSides: Center PanelSides: Center
command-button-highlighted-disabled: command-button-highlighted-disabled:
Inherits: command-button-disabled Inherits: command-button-disabled
@@ -193,32 +198,32 @@ stance-icons:
hold-fire-active: 496, 264, 16, 16 hold-fire-active: 496, 264, 16, 16
flags: flags:
Inherits: ^Buttons Inherits: ^Glyphs
Regions: Regions:
atreides: 0, 114, 22, 21 atreides: 234, 59, 22, 21
harkonnen: 22, 114, 23, 21 harkonnen: 234, 81, 22, 21
ordos: 45, 114, 22, 21 ordos: 234, 103, 22, 21
Random: 67, 114, 23, 21 corrino: 234, 125, 22, 21
spectator: 67, 114, 23, 21 smuggler: 234, 147, 22, 21
corrino: 90, 114, 22, 21 fremen: 234, 169, 22, 21
smuggler: 112, 114, 22, 21 worm: 234, 191, 22, 21
fremen: 134, 114, 22, 21 mercenary: 234, 213, 22, 21
worm: 156, 114, 22, 21 spectator: 234, 235, 22, 21
mercenary: 178, 114, 22, 21 Random: 234, 235, 22, 21
# Used for the menu # Used for the menu
dialog: dialog:
Inherits: ^Dialog Inherits: ^Dialog
Regions: Regions:
background: 0, 0, 480, 480 background: 1, 1, 478, 478
border-r: 489, 0, 9, 192 border-r: 490, 1, 9, 190
border-l: 480, 0, 9, 192 border-l: 481, 1, 9, 190
border-b: 0, 489, 191, 9 border-b: 1, 490, 189, 9
border-t: 0, 480, 191, 9 border-t: 1, 481, 189, 9
corner-tl: 191, 480, 9, 9 corner-tl: 192, 481, 9, 9
corner-tr: 200, 480, 9, 9 corner-tr: 201, 481, 9, 9
corner-bl: 191, 489, 9, 9 corner-bl: 192, 490, 9, 9
corner-br: 200, 489, 9, 9 corner-br: 201, 490, 9, 9
dialog2: dialog2:
Inherits: button Inherits: button
@@ -232,64 +237,57 @@ dialog4:
PanelRegion: 512, 387, 6, 6, 52, 52, 6, 6 PanelRegion: 512, 387, 6, 6, 52, 52, 6, 6
lobby-bits: lobby-bits:
Inherits: ^Buttons Inherits: ^Glyphs
Regions: Regions:
spawn-unclaimed: 158, 5, 23, 22 spawn-unclaimed: 91, 119, 22, 22
spawn-claimed: 126, 5, 23, 22 spawn-claimed: 68, 119, 22, 22
admin: 186, 5, 7, 5 admin: 170, 0, 6, 5
colorpicker: 126, 5, 23, 22 colorpicker: 68, 119, 22, 22
huepicker: 193, 0, 7, 15 huepicker: 136, 0, 7, 15
protected: 200, 0, 12, 13 kick: 153, 0, 11, 11
protected-disabled: 211, 0, 12, 13 protected: 0, 17, 12, 13
authentication: 199, 16, 12, 13 protected-disabled: 17, 17, 12, 13
authentication-disabled: 212, 16, 12, 13 authentication: 34, 17, 12, 13
admin-registered: 224, 0, 16, 16 authentication-disabled: 51, 17, 12, 13
admin-anonymous: 240, 0, 16, 16 admin-registered: 0, 51, 16, 16
player-registered: 224, 16, 16, 16 admin-anonymous: 34, 51, 16, 16
player-anonymous: 240, 16, 16, 16 player-registered: 17, 51, 16, 16
player-anonymous: 51, 51, 16, 16
reload-icon: reload-icon:
Inherits: ^Chrome Inherits: ^Glyphs
Regions: Regions:
enabled: 416, 312, 16, 16 enabled: 0, 34, 16, 16
disabled-0: 416, 280, 16, 16 disabled-0: 17, 34, 16, 16
disabled-1: 432, 280, 16, 16 disabled-1: 34, 34, 16, 16
disabled-2: 448, 280, 16, 16 disabled-2: 51, 34, 16, 16
disabled-3: 464, 280, 16, 16 disabled-3: 68, 34, 16, 16
disabled-4: 480, 280, 16, 16 disabled-4: 85, 34, 16, 16
disabled-5: 496, 280, 16, 16 disabled-5: 102, 34, 16, 16
disabled-6: 416, 296, 16, 16 disabled-6: 119, 34, 16, 16
disabled-7: 432, 296, 16, 16 disabled-7: 136, 34, 16, 16
disabled-8: 448, 296, 16, 16 disabled-8: 153, 34, 16, 16
disabled-9: 464, 296, 16, 16 disabled-9: 170, 34, 16, 16
disabled-10: 480, 296, 16, 16 disabled-10: 187, 34, 16, 16
disabled-11: 496, 296, 16, 16 disabled-11: 204, 34, 16, 16
strategic:
Inherits: ^Buttons
Regions:
unowned: 127, 5, 23, 22
critical_unowned: 127, 27, 23, 22
enemy_owned: 159, 27, 23, 22
player_owned: 159, 49, 23, 22
music: music:
Inherits: ^Buttons Inherits: ^Glyphs
Regions: Regions:
pause: 5, 198, 16, 16 pause: 0, 0, 16, 16
stop: 30, 198, 16, 16 stop: 17, 0, 16, 16
play: 59, 198, 16, 16 play: 34, 0, 16, 16
next: 87, 198, 16, 16 next: 51, 0, 16, 16
prev: 114, 198, 16, 16 prev: 68, 0, 16, 16
fastforward: 138, 198, 16, 16 fastforward: 85, 0, 16, 16
scrollbar: scrollbar:
Inherits: ^Buttons Inherits: ^Glyphs
Regions: Regions:
down_arrow: 16, 140, 16, 16 down_arrow: 119, 0, 16, 16
down_pressed: 16, 140, 16, 16 down_pressed: 119, 0, 16, 16
up_arrow: 32, 140, 16, 16 up_arrow: 102, 0, 16, 16
up_pressed: 32, 140, 16, 16 up_pressed: 102, 0, 16, 16
progressbar-bg: progressbar-bg:
Inherits: button-pressed Inherits: button-pressed
@@ -299,33 +297,33 @@ progressbar-thumb:
button: button:
Inherits: ^Dialog Inherits: ^Dialog
PanelRegion: 512, 0, 1, 1, 126, 126, 1, 1 PanelRegion: 513, 1, 2, 2, 122, 122, 2, 2
# 5% lighter than a normal button # 5% lighter than a normal button
button-hover: button-hover:
Inherits: ^Dialog Inherits: ^Dialog
PanelRegion: 512, 128, 1, 1, 126, 126, 1, 1 PanelRegion: 513, 129, 2, 2, 122, 122, 2, 2
button-pressed: button-pressed:
Inherits: ^Dialog Inherits: ^Dialog
PanelRegion: 640, 0, 1, 1, 126, 126, 1, 1 PanelRegion: 641, 1, 2, 2, 122, 122, 2, 2
# 10% darker than a normal button # 10% darker than a normal button
button-disabled: button-disabled:
Inherits: ^Dialog Inherits: ^Dialog
PanelRegion: 512, 256, 1, 1, 126, 126, 1, 1 PanelRegion: 513, 257, 2, 2, 122, 122, 2, 2
# A yellow (normal) button # A yellow (normal) button
button-highlighted: button-highlighted:
Inherits: ^Dialog Inherits: ^Dialog
PanelRegion: 768, 0, 1, 1, 126, 126, 1, 1 PanelRegion: 769, 1, 2, 2, 122, 122, 2, 2
button-highlighted-hover: button-highlighted-hover:
Inherits: button-highlighted Inherits: button-highlighted
button-highlighted-pressed: button-highlighted-pressed:
Inherits: ^Dialog Inherits: ^Dialog
PanelRegion: 896, 0, 1, 1, 126, 126, 1, 1 PanelRegion: 897, 1, 2, 2, 122, 122, 2, 2
button-highlighted-disabled: button-highlighted-disabled:
Inherits: button-highlighted Inherits: button-highlighted
@@ -360,7 +358,7 @@ scrollpanel-button-disabled:
slider: slider:
Inherits: ^Dialog Inherits: ^Dialog
Regions: Regions:
tick: 512, 1, 2, 4 tick: 513, 1, 2, 4
slider-track: slider-track:
Inherits: button Inherits: button
@@ -381,21 +379,21 @@ checkbox:
Inherits: button-pressed Inherits: button-pressed
checkbox-bits: checkbox-bits:
Inherits: ^Buttons Inherits: ^Glyphs
Regions: Regions:
checked: 0, 157, 16, 16 checked: 187, 0, 16, 16
checked-disabled: 0, 173, 16, 16 checked-disabled: 204, 0, 16, 16
crossed: 16, 157, 16, 16 crossed: 221, 0, 16, 16
crossed-disabled: 16, 173, 16, 16 crossed-disabled: 238, 0, 16, 16
checkbox-hover: checkbox-hover:
Inherits: ^Dialog Inherits: ^Dialog
PanelRegion: 640, 128, 1, 1, 126, 126, 1, 1 PanelRegion: 641, 129, 2, 2, 122, 122, 2, 2
# Same as a button-disabled-pressed # Same as a button-disabled-pressed
checkbox-disabled: checkbox-disabled:
Inherits: ^Dialog Inherits: ^Dialog
PanelRegion: 640, 256, 1, 1, 126, 126, 1, 1 PanelRegion: 641, 257, 2, 2, 122, 122, 2, 2
checkbox-highlighted: checkbox-highlighted:
Inherits: button-highlighted-pressed Inherits: button-highlighted-pressed
@@ -415,7 +413,7 @@ scrollitem-nohover:
dropdown: dropdown:
Inherits: ^Dialog Inherits: ^Dialog
Regions: Regions:
separator: 512, 1, 1, 19 separator: 513, 1, 1, 19
logos: logos:
Inherits: ^LoadScreen Inherits: ^LoadScreen

View File

@@ -21,8 +21,8 @@ Container@PLAYER_WIDGETS:
Y: WINDOW_BOTTOM - HEIGHT Y: WINDOW_BOTTOM - HEIGHT
Width: 416 Width: 416
Height: 43 Height: 43
ImageCollection: sidebar-bits ImageCollection: commandbar
ImageName: commandbar-background ImageName: background
Container@COMMAND_BAR: Container@COMMAND_BAR:
Logic: CommandBarLogic Logic: CommandBarLogic
X: 24 X: 24
@@ -262,22 +262,6 @@ Container@PLAYER_WIDGETS:
X: 16 X: 16
Y: 236 Y: 236
Children: Children:
MenuButton@DEBUG_BUTTON:
X: 4
Width: 34
Height: 35
Background:
Key: escape Shift
TooltipText: Debug Menu
TooltipContainer: TOOLTIP_CONTAINER
DisableWorldSounds: true
VisualHeight: 0
Children:
Image@ICON:
X: 0
Y: 0
ImageCollection: order-icons
ImageName: debug
Button@REPAIR_BUTTON: Button@REPAIR_BUTTON:
Logic: RepairOrderButtonLogic Logic: RepairOrderButtonLogic
X: 29 X: 29

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
mods/d2k/uibits/glyphs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 27 KiB