Add music player to lobby.

This commit is contained in:
Paul Chote
2015-10-04 17:29:13 +01:00
parent 72ea009042
commit 73adfe0bfc
15 changed files with 725 additions and 390 deletions

View File

@@ -9,7 +9,7 @@ Container@LOBBY_MAP_PREVIEW:
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 194
Height: 174
Background: panel-gray
Children:
MapPreview@MAP_PREVIEW:
@@ -19,19 +19,19 @@ Container@LOBBY_MAP_PREVIEW:
Height: PARENT_BOTTOM-2
TooltipContainer: TOOLTIP_CONTAINER
Label@MAP_TITLE:
Y: 197
Y: 172
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@MAP_TYPE:
Y: 212
Y: 187
Width: PARENT_RIGHT
Height: 25
Font: TinyBold
Align: Center
Label@MAP_AUTHOR:
Y: 225
Y: 200
Width: PARENT_RIGHT
Height: 25
Font: Tiny
@@ -42,7 +42,7 @@ Container@LOBBY_MAP_PREVIEW:
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 194
Height: 174
Background: panel-gray
Children:
MapPreview@MAP_PREVIEW:
@@ -52,20 +52,20 @@ Container@LOBBY_MAP_PREVIEW:
Height: PARENT_BOTTOM-2
TooltipContainer: TOOLTIP_CONTAINER
Label@MAP_TITLE:
Y: 197
Y: 172
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@MAP_STATUS_A:
Y: 212
Y: 187
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: This map is not compatible
Label@MAP_STATUS_B:
Y: 225
Y: 200
Width: PARENT_RIGHT
Height: 25
Font: Tiny
@@ -77,7 +77,7 @@ Container@LOBBY_MAP_PREVIEW:
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 164
Height: 142
Background: panel-gray
Children:
MapPreview@MAP_PREVIEW:
@@ -87,25 +87,25 @@ Container@LOBBY_MAP_PREVIEW:
Height: PARENT_BOTTOM-2
TooltipContainer: TOOLTIP_CONTAINER
Label@MAP_TITLE:
Y: 167
Y: 142
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@MAP_TYPE:
Y: 184
Y: 157
Width: PARENT_RIGHT
Height: 25
Font: TinyBold
Align: Center
Label@MAP_AUTHOR:
Y: 197
Y: 170
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Button@MAP_INSTALL:
Y: 224
Y: 194
Width: PARENT_RIGHT
Height: 25
Text: Install Map
@@ -115,7 +115,7 @@ Container@LOBBY_MAP_PREVIEW:
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 164
Height: 142
Background: panel-gray
Children:
MapPreview@MAP_PREVIEW:
@@ -125,13 +125,13 @@ Container@LOBBY_MAP_PREVIEW:
Height: PARENT_BOTTOM-2
TooltipContainer: TOOLTIP_CONTAINER
Label@MAP_TITLE:
Y: 167
Y: 142
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@MAP_STATUS_SEARCHING:
Y: 197
Y: 157
Width: PARENT_RIGHT
Height: 25
Font: Tiny
@@ -141,39 +141,39 @@ Container@LOBBY_MAP_PREVIEW:
Width: PARENT_RIGHT
Children:
Label@a:
Y: 184
Y: 157
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: This map was not found on the
Label@b:
Y: 197
Y: 170
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: OpenRA Resource Center
Label@MAP_STATUS_ERROR:
Y: 197
Y: 157
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: An error occurred during installation
Label@MAP_STATUS_DOWNLOADING:
Y: 197
Y: 157
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
ProgressBar@MAP_PROGRESSBAR:
Y: 224
Y: 194
Width: PARENT_RIGHT
Height: 25
Indeterminate: True
Button@MAP_RETRY:
Y: 224
Y: 194
Width: PARENT_RIGHT
Height: 25

View File

@@ -0,0 +1,184 @@
Container@LOBBY_MUSIC_BIN:
Logic: MusicPlayerLogic
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
LogicTicker@SONG_WATCHER:
Container@LABEL_CONTAINER:
Y: 0-25
Width: PARENT_RIGHT
Children:
Label@MUSIC:
Width: 308
Height: 25
Text: Music
Align: Center
Font: Bold
Label@TITLE:
X: 317
Width: 230
Height: 25
Text: Track
Font: Bold
Label@TYPE:
X: PARENT_RIGHT-63
Height: 25
Width: 50
Text: Length
Font: Bold
Background@CONTROLS:
Background: panel-transparent
Width: 308
Height: PARENT_BOTTOM
Children:
Label@TITLE_LABEL:
Y: 45
Width: PARENT_RIGHT
Height: 25
Align: Center
Font: Bold
Label@TIME_LABEL:
Y: 65
Width: PARENT_RIGHT
Height: 25
Align: Center
Container@BUTTONS:
X: (PARENT_RIGHT - WIDTH) / 2
Y: 100
Width: 131
Children:
Button@BUTTON_PREV:
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PREV:
X: 5
Y: 5
Width: 16
Height: 16
ImageCollection: music
ImageName: prev
Button@BUTTON_PLAY:
X: 35
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PLAY:
X: 5
Y: 5
Width: 16
Height: 16
ImageCollection: music
ImageName: play
Button@BUTTON_PAUSE:
Visible: false
X: 35
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PAUSE:
X: 5
Y: 5
Width: 16
Height: 16
ImageCollection: music
ImageName: pause
Button@BUTTON_STOP:
X: 70
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_STOP:
X: 5
Y: 5
Width: 16
Height: 16
ImageCollection: music
ImageName: stop
Button@BUTTON_NEXT:
X: 105
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_NEXT:
X: 5
Y: 5
Width: 16
Height: 16
ImageCollection: music
ImageName: next
Checkbox@SHUFFLE:
X: 25
Y: 150
Width: 85
Height: 20
Font: Regular
Text: Shuffle
Checkbox@REPEAT:
X: PARENT_RIGHT-15-WIDTH
Y: 150
Width: 70
Height: 20
Font: Regular
Text: Loop
Label@VOLUME_LABEL:
Y: 180
Width: 65
Height: 25
Align: Right
Text: Volume:
Slider@MUSIC_SLIDER:
X: 70
Y: 186
Width: PARENT_RIGHT - 80
Height: 20
Ticks: 5
ScrollPanel@MUSIC_LIST:
X: 307
Width: PARENT_RIGHT-307
Height: PARENT_BOTTOM
Children:
ScrollItem@MUSIC_TEMPLATE:
Width: PARENT_RIGHT-27
Height: 25
X: 2
Visible: false
Children:
Label@TITLE:
X: 10
Width: PARENT_RIGHT-50
Height: 25
Label@LENGTH:
X: PARENT_RIGHT-60
Width: 50
Height: 25
Align: Right
Container@NO_MUSIC_LABEL:
X: 307
Width: PARENT_RIGHT-307
Visible: false
Children:
Label@TITLE:
Y: 75
Width: PARENT_RIGHT-24
Height: 25
Font: Bold
Align: Center
Text: No Music Available
Label@DESCA:
Y: 95
Width: PARENT_RIGHT-24
Height: 25
Align: Center
Text: Music can be installed from the
Label@DESCA:
Y: 115
Width: PARENT_RIGHT-24
Height: 25
Align: Center
Text: game Extras menu.

View File

@@ -15,35 +15,35 @@ Container@LOBBY_PLAYER_BIN:
Align: Center
Font: Bold
Label@COLOR:
Width: 70
Height: 25
X: 210
Width: 76
Height: 25
Text: Color
Align: Center
Font: Bold
Label@FACTION:
Width: 100
X: 291
Width: 120
Height: 25
X: 285
Text: Faction
Align: Center
Font: Bold
Label@TEAM:
X: 416
Width: 50
Height: 25
X: 390
Text: Team
Align: Center
Font: Bold
Label@SPAWN:
X: 445
X: 471
Width: 50
Height: 25
Text: Spawn
Align: Left
Font: Bold
Label@STATUS:
X: 501
X: 527
Width: 20
Height: 25
Text: Ready
@@ -57,7 +57,6 @@ Container@LOBBY_PLAYER_BIN:
Children:
Container@TEMPLATE_EDITABLE_PLAYER:
X: 5
Y: 0
Width: 530
Height: 25
Visible: false
@@ -68,11 +67,10 @@ Container@LOBBY_PLAYER_BIN:
X: 2
Visible: false
Background@LATENCY:
Background: button
X: 0
Y: 6
Width: 11
Height: 14
Background: button
Visible: false
Children:
ColorBlock@LATENCY_COLOR:
@@ -81,28 +79,28 @@ Container@LOBBY_PLAYER_BIN:
Width: PARENT_RIGHT-4
Height: PARENT_BOTTOM-4
ClientTooltipRegion@CLIENT_REGION:
TooltipContainer: TOOLTIP_CONTAINER
Template: CLIENT_TOOLTIP
Width: 11
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
Template: CLIENT_TOOLTIP
TextField@NAME:
Text: Name
X: 15
Width: 190
Height: 25
Text: Name
MaxLength: 16
Visible: false
DropDownButton@SLOT_OPTIONS:
Text: Name
X: 15
Width: 190
Height: 25
Text: Name
Font: Regular
Visible: false
DropDownButton@COLOR:
Width: 70
Height: 25
X: 210
Width: 76
Height: 25
Font: Regular
IgnoreChildMouseOver: true
Children:
@@ -112,9 +110,9 @@ Container@LOBBY_PLAYER_BIN:
Width: PARENT_RIGHT-35
Height: PARENT_BOTTOM-12
DropDownButton@FACTION:
Width: 100
X: 291
Width: 120
Height: 25
X: 285
Font: Regular
IgnoreChildMouseOver: true
TooltipContainer: TOOLTIP_CONTAINER
@@ -122,58 +120,55 @@ Container@LOBBY_PLAYER_BIN:
PanelRoot: FACTION_DROPDOWN_PANEL_ROOT # ensure that tooltips for the options are on top of the dropdown panel
Children:
Image@FACTIONFLAG:
Width: 32
Height: 16
X: 4
Y: 4
Width: 32
Height: 16
Label@FACTIONNAME:
Text: Faction
X: 40
Width: 60
Height: 25
X: 40
Y: 0
Text: Faction
DropDownButton@TEAM:
X: 416
Width: 50
Height: 25
X: 390
Font: Regular
DropDownButton@SPAWN:
X: 445
X: 471
Width: 50
Height: 25
Font: Regular
Image@STATUS_IMAGE:
Visible: false
X: 495
X: 521
Y: 4
Width: 20
Height: 20
ImageCollection: checkbox-bits
ImageName: checked
Checkbox@STATUS_CHECKBOX:
Visible: false
X: 501
Checkbox@STATUS_CHECKBOX:
X: 527
Y: 2
Width: 20
Height: 20
Visible: false
Container@TEMPLATE_NONEDITABLE_PLAYER:
X: 5
Y: 0
Width: 530
Height: 25
Visible: false
Children:
Image@ADMIN_INDICATOR:
X: 2
ImageCollection: lobby-bits
ImageName: admin
X: 2
Visible: false
Background@LATENCY:
Background: button
X: 0
Y: 6
Width: 11
Height: 14
Background: button
Visible: false
Children:
ColorBlock@LATENCY_COLOR:
@@ -182,19 +177,19 @@ Container@LOBBY_PLAYER_BIN:
Width: PARENT_RIGHT-4
Height: PARENT_BOTTOM-4
ClientTooltipRegion@CLIENT_REGION:
TooltipContainer: TOOLTIP_CONTAINER
Template: CLIENT_TOOLTIP
Width: 11
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
Template: CLIENT_TOOLTIP
Label@NAME:
X: 20
Y: 0-1
Width: 180
Height: 25
Button@KICK:
X: 180
Width: 25
Height: 25
X: 180
Children:
Image:
ImageCollection: lobby-bits
@@ -204,57 +199,52 @@ Container@LOBBY_PLAYER_BIN:
ColorBlock@COLORBLOCK:
X: 215
Y: 6
Width: 35
Width: 41
Height: 13
Container@FACTION:
Width: 100
X: 291
Width: 120
Height: 25
X: 285
Y: 0
Children:
Image@FACTIONFLAG:
Width: 30
Height: 15
X: 5
Y: 5
Width: 30
Height: 15
Label@FACTIONNAME:
Text: Faction
X: 40
Width: 60
Height: 25
X: 40
Y: 0
Text: Faction
Label@TEAM:
Align: Center
X: 416
Width: 25
Height: 25
X: 390
Y: 0
Align: Center
Label@SPAWN:
Align: Center
X: 471
Width: 25
Height: 25
X: 445
Y: 0
Align: Center
Image@STATUS_IMAGE:
Visible: false
X: 501
X: 527
Y: 4
Width: 20
Height: 20
ImageCollection: checkbox-bits
ImageName: checked
Visible: false
Container@TEMPLATE_EMPTY:
X: 5
Y: 0
Width: 530
Height: 25
Visible: false
Children:
DropDownButton@SLOT_OPTIONS:
Text: Name
X: 15
Width: 190
Height: 25
Text: Name
Font: Regular
Visible: false
Label@NAME:
@@ -264,30 +254,27 @@ Container@LOBBY_PLAYER_BIN:
Height: 25
Visible: false
Button@JOIN:
X: 210
Width: 338
Height: 25
Text: Play in this slot
Font: Regular
Width: 312
Height: 25
X: 210
Y: 0
Container@TEMPLATE_EDITABLE_SPECTATOR:
X: 5
Y: 0
Width: 530
Height: 25
Visible: false
Children:
Image@ADMIN_INDICATOR:
X: 2
ImageCollection: lobby-bits
ImageName: admin
X: 2
Visible: false
Background@LATENCY:
Background: button
X: 0
Y: 6
Width: 11
Height: 14
Background: button
Visible: false
Children:
ColorBlock@LATENCY_COLOR:
@@ -296,42 +283,39 @@ Container@LOBBY_PLAYER_BIN:
Width: PARENT_RIGHT-4
Height: PARENT_BOTTOM-4
ClientTooltipRegion@CLIENT_REGION:
TooltipContainer: TOOLTIP_CONTAINER
Template: CLIENT_TOOLTIP
Width: 11
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
Template: CLIENT_TOOLTIP
TextField@NAME:
Text: Name
X: 15
Width: 190
Height: 25
Text: Name
MaxLength: 16
Label@SPECTATOR:
Text: Spectator
Width: 315
Height: 25
X: 210
Y: 0
Width: 341
Height: 25
Text: Spectator
Align: Center
Font: Bold
Container@TEMPLATE_NONEDITABLE_SPECTATOR:
X: 5
Y: 0
Width: 530
Height: 25
Visible: false
Children:
Image@ADMIN_INDICATOR:
X: 2
ImageCollection: lobby-bits
ImageName: admin
X: 2
Visible: false
Background@LATENCY:
Background: button
X: 0
Y: 6
Width: 11
Height: 14
Background: button
Visible: false
Children:
ColorBlock@LATENCY_COLOR:
@@ -340,48 +324,44 @@ Container@LOBBY_PLAYER_BIN:
Width: PARENT_RIGHT-4
Height: PARENT_BOTTOM-4
ClientTooltipRegion@CLIENT_REGION:
TooltipContainer: TOOLTIP_CONTAINER
Template: CLIENT_TOOLTIP
Width: 11
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
Template: CLIENT_TOOLTIP
Label@NAME:
X: 20
Y: 0-1
Width: 180
Height: 25
Button@KICK:
Text: X
Width: 25
Height: 23
X: 180
Y: 2
Width: 25
Height: 23
Text: X
Font: Bold
Label@SPECTATOR:
Text: Spectator
Width: 315
Height: 25
X: 210
Y: 0
Width: 341
Height: 25
Text: Spectator
Align: Center
Font: Bold
Container@TEMPLATE_NEW_SPECTATOR:
X: 5
Y: 0
Width: 529
Height: 25
Visible: false
Children:
Checkbox@TOGGLE_SPECTATORS:
Font: Regular
X: 15
Width: 190
Height: 20
X: 15
Y: 0
Font: Regular
Text: Allow Spectators?
Button@SPECTATE:
X: 210
Width: 338
Height: 25
Text: Spectate
Font: Regular
Width: 312
Height: 25
X: 210
Y: 0

View File

@@ -20,36 +20,43 @@ Container@SERVER_LOBBY:
Container@MAP_PREVIEW_ROOT:
X: PARENT_RIGHT-15-WIDTH
Y: 30
Width: 194
Width: 174
Height: 250
Container@TOP_PANELS_ROOT:
X: 15
Y: 30
Width: 556
Height: 219
DropDownButton@SLOTS_DROPDOWNBUTTON:
X: 15
Y: 254
Width: 166
Width: 162
Height: 25
Text: Slot Admin
Button@OPTIONS_BUTTON:
X: 186
Y: 254
Width: 125
Height: 25
Button@PLAYERS_TAB:
X: 182
Y: 248
Width: 135
Height: 31
Text: Players
Button@OPTIONS_TAB:
X: 322
Y: 248
Width: 135
Height: 31
Text: Options
Button@MUSIC_TAB:
X: 462
Y: 248
Width: 135
Height: 31
Text: Music
Button@CHANGEMAP_BUTTON:
X: 316
X: PARENT_RIGHT - WIDTH - 15
Y: 254
Width: 125
Width: 174
Height: 25
Text: Change Map
Button@START_GAME_BUTTON:
X: 446
Y: 254
Width: 125
Height: 25
Text: Start Game
Container@TOP_PANELS_ROOT:
X: 15
Y: 30
Width: 582
Height: 219
ScrollPanel@CHAT_DISPLAY:
X: 15
Y: 285
@@ -104,12 +111,12 @@ Container@SERVER_LOBBY:
Width: 140
Height: 35
Text: Settings
Button@MUSIC_BUTTON:
X: 300
Button@START_GAME_BUTTON:
X: PARENT_RIGHT - WIDTH
Y: 499
Width: 140
Height: 35
Text: Music
Text: Start Game
Container@FACTION_DROPDOWN_PANEL_ROOT:
TooltipContainer@TOOLTIP_CONTAINER:

View File

@@ -98,6 +98,7 @@ ChromeLayout:
./mods/cnc/chrome/lobby-mappreview.yaml
./mods/cnc/chrome/lobby-players.yaml
./mods/cnc/chrome/lobby-options.yaml
./mods/cnc/chrome/lobby-music.yaml
./mods/cnc/chrome/lobby-kickdialogs.yaml
./mods/cnc/chrome/connection.yaml
./mods/cnc/chrome/color-picker.yaml