Merge pull request #9549 from pchote/lobby-music

Add a music player to the game lobby.
This commit is contained in:
Oliver Brakmann
2015-10-08 21:40:04 +02:00
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: 214
Height: 174
Background: dialog3
Children:
MapPreview@MAP_PREVIEW:
@@ -19,19 +19,19 @@ Container@LOBBY_MAP_PREVIEW:
Height: PARENT_BOTTOM-2
TooltipContainer: TOOLTIP_CONTAINER
Label@MAP_TITLE:
Y: 215
Y: 172
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@MAP_TYPE:
Y: 232
Y: 187
Width: PARENT_RIGHT
Height: 25
Font: TinyBold
Align: Center
Label@MAP_AUTHOR:
Y: 245
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: 214
Height: 174
Background: dialog3
Children:
MapPreview@MAP_PREVIEW:
@@ -52,20 +52,20 @@ Container@LOBBY_MAP_PREVIEW:
Height: PARENT_BOTTOM-2
TooltipContainer: TOOLTIP_CONTAINER
Label@MAP_TITLE:
Y: 215
Y: 172
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@MAP_STATUS_A:
Y:232
Y: 187
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: This map is not compatible
Label@MAP_STATUS_B:
Y:245
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: 182
Height: 142
Background: dialog3
Children:
MapPreview@MAP_PREVIEW:
@@ -87,25 +87,25 @@ Container@LOBBY_MAP_PREVIEW:
Height: PARENT_BOTTOM-2
TooltipContainer: TOOLTIP_CONTAINER
Label@MAP_TITLE:
Y: 185
Y: 142
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@MAP_TYPE:
Y: 202
Y: 157
Width: PARENT_RIGHT
Height: 25
Font: TinyBold
Align: Center
Label@MAP_AUTHOR:
Y: 215
Y: 170
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Button@MAP_INSTALL:
Y: 242
Y: 194
Width: PARENT_RIGHT
Height: 25
Font: Bold
@@ -116,7 +116,7 @@ Container@LOBBY_MAP_PREVIEW:
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 182
Height: 142
Background: dialog3
Children:
MapPreview@MAP_PREVIEW:
@@ -126,13 +126,13 @@ Container@LOBBY_MAP_PREVIEW:
Height: PARENT_BOTTOM-2
TooltipContainer: TOOLTIP_CONTAINER
Label@MAP_TITLE:
Y: 185
Y: 142
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@MAP_STATUS_SEARCHING:
Y: 215
Y: 157
Width: PARENT_RIGHT
Height: 25
Font: Tiny
@@ -142,40 +142,39 @@ Container@LOBBY_MAP_PREVIEW:
Width: PARENT_RIGHT
Children:
Label@a:
Y: 202
Y: 157
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: This map was not found on the
Label@b:
Y: 215
Y: 170
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: OpenRA Resource Center
Label@MAP_STATUS_ERROR:
Y: 215
Y: 157
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: An error occurred during installation
Label@MAP_STATUS_DOWNLOADING:
Y: 215
Y: 157
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
ProgressBar@MAP_PROGRESSBAR:
Y: 242
Y: 194
Width: PARENT_RIGHT
Height: 25
Indeterminate: True
Button@MAP_RETRY:
Y: 242
Y: 194
Width: PARENT_RIGHT
Height: 25
Font: Bold

View File

@@ -0,0 +1,174 @@
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: 268
Height: 25
Text: Music
Align: Center
Font: Bold
Label@TITLE:
X: 278
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: dialog3
Width: 268
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:
Width: 25
Height: 25
ImageCollection: music
ImageName: prev
Button@BUTTON_PLAY:
X: 35
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PLAY:
Width: 25
Height: 25
ImageCollection: music
ImageName: play
Button@BUTTON_PAUSE:
Visible: false
X: 35
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PAUSE:
Width: 25
Height: 25
ImageCollection: music
ImageName: pause
Button@BUTTON_STOP:
X: 70
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_STOP:
Width: 25
Height: 25
ImageCollection: music
ImageName: stop
Button@BUTTON_NEXT:
X: 105
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_NEXT:
Width: 25
Height: 25
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: 268
Width: PARENT_RIGHT-268
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: 268
Width: PARENT_RIGHT-268
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

@@ -9,7 +9,6 @@ Container@LOBBY_PLAYER_BIN:
Height: PARENT_BOTTOM
Children:
Label@LABEL_LOBBY_NAME:
X: 0
Width: 180
Height: 25
Text: Name
@@ -17,34 +16,34 @@ Container@LOBBY_PLAYER_BIN:
Font: Bold
Label@LABEL_LOBBY_COLOR:
X: 190
Width: 80
Width: 70
Height: 25
Text: Color
Align: Center
Font: Bold
Label@LABEL_LOBBY_FACTION:
X: 280
X: 270
Width: 130
Height: 25
Text: Faction
Align: Center
Font: Bold
Label@LABEL_LOBBY_TEAM:
X: 420
X: 410
Width: 48
Height: 25
Text: Team
Align: Center
Font: Bold
Label@LABEL_LOBBY_SPAWN:
X: 478
X: 468
Width: 48
Height: 25
Text: Spawn
Align: Center
Font: Bold
Label@LABEL_LOBBY_STATUS:
X: 535
X: 525
Width: 20
Height: 25
Text: Ready
@@ -58,18 +57,16 @@ Container@LOBBY_PLAYER_BIN:
Children:
Container@TEMPLATE_EDITABLE_PLAYER:
X: 5
Y: 0
Width: 475
Height: 25
Visible: false
Children:
Image@ADMIN_INDICATOR:
X: 2
ImageCollection: lobby-bits
ImageName: admin
X: 2
Visible: false
Container@LATENCY:
X: 0
Y: 6
Width: 11
Height: 14
@@ -81,26 +78,26 @@ 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: 165
Height: 25
Text: Name
MaxLength: 16
DropDownButton@SLOT_OPTIONS:
Text: Name
X: 15
Width: 165
Height: 25
Text: Name
Font: Regular
Visible: false
DropDownButton@COLOR:
X: 190
Width: 80
Width: 70
Height: 25
IgnoreChildMouseOver: true
Children:
@@ -110,7 +107,7 @@ Container@LOBBY_PLAYER_BIN:
Width: PARENT_RIGHT-35
Height: PARENT_BOTTOM-12
DropDownButton@FACTION:
X: 280
X: 270
Width: 130
Height: 25
IgnoreChildMouseOver: true
@@ -119,34 +116,33 @@ 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: 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
DropDownButton@TEAM:
X: 420
X: 410
Width: 48
Height: 25
Text: Team
DropDownButton@SPAWN:
X: 478
X: 468
Width: 48
Height: 25
Text: Spawn
Checkbox@STATUS_CHECKBOX:
X: 535
X: 525
Y: 2
Width: 20
Height: 20
Visible: false
Image@STATUS_IMAGE:
X: 537
X: 527
Y: 4
Width: 20
Height: 20
@@ -155,18 +151,16 @@ Container@LOBBY_PLAYER_BIN:
Visible: false
Container@TEMPLATE_NONEDITABLE_PLAYER:
X: 5
Y: 0
Width: 475
Height: 25
Visible: false
Children:
Image@ADMIN_INDICATOR:
X: 2
ImageCollection: lobby-bits
ImageName: admin
X: 2
Visible: false
Container@LATENCY:
X: 0
Y: 6
Width: 11
Height: 14
@@ -178,105 +172,97 @@ 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:
Text: Name
Width: 165
Height: 25
X: 20
Y: 0-1
Width: 165
Height: 25
Text: Name
Button@KICK:
Text: X
Width: 25
Height: 23
X: 155
Y: 2
Width: 25
Height: 23
Text: X
Font: Bold
ColorBlock@COLORBLOCK:
X: 195
Y: 6
Width: 45
Width: 35
Height: 13
Container@FACTION:
Width: 160
Height: 25
X: 280
Y: 0
Width: 150
Height: 25
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:
X: 410
Width: 23
Height: 25
Text: Team
Width: 23
Height: 25
Align: Center
X: 420
Y: 0
Label@SPAWN:
Align: Center
X: 478
X: 468
Width: 23
Height: 25
Align: Center
Image@STATUS_IMAGE:
Visible: false
X: 537
X: 527
Y: 4
Width: 20
Height: 20
ImageCollection: checkbox-bits
ImageName: checked
Visible: false
Container@TEMPLATE_EMPTY:
X: 5
Y: 0
Width: 475
Height: 25
Visible: false
Children:
Label@NAME:
Text: Name
Width: 165
Height: 25
X: 20
Y: 0-1
DropDownButton@SLOT_OPTIONS:
Text: Name
DropDownButton@SLOT_OPTIONS:
X: 15
Width: 165
Height: 25
X: 15
Y: 0
Text: Name
Visible: false
Button@JOIN:
Text: Play in this slot
Width: 336
Height: 25
X: 190
Y: 0
Text: Play in this slot
Width: 326
Height: 25
Container@TEMPLATE_EDITABLE_SPECTATOR:
X: 5
Y: 0
Width: 475
Height: 25
Visible: false
Children:
Image@ADMIN_INDICATOR:
X: 2
ImageCollection: lobby-bits
ImageName: admin
X: 2
Visible: false
Container@LATENCY:
X: 0
Y: 6
Width: 11
Height: 14
@@ -288,38 +274,35 @@ 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: 165
Height: 25
Text: Name
MaxLength: 16
Label@SPECTATOR:
Text: Spectator
Width: 336
Height: 25
X: 190
Y: 0
Width: 326
Height: 25
Text: Spectator
Align: Center
Font: Bold
Container@TEMPLATE_NONEDITABLE_SPECTATOR:
X: 5
Y: 0
Width: 475
Height: 25
Visible: false
Children:
Image@ADMIN_INDICATOR:
X: 2
ImageCollection: lobby-bits
ImageName: admin
X: 2
Visible: false
Container@LATENCY:
X: 0
Y: 6
Width: 11
Height: 14
@@ -331,52 +314,48 @@ 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:
Text: Name
Width: 160
Height: 25
X: 20
Y: 0-1
Text: Name
Button@KICK:
Text: X
Width: 25
Height: 23
X: 155
Y: 2
Width: 25
Height: 23
Text: X
Font: Bold
Label@SPECTATOR:
Text: Spectator
Width: 336
Height: 25
X: 190
Y: 0
Width: 326
Height: 25
Text: Spectator
Align: Center
Font: Bold
Container@TEMPLATE_NEW_SPECTATOR:
X: 5
Y: 0
Width: 475
Height: 25
Visible: false
Children:
Checkbox@TOGGLE_SPECTATORS:
Font: Regular
X: 15
Width: 165
Height: 20
X: 15
Y: 0
Font: Regular
Text: Allow Spectators?
Button@SPECTATE:
X: 190
Width: 326
Height: 25
Text: Spectate
Font: Regular
Width: 336
Height: 25
X: 190
Y: 0
ScrollPanel@FACTION_DROPDOWN_TEMPLATE:
Width: DROPDOWN_WIDTH

View File

@@ -2,7 +2,7 @@ Background@SERVER_LOBBY:
Logic: LobbyLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - HEIGHT)/2
Width: 858
Width: 808
Height: 600
Children:
ColorPreviewManager@COLOR_MANAGER:
@@ -16,46 +16,53 @@ Background@SERVER_LOBBY:
Container@MAP_PREVIEW_ROOT:
X: PARENT_RIGHT-20-WIDTH
Y: 67
Width: 214
Width: 174
Height: 250
Container@TOP_PANELS_ROOT:
X: 20
Y: 67
Width: 593
Height: 235
DropDownButton@SLOTS_DROPDOWNBUTTON:
X: 20
Y: PARENT_BOTTOM - 291
Width: 167
Y: 291
Width: 180
Height: 25
Font: Bold
Text: Slot Admin
Button@OPTIONS_BUTTON:
X: 194
Y: PARENT_BOTTOM - 291
Width: 135
Height: 25
Button@PLAYERS_TAB:
X: 243
Y: 285
Width: 120
Height: 31
Font: Bold
Text: Game Options
Text: Players
Button@OPTIONS_TAB:
X: 363
Y: 285
Width: 120
Height: 31
Font: Bold
Text: Options
Button@MUSIC_TAB:
X: 483
Y: 285
Width: 120
Height: 31
Font: Bold
Text: Music
Container@TOP_PANELS_ROOT:
X: 20
Y: 67
Width: 583
Height: 219
Button@CHANGEMAP_BUTTON:
X: 336
Y: PARENT_BOTTOM - 291
Width: 135
X: PARENT_RIGHT - WIDTH - 20
Y: 291
Width: 174
Height: 25
Text: Change Map
Font: Bold
Button@START_GAME_BUTTON:
X: 478
Y: PARENT_BOTTOM - 291
Width: 135
Height: 25
Text: Start Game
Font: Bold
ScrollPanel@CHAT_DISPLAY:
X: 20
Y: PARENT_BOTTOM - HEIGHT - 52
Width: 818
Height: 210
Width: PARENT_RIGHT - 40
Height: 227
TopBottomSpacing: 2
ItemSpacing: 2
Children:
@@ -84,7 +91,7 @@ Background@SERVER_LOBBY:
TextField@CHAT_TEXTFIELD:
X: 20
Y: PARENT_BOTTOM - HEIGHT - 20
Width: PARENT_RIGHT - 167
Width: PARENT_RIGHT - 300
Height: 25
LeftMargin: 50
Children:
@@ -94,6 +101,13 @@ Background@SERVER_LOBBY:
Height: 25
Align: Right
Text: Chat:
Button@START_GAME_BUTTON:
X: PARENT_RIGHT - WIDTH - 150
Y: PARENT_BOTTOM - HEIGHT - 20
Width: 120
Height: 25
Text: Start Game
Font: Bold
Button@DISCONNECT_BUTTON:
X: PARENT_RIGHT - WIDTH - 20
Y: PARENT_BOTTOM - HEIGHT - 20