Files
OpenRA/mods/cnc/chrome/mapchooser.yaml
RoosterDragon 9dbbc23967 Make map preview generation fast.
- Change Map.LoadMapTiles and Map.LoadResourceTiles to read the whole stream into memory before processing individual bytes. This removes the cost of significant overhead from repeated calls to ReadUInt8/16.
- Remove significant UI jank caused by the map chooser by not including the placeholder widget. The maps render fast enough that it is no longer worthwhile and it was causing a lot of flushes which were the source of the jank.
- Trigger async generation for all maps when the chooser is loaded. This means in practice all previews will be ready by the time the user begins to scroll the selection. Since generation is fast, there is no issue with scrolling straight to the bottom and having to wait for the backlog to clear.
2014-06-10 11:46:39 +01:00

96 lines
1.9 KiB
YAML

Container@MAPCHOOSER_PANEL:
Logic: MapChooserLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - 500)/2
Width: 800
Height: 535
Children:
Label@TITLE:
Width: PARENT_RIGHT
Y: 0-25
Font: BigBold
Contrast: true
Align: Center
Text: Select Map
Background@bg:
Width: PARENT_RIGHT
Height: 500
Background: panel-black
Children:
Label@GAMEMODE_DESC:
X: PARENT_RIGHT - WIDTH - 220
Y: 10
Width: 200
Height: 25
Font: Bold
Align: Right
Text: Filter:
DropDownButton@GAMEMODE_FILTER:
X: PARENT_RIGHT - WIDTH - 15
Y: 10
Width: 200
Height: 25
ScrollPanel@MAP_LIST:
X: 15
Y: 45
Width: PARENT_RIGHT - 30
Height: 440
Children:
ScrollItem@MAP_TEMPLATE:
Width: 183
Height: 232
X: 2
Y: 0
Visible: false
Children:
MapPreview@PREVIEW:
X: (PARENT_RIGHT - WIDTH)/2
Y: 4
Width: 173
Height: 173
Label@TITLE:
X: 2
Y: PARENT_BOTTOM-48
Width: PARENT_RIGHT-4
Align: Center
Label@DETAILS:
Width: PARENT_RIGHT-4
X: 2
Y: PARENT_BOTTOM-34
Align: Center
Font: Tiny
Label@AUTHOR:
Width: PARENT_RIGHT-4
X: 2
Y: PARENT_BOTTOM-22
Align: Center
Font: Tiny
Label@SIZE:
Width: PARENT_RIGHT-4
X: 2
Y: PARENT_BOTTOM-10
Align: Center
Font: Tiny
Button@BUTTON_CANCEL:
Key: escape
X: 0
Y: 499
Width: 140
Height: 35
Text: Cancel
Button@RANDOMMAP_BUTTON:
Key: space
X: PARENT_RIGHT - 150 - WIDTH
Y: 499
Width: 140
Height: 35
Text: Random
Button@BUTTON_OK:
Key: return
X: PARENT_RIGHT - WIDTH
Y: 499
Width: 140
Height: 35
Text: Ok