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;
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_CREATE").OnClick = () => OpenGamePanel("CREATESERVER_BG");

View File

@@ -526,3 +526,17 @@ scrollitem-hover: dialog.png
corner-tr: 594,0,1,1
corner-bl: 512,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,73 +1,93 @@
Background@MAINMENU:
X:(WINDOW_RIGHT - WIDTH)/2
Container@MAINMENU:
Children:
Background@BORDER:
Background:mainmenu-border
X:0 - 15
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
Align:Center
Font:Regular
Contrast:True
Background@MAINMENU_BG:
X:(WINDOW_RIGHT - WIDTH)/8
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:250
Height:420
Visible:true
Height:505
Logic:MainMenuButtonsLogic
Children:
Label@MAINMENU_LABEL_TITLE:
X:0
Y:20
Width:250
Height:25
Text:OpenRA Main Menu
Height:35
Text:OpenRA
Align:Center
Font:Bold
Font:Title
Button@MAINMENU_BUTTON_JOIN:
X:45
Y:70
Y:80
Width:160
Height:25
Height:35
Text:Join Game
Font:Bold
Button@MAINMENU_BUTTON_CREATE:
X:45
Y:110
Y:130
Width:160
Height:25
Height:35
Text:Create Game
Font:Bold
Button@MAINMENU_BUTTON_DIRECTCONNECT:
X:45
Y:150
Y:180
Width:160
Height:25
Height:35
Text:Direct Connect
Font:Bold
Button@MAINMENU_BUTTON_SETTINGS:
X:45
Y:190
Y:230
Width:160
Height:25
Height:35
Text:Settings
Font:Bold
Button@MAINMENU_BUTTON_MODS:
X:45
Y:230
Y:280
Width:160
Height:25
Height:35
Text:Mods
Font:Bold
Button@MAINMENU_BUTTON_MUSIC:
X:45
Y:270
Y:330
Width:160
Height:25
Height:35
Text:Music
Font:Bold
Button@MAINMENU_BUTTON_REPLAY_VIEWER:
X:45
Y:310
Y:380
Width:160
Height:25
Height:35
Text:Replay Viewer
Font:Bold
Button@MAINMENU_BUTTON_QUIT:
X:45
Y:350
Y:430
Width:160
Height:25
Height:35
Text:Quit
Font:Bold
Background@PERF_BG:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 35 KiB