From 73adfe0bfc522a8a549f0f723aa6d249e7ee5741 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 4 Oct 2015 17:29:13 +0100 Subject: [PATCH] Add music player to lobby. --- .../Widgets/Logic/Lobby/LobbyLogic.cs | 35 ++-- .../Widgets/Logic/MusicPlayerLogic.cs | 10 +- mods/cnc/chrome/lobby-mappreview.yaml | 44 ++--- mods/cnc/chrome/lobby-music.yaml | 184 ++++++++++++++++++ mods/cnc/chrome/lobby-players.yaml | 162 +++++++-------- mods/cnc/chrome/lobby.yaml | 53 ++--- mods/cnc/mod.yaml | 1 + mods/d2k/chrome/lobby-players.yaml | 171 +++++++--------- mods/d2k/mod.yaml | 1 + mods/ra/chrome/lobby-mappreview.yaml | 45 +++-- mods/ra/chrome/lobby-music.yaml | 174 +++++++++++++++++ mods/ra/chrome/lobby-players.yaml | 163 +++++++--------- mods/ra/chrome/lobby.yaml | 70 ++++--- mods/ra/mod.yaml | 1 + mods/ts/mod.yaml | 1 + 15 files changed, 725 insertions(+), 390 deletions(-) create mode 100644 mods/cnc/chrome/lobby-music.yaml create mode 100644 mods/ra/chrome/lobby-music.yaml diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index c7e4930079..df715396d3 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic readonly Ruleset modRules; readonly World shellmapWorld; - enum PanelType { Players, Options, Kick, ForceStart } + enum PanelType { Players, Options, Music, Kick, ForceStart } PanelType panel = PanelType.Players; readonly Widget lobby; @@ -276,10 +276,27 @@ namespace OpenRA.Mods.Common.Widgets.Logic var optionsBin = Ui.LoadWidget("LOBBY_OPTIONS_BIN", lobby.Get("TOP_PANELS_ROOT"), new WidgetArgs()); optionsBin.IsVisible = () => panel == PanelType.Options; - var optionsButton = lobby.Get("OPTIONS_BUTTON"); - optionsButton.IsDisabled = () => Map.RuleStatus != MapRuleStatus.Cached || panel == PanelType.Kick || panel == PanelType.ForceStart; - optionsButton.GetText = () => panel == PanelType.Options ? "Players" : "Options"; - optionsButton.OnClick = () => panel = (panel == PanelType.Options) ? PanelType.Players : PanelType.Options; + var musicBin = Ui.LoadWidget("LOBBY_MUSIC_BIN", lobby.Get("TOP_PANELS_ROOT"), new WidgetArgs + { + { "onExit", DoNothing }, + { "world", worldRenderer.World } + }); + musicBin.IsVisible = () => panel == PanelType.Music; + + var optionsTab = lobby.Get("OPTIONS_TAB"); + optionsTab.IsHighlighted = () => panel == PanelType.Options; + optionsTab.IsDisabled = () => Map.RuleStatus != MapRuleStatus.Cached || panel == PanelType.Kick || panel == PanelType.ForceStart; + optionsTab.OnClick = () => panel = PanelType.Options; + + var playersTab = lobby.Get("PLAYERS_TAB"); + playersTab.IsHighlighted = () => panel == PanelType.Players; + playersTab.IsDisabled = () => panel == PanelType.Kick || panel == PanelType.ForceStart; + playersTab.OnClick = () => panel = PanelType.Players; + + var musicTab = lobby.GetOrNull("MUSIC_TAB"); + musicTab.IsHighlighted = () => panel == PanelType.Music; + musicTab.IsDisabled = () => panel == PanelType.Kick || panel == PanelType.ForceStart; + musicTab.OnClick = () => panel = PanelType.Music; // Force start panel Action startGame = () => @@ -584,14 +601,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic chatTemplate = chatPanel.Get("CHAT_TEMPLATE"); chatPanel.RemoveChildren(); - var musicButton = lobby.GetOrNull("MUSIC_BUTTON"); - if (musicButton != null) - musicButton.OnClick = () => Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs - { - { "onExit", DoNothing }, - { "world", worldRenderer.World } - }); - var settingsButton = lobby.GetOrNull("SETTINGS_BUTTON"); if (settingsButton != null) { diff --git a/OpenRA.Mods.Common/Widgets/Logic/MusicPlayerLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MusicPlayerLogic.cs index 0279ad9c9a..d13f2fb49f 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MusicPlayerLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MusicPlayerLogic.cs @@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic [ObjectCreator.UseCtor] public MusicPlayerLogic(Widget widget, Ruleset modRules, World world, Action onExit) { - var panel = widget.Get("MUSIC_PANEL"); + var panel = widget; musicList = panel.Get("MUSIC_LIST"); itemTemplate = musicList.Get("MUSIC_TEMPLATE"); @@ -83,6 +83,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic return "{0:D2}:{1:D2} / {2:D2}:{3:D2}".F(minutes, seconds, totalMinutes, totalSeconds); }; + var musicTitle = panel.GetOrNull("TITLE_LABEL"); + if (musicTitle != null) + musicTitle.GetText = () => currentSong != null ? currentSong.Title : "No song playing"; + var musicSlider = panel.Get("MUSIC_SLIDER"); musicSlider.OnChange += x => Game.Sound.MusicVolume = x; musicSlider.Value = Game.Sound.MusicVolume; @@ -114,7 +118,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic }; } - panel.Get("BACK_BUTTON").OnClick = () => { Game.Settings.Save(); Ui.CloseWindow(); onExit(); }; + var backButton = panel.GetOrNull("BACK_BUTTON"); + if (backButton != null) + backButton.OnClick = () => { Game.Settings.Save(); Ui.CloseWindow(); onExit(); }; } public void BuildMusicTable() diff --git a/mods/cnc/chrome/lobby-mappreview.yaml b/mods/cnc/chrome/lobby-mappreview.yaml index 4014fafccd..2abd53ae87 100644 --- a/mods/cnc/chrome/lobby-mappreview.yaml +++ b/mods/cnc/chrome/lobby-mappreview.yaml @@ -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 diff --git a/mods/cnc/chrome/lobby-music.yaml b/mods/cnc/chrome/lobby-music.yaml new file mode 100644 index 0000000000..73a3f53987 --- /dev/null +++ b/mods/cnc/chrome/lobby-music.yaml @@ -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. \ No newline at end of file diff --git a/mods/cnc/chrome/lobby-players.yaml b/mods/cnc/chrome/lobby-players.yaml index dc05ea8e6b..4faa495496 100644 --- a/mods/cnc/chrome/lobby-players.yaml +++ b/mods/cnc/chrome/lobby-players.yaml @@ -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 diff --git a/mods/cnc/chrome/lobby.yaml b/mods/cnc/chrome/lobby.yaml index b5a6088293..ee58aaece7 100644 --- a/mods/cnc/chrome/lobby.yaml +++ b/mods/cnc/chrome/lobby.yaml @@ -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: diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index 147a4fc4f0..7e07ece016 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -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 diff --git a/mods/d2k/chrome/lobby-players.yaml b/mods/d2k/chrome/lobby-players.yaml index bd0b74b2b2..c74f14470e 100644 --- a/mods/d2k/chrome/lobby-players.yaml +++ b/mods/d2k/chrome/lobby-players.yaml @@ -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: 23 - Height: 23 X: 4 Y: 2 + Width: 23 + Height: 23 Label@FACTIONNAME: - Text: Faction + X: 34 Width: 70 Height: 25 - X: 34 - 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: + X: 270 Width: 160 Height: 25 - X: 280 - Y: 0 Children: Image@FACTIONFLAG: - Width: 23 - Height: 23 X: 4 Y: 2 + Width: 23 + Height: 23 Label@FACTIONNAME: - Text: Faction + X: 34 Width: 60 Height: 25 - X: 34 - Y: 0 + Text: Faction Label@TEAM: + X: 410 + Width: 23 + Height: 25 + Align: Center 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 Width: 165 Height: 25 + Text: Name + DropDownButton@SLOT_OPTIONS: X: 15 - Y: 0 + Width: 165 + Height: 25 + Text: Name Visible: false Button@JOIN: - Text: Play in this slot - Width: 336 - Height: 25 X: 190 - Y: 0 + Width: 326 + Height: 25 + Text: Play in this slot 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 + Width: 160 + Height: 25 + 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 Text: Allow Spectators? + Font: Regular 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 diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index 345fec1a1d..28cf1f6583 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -88,6 +88,7 @@ ChromeLayout: ./mods/ra/chrome/lobby-mappreview.yaml ./mods/d2k/chrome/lobby-players.yaml ./mods/d2k/chrome/lobby-options.yaml + ./mods/ra/chrome/lobby-music.yaml ./mods/ra/chrome/lobby-kickdialogs.yaml ./mods/d2k/chrome/color-picker.yaml ./mods/ra/chrome/map-chooser.yaml diff --git a/mods/ra/chrome/lobby-mappreview.yaml b/mods/ra/chrome/lobby-mappreview.yaml index 3b500c55b8..921a9f2fb8 100644 --- a/mods/ra/chrome/lobby-mappreview.yaml +++ b/mods/ra/chrome/lobby-mappreview.yaml @@ -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 - diff --git a/mods/ra/chrome/lobby-music.yaml b/mods/ra/chrome/lobby-music.yaml new file mode 100644 index 0000000000..c1a4a2f2bf --- /dev/null +++ b/mods/ra/chrome/lobby-music.yaml @@ -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. \ No newline at end of file diff --git a/mods/ra/chrome/lobby-players.yaml b/mods/ra/chrome/lobby-players.yaml index 004a7661af..d6cffde910 100644 --- a/mods/ra/chrome/lobby-players.yaml +++ b/mods/ra/chrome/lobby-players.yaml @@ -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 diff --git a/mods/ra/chrome/lobby.yaml b/mods/ra/chrome/lobby.yaml index 61ab1932b6..2a76afce64 100644 --- a/mods/ra/chrome/lobby.yaml +++ b/mods/ra/chrome/lobby.yaml @@ -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 diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 56996c546f..833f73638c 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -99,6 +99,7 @@ ChromeLayout: ./mods/ra/chrome/lobby-mappreview.yaml ./mods/ra/chrome/lobby-players.yaml ./mods/ra/chrome/lobby-options.yaml + ./mods/ra/chrome/lobby-music.yaml ./mods/ra/chrome/lobby-kickdialogs.yaml ./mods/ra/chrome/color-picker.yaml ./mods/ra/chrome/map-chooser.yaml diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index 9f9b6b58dc..1286af45f0 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -153,6 +153,7 @@ ChromeLayout: ./mods/ra/chrome/lobby-mappreview.yaml ./mods/ra/chrome/lobby-players.yaml ./mods/ra/chrome/lobby-options.yaml + ./mods/ra/chrome/lobby-music.yaml ./mods/ra/chrome/lobby-kickdialogs.yaml ./mods/ts/chrome/color-picker.yaml ./mods/ra/chrome/map-chooser.yaml