diff --git a/OpenRA.Game/Widgets/ScrollPanelWidget.cs b/OpenRA.Game/Widgets/ScrollPanelWidget.cs index 993ba920b4..35f178b38d 100644 --- a/OpenRA.Game/Widgets/ScrollPanelWidget.cs +++ b/OpenRA.Game/Widgets/ScrollPanelWidget.cs @@ -10,6 +10,7 @@ using System.Drawing; using OpenRA.Graphics; +using System; namespace OpenRA.Widgets { @@ -29,6 +30,7 @@ namespace OpenRA.Widgets Rectangle downButtonRect; Rectangle backgroundRect; Rectangle scrollbarRect; + Rectangle thumbRect; public ScrollPanelWidget() : base() {} protected ScrollPanelWidget(ScrollPanelWidget other) @@ -39,6 +41,7 @@ namespace OpenRA.Widgets downButtonRect = other.downButtonRect; scrollbarRect = other.scrollbarRect; backgroundRect = other.backgroundRect; + thumbRect = other.thumbRect; UpPressed = other.UpPressed; DownPressed = other.DownPressed; @@ -49,20 +52,31 @@ namespace OpenRA.Widgets { if (!IsVisible()) return; - + + // Height/ContentHeight*Height + var ScrollbarHeight = RenderBounds.Height - 2 * ScrollbarWidth; + + var thumbHeight = ContentHeight == 0 ? 0 : (int)(ScrollbarHeight*Math.Min(RenderBounds.Height*1f/ContentHeight, 1f)); + var thumbOrigin = RenderBounds.Y + ScrollbarWidth + (int)((ScrollbarHeight - thumbHeight)*(-1f*ListOffset/(ContentHeight - RenderBounds.Height))); + backgroundRect = new Rectangle(RenderBounds.X, RenderBounds.Y, RenderBounds.Width - ScrollbarWidth, RenderBounds.Height); upButtonRect = new Rectangle(RenderBounds.Right - ScrollbarWidth, RenderBounds.Y, ScrollbarWidth, ScrollbarWidth); downButtonRect = new Rectangle(RenderBounds.Right - ScrollbarWidth, RenderBounds.Bottom - ScrollbarWidth, ScrollbarWidth, ScrollbarWidth); - scrollbarRect = new Rectangle(RenderBounds.Right - ScrollbarWidth, RenderBounds.Y + ScrollbarWidth, ScrollbarWidth, RenderBounds.Height - 2 * ScrollbarWidth); - - string upButtonBg = (UpPressed) ? "dialog3" : "dialog2"; - string downButtonBg = (DownPressed) ? "dialog3" : "dialog2"; + scrollbarRect = new Rectangle(RenderBounds.Right - ScrollbarWidth, RenderBounds.Y + ScrollbarWidth, ScrollbarWidth, ScrollbarHeight); + thumbRect = new Rectangle(RenderBounds.Right - ScrollbarWidth, thumbOrigin, ScrollbarWidth, thumbHeight); + + string upButtonBg = UpPressed ? "dialog3" : "dialog2"; + string downButtonBg = DownPressed ? "dialog3" : "dialog2"; string scrollbarBg = "dialog3"; + string thumbBg = "dialog2"; WidgetUtils.DrawPanel(Background, backgroundRect); WidgetUtils.DrawPanel(upButtonBg, upButtonRect); WidgetUtils.DrawPanel(downButtonBg, downButtonRect); WidgetUtils.DrawPanel(scrollbarBg, scrollbarRect); + + if (thumbHeight > 0) + WidgetUtils.DrawPanel(thumbBg, thumbRect); var upOffset = UpPressed ? 4 : 3; var downOffset = DownPressed ? 4 : 3; @@ -91,7 +105,7 @@ namespace OpenRA.Widgets if (UpPressed && ListOffset <= 0) ListOffset += ScrollVelocity; if (DownPressed) ListOffset -= ScrollVelocity; - if (ListOffset > 0) ListOffset = 0; + ListOffset = Math.Min(0,Math.Max(RenderBounds.Height - ContentHeight, ListOffset)); } public override bool LoseFocus (MouseInput mi) diff --git a/OpenRA.Mods.RA/Widgets/Delegates/LobbyDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/LobbyDelegate.cs index bf034ce84a..62807605ef 100755 --- a/OpenRA.Mods.RA/Widgets/Delegates/LobbyDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/LobbyDelegate.cs @@ -21,8 +21,8 @@ namespace OpenRA.Mods.RA.Widgets.Delegates { public class LobbyDelegate : IWidgetDelegate { - Widget Players, LocalPlayerTemplate, RemotePlayerTemplate, EmptySlotTemplate, EmptySlotTemplateHost; - + Widget LocalPlayerTemplate, RemotePlayerTemplate, EmptySlotTemplate, EmptySlotTemplateHost; + ScrollPanelWidget Players; Dictionary CountryNames; string MapUid; Map Map; @@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates CurrentColorPreview1 = Game.Settings.Player.Color1; CurrentColorPreview2 = Game.Settings.Player.Color2; - Players = lobby.GetWidget("PLAYERS"); + Players = lobby.GetWidget("PLAYERS"); LocalPlayerTemplate = Players.GetWidget("TEMPLATE_LOCAL"); RemotePlayerTemplate = Players.GetWidget("TEMPLATE_REMOTE"); EmptySlotTemplate = Players.GetWidget("TEMPLATE_EMPTY"); @@ -73,7 +73,6 @@ namespace OpenRA.Mods.RA.Widgets.Delegates }; CountryNames = Rules.Info["world"].Traits.WithInterface().ToDictionary(a => a.Race, a => a.Name); - CountryNames.Add("random", "Random"); var mapButton = lobby.GetWidget("CHANGEMAP_BUTTON"); @@ -295,7 +294,8 @@ namespace OpenRA.Mods.RA.Widgets.Delegates // This causes problems for people who are in the process of editing their names (the widgets vanish from beneath them) // Todo: handle this nicer Players.Children.Clear(); - + Players.ContentHeight = 0; + int offset = 0; foreach (var slot in orderManager.LobbyInfo.Slots) { @@ -448,12 +448,18 @@ namespace OpenRA.Mods.RA.Widgets.Delegates template.Id = "SLOT_{0}".F(s.Index); template.Parent = Players; - template.Bounds = new Rectangle(0, offset, template.Bounds.Width, template.Bounds.Height); + template.Bounds = new Rectangle(template.Bounds.X, template.Bounds.Y + offset, template.Bounds.Width, template.Bounds.Height); template.IsVisible = () => true; Players.AddChild(template); offset += template.Bounds.Height; - } + + // Hack to ensure correct ContentHeight + if (Players.ContentHeight == 0) + Players.ContentHeight += template.Bounds.Y; + + Players.ContentHeight += template.Bounds.Height; + } } bool SpawnPointAvailable(int index) { return (index == 0) || orderManager.LobbyInfo.Clients.All(c => c.SpawnPoint != index); } diff --git a/OpenRA.Mods.RA/Widgets/Delegates/MapChooserDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/MapChooserDelegate.cs index b0906f5b6b..fce6ff1788 100644 --- a/OpenRA.Mods.RA/Widgets/Delegates/MapChooserDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/MapChooserDelegate.cs @@ -74,6 +74,10 @@ namespace OpenRA.Mods.RA.Widgets.Delegates ml.AddChild(template); offset += template.Bounds.Height; + + // Padding hack + if (ml.ContentHeight == 0) + ml.ContentHeight += 2*template.Bounds.Y; ml.ContentHeight += template.Bounds.Height; } } diff --git a/OpenRA.Mods.RA/Widgets/Delegates/MusicPlayerDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/MusicPlayerDelegate.cs index 1e38c2586c..03fb19f0b8 100644 --- a/OpenRA.Mods.RA/Widgets/Delegates/MusicPlayerDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/MusicPlayerDelegate.cs @@ -133,7 +133,13 @@ namespace OpenRA.Mods.RA.Widgets.Delegates ml.AddChild(template); offset += template.Bounds.Height; + + // Padding hack + if (ml.ContentHeight == 0) + ml.ContentHeight += 2*template.Bounds.Y; + ml.ContentHeight += template.Bounds.Height; + } } diff --git a/OpenRA.Mods.RA/Widgets/Delegates/ReplayBrowserDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/ReplayBrowserDelegate.cs index 09753a3055..c76c8ee125 100644 --- a/OpenRA.Mods.RA/Widgets/Delegates/ReplayBrowserDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/ReplayBrowserDelegate.cs @@ -116,6 +116,10 @@ namespace OpenRA.Mods.RA.Widgets.Delegates CurrentReplay = filename; offset += template.Bounds.Height; + // Padding hack + if (list.ContentHeight == 0) + list.ContentHeight += 2*template.Bounds.Y; + list.ContentHeight += template.Bounds.Height; } } diff --git a/OpenRA.Mods.RA/Widgets/Delegates/ServerBrowserDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/ServerBrowserDelegate.cs index b4fbc95509..3cd2b10292 100644 --- a/OpenRA.Mods.RA/Widgets/Delegates/ServerBrowserDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/ServerBrowserDelegate.cs @@ -183,6 +183,10 @@ namespace OpenRA.Mods.RA.Widgets.Delegates if (i == 0) currentServer = game; offset += template.Bounds.Height; + // Padding hack + if (sl.ContentHeight == 0) + sl.ContentHeight += 2*template.Bounds.Y; + sl.ContentHeight += template.Bounds.Height; i++; } diff --git a/mods/cnc/chrome/gamelobby.yaml b/mods/cnc/chrome/gamelobby.yaml index 654b369488..e3a7591e8d 100644 --- a/mods/cnc/chrome/gamelobby.yaml +++ b/mods/cnc/chrome/gamelobby.yaml @@ -28,225 +28,218 @@ Background@SERVER_LOBBY: Y:4 Width:244 Height:244 - ScrollPanel@PLAYERSX: - Id:PLAYERSX + ScrollPanel@PLAYERS: + Id:PLAYERS X:20 Y:67 Width:504 Height:235 Children: - Container@PLAYERS: - Id:PLAYERS + Container@TEMPLATE_LOCAL: + Id:TEMPLATE_LOCAL X:5 Y:5 - Width:500 - Height:2270 + Width:475 + Height:30 + Visible:false Children: - Container@TEMPLATE_LOCAL: - Id:TEMPLATE_LOCAL + TextField@NAME: + Id:NAME + Text:Name + Width:150 + Height:25 X:0 Y:0 - Width:475 - Height:30 - Visible:false - Children: - TextField@NAME: - Id:NAME - Text:Name - Width:150 - Height:25 - X:0 - Y:0 - MaxLength:16 - DropDownButton@COLOR: - Id:COLOR - Width:80 - Height:25 - X:160 - Y:0 - Children: - ColorBlock@COLORBLOCK: - Id:COLORBLOCK - X:5 - Y:6 - Width:PARENT_RIGHT-35 - Height:PARENT_BOTTOM-12 - DropDownButton@FACTION: - Id:FACTION - Width:130 - Height:25 - X:250 - Y:0 - Children: - Image@FACTIONFLAG: - Id:FACTIONFLAG - Width:30 - Height:15 - X:5 - Y:5 - Label@FACTIONNAME: - Id:FACTIONNAME - Text:Faction - Width:60 - Height:25 - X:40 - Y:0 - DropDownButton@TEAM: - Id:TEAM - Text:Team - Width:48 - Height:25 - X:390 - Y:0 - Checkbox@STATUS: - Id:STATUS - X:448 - Y:2 - Width:20 - Height:20 - Label@SPECTATOR: - Id:SPECTATOR - Text:Spectator - Width:278 - Height:25 - X:160 - Y:0 - Align:Center - Bold:True - Container@TEMPLATE_REMOTE: - Id:TEMPLATE_REMOTE - X:0 + MaxLength:16 + DropDownButton@COLOR: + Id:COLOR + Width:80 + Height:25 + X:160 Y:0 - Width:475 - Height:30 - Visible:false Children: - Label@NAME: - Id:NAME - Text:Name - Width:145 - Height:25 + ColorBlock@COLORBLOCK: + Id:COLORBLOCK X:5 - Y:0-1 - Button@KICK: - Id:KICK - Text:X - Width:25 - Height:23 - X:125 - Y:2 - Bold:Yes - ColorBlock@COLOR: - Id:COLOR - X:165 Y:6 - Width:45 - Height:13 - Label@FACTION: - Id:FACTION - Width:130 - Height:25 - X:250 - Y:0 - Children: - Image@FACTIONFLAG: - Id:FACTIONFLAG - Width:30 - Height:15 - X:5 - Y:5 - Label@FACTIONNAME: - Id:FACTIONNAME - Text:Faction - Width:60 - Height:25 - X:40 - Y:0 - Label@TEAM: - Id:TEAM - Text:Team - Width:23 - Height:25 - Align:Center - X:390 - Y:0 - Checkbox@STATUS: - Id:STATUS - X:448 - Y:2 - Width:20 - Height:20 - Label@SPECTATOR: - Id:SPECTATOR - Text:Spectator - Width:278 - Height:25 - X:160 - Y:0 - Align:Center - Bold:True - Container@TEMPLATE_EMPTY: - Id:TEMPLATE_EMPTY - X:0 + Width:PARENT_RIGHT-35 + Height:PARENT_BOTTOM-12 + DropDownButton@FACTION: + Id:FACTION + Width:130 + Height:25 + X:250 Y:0 - Width:475 - Height:30 - Visible:false Children: - Label@NAME: - Id:NAME - Text:Name - Width:145 - Height:25 + Image@FACTIONFLAG: + Id:FACTIONFLAG + Width:30 + Height:15 X:5 - Y:0-1 - Button@JOIN: - Id:JOIN - Text:Play in this slot - Width:278 + Y:5 + Label@FACTIONNAME: + Id:FACTIONNAME + Text:Faction + Width:60 Height:25 - X:160 + X:40 Y:0 - Label@BOT: - Id:BOT - Text:Bot - Width:278 + DropDownButton@TEAM: + Id:TEAM + Text:Team + Width:48 + Height:25 + X:390 + Y:0 + Checkbox@STATUS: + Id:STATUS + X:448 + Y:2 + Width:20 + Height:20 + Label@SPECTATOR: + Id:SPECTATOR + Text:Spectator + Width:278 + Height:25 + X:160 + Y:0 + Align:Center + Bold:True + Container@TEMPLATE_REMOTE: + Id:TEMPLATE_REMOTE + X:5 + Y:5 + Width:475 + Height:30 + Visible:false + Children: + Label@NAME: + Id:NAME + Text:Name + Width:145 + Height:25 + X:5 + Y:0-1 + Button@KICK: + Id:KICK + Text:X + Width:25 + Height:23 + X:125 + Y:2 + Bold:Yes + ColorBlock@COLOR: + Id:COLOR + X:165 + Y:6 + Width:45 + Height:13 + Label@FACTION: + Id:FACTION + Width:130 + Height:25 + X:250 + Y:0 + Children: + Image@FACTIONFLAG: + Id:FACTIONFLAG + Width:30 + Height:15 + X:5 + Y:5 + Label@FACTIONNAME: + Id:FACTIONNAME + Text:Faction + Width:60 Height:25 - X:160 + X:40 Y:0 - Align:Center - Bold:True - Container@TEMPLATE_EMPTY_HOST: - Id:TEMPLATE_EMPTY_HOST + Label@TEAM: + Id:TEAM + Text:Team + Width:23 + Height:25 + Align:Center + X:390 + Y:0 + Checkbox@STATUS: + Id:STATUS + X:448 + Y:2 + Width:20 + Height:20 + Label@SPECTATOR: + Id:SPECTATOR + Text:Spectator + Width:278 + Height:25 + X:160 + Y:0 + Align:Center + Bold:True + Container@TEMPLATE_EMPTY: + Id:TEMPLATE_EMPTY + X:5 + Y:5 + Width:475 + Height:30 + Visible:false + Children: + Label@NAME: + Id:NAME + Text:Name + Width:145 + Height:25 + X:5 + Y:0-1 + Button@JOIN: + Id:JOIN + Text:Play in this slot + Width:278 + Height:25 + X:160 + Y:0 + Label@BOT: + Id:BOT + Text:Bot + Width:278 + Height:25 + X:160 + Y:0 + Align:Center + Bold:True + Container@TEMPLATE_EMPTY_HOST: + Id:TEMPLATE_EMPTY_HOST + X:5 + Y:5 + Width:400 + Height:30 + Visible:false + Children: + DropDownButton@NAME: + Id:NAME + Text:Name + Width:150 + Height:25 X:0 Y:0 - Width:400 - Height:30 - Visible:false - Children: - DropDownButton@NAME: - Id:NAME - Text:Name - Width:150 - Height:25 - X:0 - Y:0 - Button@JOIN: - Id:JOIN - Text:Play in this slot - Width:278 - Height:25 - X:160 - Y:0 - Label@BOT: - Id:BOT - Text:Bot - Width:278 - Height:25 - X:160 - Y:0 - Align:Center - Bold:True + Button@JOIN: + Id:JOIN + Text:Play in this slot + Width:278 + Height:25 + X:160 + Y:0 + Label@BOT: + Id:BOT + Text:Bot + Width:278 + Height:25 + X:160 + Y:0 + Align:Center + Bold:True Container@LABEL_CONTAINER: X:25 Y:40 diff --git a/mods/cnc/chrome/mainmenu.yaml b/mods/cnc/chrome/mainmenu.yaml index 7013d9b680..011ab2a716 100644 --- a/mods/cnc/chrome/mainmenu.yaml +++ b/mods/cnc/chrome/mainmenu.yaml @@ -220,7 +220,7 @@ Background@MUSIC_MENU: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Children: Label@TITLE: diff --git a/mods/cnc/chrome/replaybrowser.yaml b/mods/cnc/chrome/replaybrowser.yaml index 72baeba2c3..07ba33fed9 100644 --- a/mods/cnc/chrome/replaybrowser.yaml +++ b/mods/cnc/chrome/replaybrowser.yaml @@ -28,7 +28,7 @@ Background@REPLAYBROWSER_BG: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Container@REPLAY_INFO: Id:REPLAY_INFO diff --git a/mods/cnc/chrome/serverbrowser.yaml b/mods/cnc/chrome/serverbrowser.yaml index 17f6229265..6e3bc8033a 100644 --- a/mods/cnc/chrome/serverbrowser.yaml +++ b/mods/cnc/chrome/serverbrowser.yaml @@ -122,7 +122,7 @@ Background@JOINSERVER_BG: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Label@JOINSERVER_PROGRESS_TITLE: Id:JOINSERVER_PROGRESS_TITLE diff --git a/mods/cnc/chrome/videoplayer.yaml b/mods/cnc/chrome/videoplayer.yaml index 38eeff162a..7e2e596f5f 100644 --- a/mods/cnc/chrome/videoplayer.yaml +++ b/mods/cnc/chrome/videoplayer.yaml @@ -33,7 +33,7 @@ Background@VIDEOPLAYER_MENU: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Button@BUTTON_PLAYPAUSE: Id:BUTTON_PLAYPAUSE diff --git a/mods/d2k/chrome/gamelobby.yaml b/mods/d2k/chrome/gamelobby.yaml index c63d53c9d7..80731b8b8b 100644 --- a/mods/d2k/chrome/gamelobby.yaml +++ b/mods/d2k/chrome/gamelobby.yaml @@ -419,7 +419,7 @@ Background@MAP_CHOOSER: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Background@MAPCHOOSER_MAP_BG: X:PARENT_RIGHT-268 diff --git a/mods/d2k/chrome/mainmenu.yaml b/mods/d2k/chrome/mainmenu.yaml index b02efcb949..eb318e6d7a 100644 --- a/mods/d2k/chrome/mainmenu.yaml +++ b/mods/d2k/chrome/mainmenu.yaml @@ -222,7 +222,7 @@ Background@MUSIC_MENU: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Children: Label@TITLE: diff --git a/mods/d2k/chrome/serverbrowser.yaml b/mods/d2k/chrome/serverbrowser.yaml index ce68c4b4c6..1856e6ac8b 100644 --- a/mods/d2k/chrome/serverbrowser.yaml +++ b/mods/d2k/chrome/serverbrowser.yaml @@ -124,7 +124,7 @@ Background@JOINSERVER_BG: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Label@JOINSERVER_PROGRESS_TITLE: Id:JOINSERVER_PROGRESS_TITLE diff --git a/mods/d2k/chrome/videoplayer.yaml b/mods/d2k/chrome/videoplayer.yaml index 08448de714..b01a9e1834 100644 --- a/mods/d2k/chrome/videoplayer.yaml +++ b/mods/d2k/chrome/videoplayer.yaml @@ -34,7 +34,7 @@ Background@VIDEOPLAYER_MENU: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Button@BUTTON_PLAYPAUSE: Id:BUTTON_PLAYPAUSE diff --git a/mods/ra/chrome/gamelobby.yaml b/mods/ra/chrome/gamelobby.yaml index 68587876d9..5edee77359 100644 --- a/mods/ra/chrome/gamelobby.yaml +++ b/mods/ra/chrome/gamelobby.yaml @@ -28,225 +28,218 @@ Background@SERVER_LOBBY: Y:4 Width:244 Height:244 - ScrollPanel@PLAYERSX: - Id:PLAYERSX + ScrollPanel@PLAYERS: + Id:PLAYERS X:20 Y:67 Width:504 Height:235 Children: - Container@PLAYERS: - Id:PLAYERS + Container@TEMPLATE_LOCAL: + Id:TEMPLATE_LOCAL X:5 Y:5 - Width:500 - Height:2270 + Width:475 + Height:30 + Visible:false Children: - Container@TEMPLATE_LOCAL: - Id:TEMPLATE_LOCAL + TextField@NAME: + Id:NAME + Text:Name + Width:150 + Height:25 X:0 Y:0 - Width:475 - Height:30 - Visible:false - Children: - TextField@NAME: - Id:NAME - Text:Name - Width:150 - Height:25 - X:0 - Y:0 - MaxLength:16 - DropDownButton@COLOR: - Id:COLOR - Width:80 - Height:25 - X:160 - Y:0 - Children: - ColorBlock@COLORBLOCK: - Id:COLORBLOCK - X:5 - Y:6 - Width:PARENT_RIGHT-35 - Height:PARENT_BOTTOM-12 - DropDownButton@FACTION: - Id:FACTION - Width:130 - Height:25 - X:250 - Y:0 - Children: - Image@FACTIONFLAG: - Id:FACTIONFLAG - Width:30 - Height:15 - X:5 - Y:5 - Label@FACTIONNAME: - Id:FACTIONNAME - Text:Faction - Width:60 - Height:25 - X:40 - Y:0 - DropDownButton@TEAM: - Id:TEAM - Text:Team - Width:48 - Height:25 - X:390 - Y:0 - Checkbox@STATUS: - Id:STATUS - X:448 - Y:2 - Width:20 - Height:20 - Label@SPECTATOR: - Id:SPECTATOR - Text:Spectator - Width:278 - Height:25 - X:160 - Y:0 - Align:Center - Bold:True - Container@TEMPLATE_REMOTE: - Id:TEMPLATE_REMOTE - X:0 + MaxLength:16 + DropDownButton@COLOR: + Id:COLOR + Width:80 + Height:25 + X:160 Y:0 - Width:475 - Height:30 - Visible:false Children: - Label@NAME: - Id:NAME - Text:Name - Width:145 - Height:25 + ColorBlock@COLORBLOCK: + Id:COLORBLOCK X:5 - Y:0-1 - Button@KICK: - Id:KICK - Text:X - Width:25 - Height:23 - X:125 - Y:2 - Bold:Yes - ColorBlock@COLOR: - Id:COLOR - X:165 Y:6 - Width:45 - Height:13 - Label@FACTION: - Id:FACTION - Width:130 - Height:25 - X:250 - Y:0 - Children: - Image@FACTIONFLAG: - Id:FACTIONFLAG - Width:30 - Height:15 - X:5 - Y:5 - Label@FACTIONNAME: - Id:FACTIONNAME - Text:Faction - Width:60 - Height:25 - X:40 - Y:0 - Label@TEAM: - Id:TEAM - Text:Team - Width:23 - Height:25 - Align:Center - X:390 - Y:0 - Checkbox@STATUS: - Id:STATUS - X:448 - Y:2 - Width:20 - Height:20 - Label@SPECTATOR: - Id:SPECTATOR - Text:Spectator - Width:278 - Height:25 - X:160 - Y:0 - Align:Center - Bold:True - Container@TEMPLATE_EMPTY: - Id:TEMPLATE_EMPTY - X:0 + Width:PARENT_RIGHT-35 + Height:PARENT_BOTTOM-12 + DropDownButton@FACTION: + Id:FACTION + Width:130 + Height:25 + X:250 Y:0 - Width:475 - Height:30 - Visible:false Children: - Label@NAME: - Id:NAME - Text:Name - Width:145 - Height:25 + Image@FACTIONFLAG: + Id:FACTIONFLAG + Width:30 + Height:15 X:5 - Y:0-1 - Button@JOIN: - Id:JOIN - Text:Play in this slot - Width:278 + Y:5 + Label@FACTIONNAME: + Id:FACTIONNAME + Text:Faction + Width:60 Height:25 - X:160 + X:40 Y:0 - Label@BOT: - Id:BOT - Text:Bot - Width:278 + DropDownButton@TEAM: + Id:TEAM + Text:Team + Width:48 + Height:25 + X:390 + Y:0 + Checkbox@STATUS: + Id:STATUS + X:448 + Y:2 + Width:20 + Height:20 + Label@SPECTATOR: + Id:SPECTATOR + Text:Spectator + Width:278 + Height:25 + X:160 + Y:0 + Align:Center + Bold:True + Container@TEMPLATE_REMOTE: + Id:TEMPLATE_REMOTE + X:5 + Y:5 + Width:475 + Height:30 + Visible:false + Children: + Label@NAME: + Id:NAME + Text:Name + Width:145 + Height:25 + X:5 + Y:0-1 + Button@KICK: + Id:KICK + Text:X + Width:25 + Height:23 + X:125 + Y:2 + Bold:Yes + ColorBlock@COLOR: + Id:COLOR + X:165 + Y:6 + Width:45 + Height:13 + Label@FACTION: + Id:FACTION + Width:130 + Height:25 + X:250 + Y:0 + Children: + Image@FACTIONFLAG: + Id:FACTIONFLAG + Width:30 + Height:15 + X:5 + Y:5 + Label@FACTIONNAME: + Id:FACTIONNAME + Text:Faction + Width:60 Height:25 - X:160 + X:40 Y:0 - Align:Center - Bold:True - Container@TEMPLATE_EMPTY_HOST: - Id:TEMPLATE_EMPTY_HOST + Label@TEAM: + Id:TEAM + Text:Team + Width:23 + Height:25 + Align:Center + X:390 + Y:0 + Checkbox@STATUS: + Id:STATUS + X:448 + Y:2 + Width:20 + Height:20 + Label@SPECTATOR: + Id:SPECTATOR + Text:Spectator + Width:278 + Height:25 + X:160 + Y:0 + Align:Center + Bold:True + Container@TEMPLATE_EMPTY: + Id:TEMPLATE_EMPTY + X:5 + Y:5 + Width:475 + Height:30 + Visible:false + Children: + Label@NAME: + Id:NAME + Text:Name + Width:145 + Height:25 + X:5 + Y:0-1 + Button@JOIN: + Id:JOIN + Text:Play in this slot + Width:278 + Height:25 + X:160 + Y:0 + Label@BOT: + Id:BOT + Text:Bot + Width:278 + Height:25 + X:160 + Y:0 + Align:Center + Bold:True + Container@TEMPLATE_EMPTY_HOST: + Id:TEMPLATE_EMPTY_HOST + X:5 + Y:5 + Width:400 + Height:30 + Visible:false + Children: + DropDownButton@NAME: + Id:NAME + Text:Name + Width:150 + Height:25 X:0 Y:0 - Width:400 - Height:30 - Visible:false - Children: - DropDownButton@NAME: - Id:NAME - Text:Name - Width:150 - Height:25 - X:0 - Y:0 - Button@JOIN: - Id:JOIN - Text:Play in this slot - Width:278 - Height:25 - X:160 - Y:0 - Label@BOT: - Id:BOT - Text:Bot - Width:278 - Height:25 - X:160 - Y:0 - Align:Center - Bold:True + Button@JOIN: + Id:JOIN + Text:Play in this slot + Width:278 + Height:25 + X:160 + Y:0 + Label@BOT: + Id:BOT + Text:Bot + Width:278 + Height:25 + X:160 + Y:0 + Align:Center + Bold:True Container@LABEL_CONTAINER: X:25 Y:40 diff --git a/mods/ra/chrome/mainmenu.yaml b/mods/ra/chrome/mainmenu.yaml index 713eff510c..8ce32e576b 100644 --- a/mods/ra/chrome/mainmenu.yaml +++ b/mods/ra/chrome/mainmenu.yaml @@ -221,7 +221,7 @@ Background@MUSIC_MENU: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Children: Label@TITLE: diff --git a/mods/ra/chrome/replaybrowser.yaml b/mods/ra/chrome/replaybrowser.yaml index 72baeba2c3..07ba33fed9 100644 --- a/mods/ra/chrome/replaybrowser.yaml +++ b/mods/ra/chrome/replaybrowser.yaml @@ -28,7 +28,7 @@ Background@REPLAYBROWSER_BG: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Container@REPLAY_INFO: Id:REPLAY_INFO diff --git a/mods/ra/chrome/serverbrowser.yaml b/mods/ra/chrome/serverbrowser.yaml index 17f6229265..6e3bc8033a 100644 --- a/mods/ra/chrome/serverbrowser.yaml +++ b/mods/ra/chrome/serverbrowser.yaml @@ -122,7 +122,7 @@ Background@JOINSERVER_BG: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Label@JOINSERVER_PROGRESS_TITLE: Id:JOINSERVER_PROGRESS_TITLE diff --git a/mods/ra/chrome/videoplayer.yaml b/mods/ra/chrome/videoplayer.yaml index 38eeff162a..7e2e596f5f 100644 --- a/mods/ra/chrome/videoplayer.yaml +++ b/mods/ra/chrome/videoplayer.yaml @@ -33,7 +33,7 @@ Background@VIDEOPLAYER_MENU: Height:25 ClickThrough:false X:2 - Y:0 + Y:2 Visible:false Button@BUTTON_PLAYPAUSE: Id:BUTTON_PLAYPAUSE