Improve RA main menu design

This commit is contained in:
Scott_NZ
2013-05-01 22:08:28 +12:00
parent 6da0db0035
commit d4cd05c2ea
4 changed files with 107 additions and 70 deletions

View File

@@ -27,6 +27,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
rootMenu.IsVisible = () => Menu == MenuType.Main; rootMenu.IsVisible = () => Menu == MenuType.Main;
Game.modData.WidgetLoader.LoadWidget( new WidgetArgs(), Ui.Root, "PERF_BG" ); Game.modData.WidgetLoader.LoadWidget( new WidgetArgs(), Ui.Root, "PERF_BG" );
var versionLabel = Ui.Root.GetOrNull<LabelWidget>("VERSION_LABEL");
if (versionLabel != null)
versionLabel.GetText = WidgetUtils.ActiveModVersion;
widget.Get<ButtonWidget>("MAINMENU_BUTTON_JOIN").OnClick = () => OpenGamePanel("JOINSERVER_BG"); widget.Get<ButtonWidget>("MAINMENU_BUTTON_JOIN").OnClick = () => OpenGamePanel("JOINSERVER_BG");
widget.Get<ButtonWidget>("MAINMENU_BUTTON_CREATE").OnClick = () => OpenGamePanel("CREATESERVER_BG"); widget.Get<ButtonWidget>("MAINMENU_BUTTON_CREATE").OnClick = () => OpenGamePanel("CREATESERVER_BG");

View File

@@ -525,4 +525,18 @@ scrollitem-hover: dialog.png
corner-tl: 512,0,1,1 corner-tl: 512,0,1,1
corner-tr: 594,0,1,1 corner-tr: 594,0,1,1
corner-bl: 512,82,1,1 corner-bl: 512,82,1,1
corner-br: 594,82,1,1 corner-br: 594,82,1,1
logos: loadscreen.png
logo: 0,0,256,256
mainmenu-border: dialog.png
background: 552,313,40,40
border-r: 592,313,40,40
border-l: 512,313,40,40
border-b: 552,353,40,40
border-t: 552,273,40,40
corner-tl: 512,273,40,40
corner-tr: 592,273,40,40
corner-bl: 512,353,40,40
corner-br: 592,353,40,40

View File

@@ -1,75 +1,95 @@
Background@MAINMENU: Container@MAINMENU:
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:250
Height:420
Visible:true
Logic:MainMenuButtonsLogic
Children: Children:
Label@MAINMENU_LABEL_TITLE: Background@BORDER:
X:0 Background:mainmenu-border
Y:20 X:0 - 15
Width:250 Y:0 - 15
Width:WINDOW_RIGHT + 30
Height:WINDOW_BOTTOM + 30
Image@LOGO:
X:WINDOW_RIGHT - 296
Y:30
ImageCollection:logos
ImageName:logo
Label@VERSION_LABEL:
X:WINDOW_RIGHT - 296
Y:296 - 20 # border
Width:296 - 20
Height:25 Height:25
Text:OpenRA Main Menu
Align:Center Align:Center
Font:Bold Font:Regular
Button@MAINMENU_BUTTON_JOIN: Contrast:True
X:45 Background@MAINMENU_BG:
Y:70 X:(WINDOW_RIGHT - WIDTH)/8
Width:160 Y:(WINDOW_BOTTOM - HEIGHT)/2
Height:25 Width:250
Text:Join Game Height:505
Font:Bold Logic:MainMenuButtonsLogic
Button@MAINMENU_BUTTON_CREATE: Children:
X:45 Label@MAINMENU_LABEL_TITLE:
Y:110 X:0
Width:160 Y:20
Height:25 Width:250
Text:Create Game Height:35
Font:Bold Text:OpenRA
Button@MAINMENU_BUTTON_DIRECTCONNECT: Align:Center
X:45 Font:Title
Y:150 Button@MAINMENU_BUTTON_JOIN:
Width:160 X:45
Height:25 Y:80
Text:Direct Connect Width:160
Font:Bold Height:35
Button@MAINMENU_BUTTON_SETTINGS: Text:Join Game
X:45 Font:Bold
Y:190 Button@MAINMENU_BUTTON_CREATE:
Width:160 X:45
Height:25 Y:130
Text:Settings Width:160
Font:Bold Height:35
Button@MAINMENU_BUTTON_MODS: Text:Create Game
X:45 Font:Bold
Y:230 Button@MAINMENU_BUTTON_DIRECTCONNECT:
Width:160 X:45
Height:25 Y:180
Text:Mods Width:160
Font:Bold Height:35
Button@MAINMENU_BUTTON_MUSIC: Text:Direct Connect
X:45 Font:Bold
Y:270 Button@MAINMENU_BUTTON_SETTINGS:
Width:160 X:45
Height:25 Y:230
Text:Music Width:160
Font:Bold Height:35
Button@MAINMENU_BUTTON_REPLAY_VIEWER: Text:Settings
X:45 Font:Bold
Y:310 Button@MAINMENU_BUTTON_MODS:
Width:160 X:45
Height:25 Y:280
Text:Replay Viewer Width:160
Font:Bold Height:35
Button@MAINMENU_BUTTON_QUIT: Text:Mods
X:45 Font:Bold
Y:350 Button@MAINMENU_BUTTON_MUSIC:
Width:160 X:45
Height:25 Y:330
Text:Quit Width:160
Font:Bold Height:35
Text:Music
Font:Bold
Button@MAINMENU_BUTTON_REPLAY_VIEWER:
X:45
Y:380
Width:160
Height:35
Text:Replay Viewer
Font:Bold
Button@MAINMENU_BUTTON_QUIT:
X:45
Y:430
Width:160
Height:35
Text:Quit
Font:Bold
Background@PERF_BG: Background@PERF_BG:
ClickThrough:true ClickThrough:true
Background:dialog4 Background:dialog4

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 35 KiB