C&C main menu improvements:
- Disable target reticle when a window is open. - Show the faction logos when the shellmap is disabled.
This commit is contained in:
@@ -102,7 +102,12 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
|
||||
settingsMenu.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => menuType = MenuType.Main;
|
||||
|
||||
rootMenu.Get<ImageWidget>("RECBLOCK").IsVisible = () => world.FrameNumber / 25 % 2 == 0;
|
||||
var shellmapDecorations = widget.Get("SHELLMAP_DECORATIONS");
|
||||
shellmapDecorations.IsVisible = () => menuType != MenuType.None && Game.Settings.Game.ShowShellmap;
|
||||
shellmapDecorations.Get<ImageWidget>("RECBLOCK").IsVisible = () => world.FrameNumber / 25 % 2 == 0;
|
||||
|
||||
var shellmapDisabledDecorations = widget.Get("SHELLMAP_DISABLED_DECORATIONS");
|
||||
shellmapDisabledDecorations.IsVisible = () => !Game.Settings.Game.ShowShellmap;
|
||||
}
|
||||
|
||||
void OpenGamePanel(string id)
|
||||
|
||||
@@ -2,6 +2,8 @@ Container@MENU_BACKGROUND:
|
||||
Width:WINDOW_RIGHT
|
||||
Height:WINDOW_BOTTOM
|
||||
Logic:CncMenuLogic
|
||||
Children:
|
||||
Container@SHELLMAP_DECORATIONS:
|
||||
Children:
|
||||
Image@RETICLE:
|
||||
X:(WINDOW_RIGHT-WIDTH)/2
|
||||
@@ -23,6 +25,18 @@ Container@MENU_BACKGROUND:
|
||||
Height:16
|
||||
ImageCollection:shellmapbits
|
||||
ImageName:record
|
||||
Container@SHELLMAP_DISABLED_DECORATIONS:
|
||||
Children:
|
||||
Image@NOD:
|
||||
X:WINDOW_RIGHT/2-384
|
||||
Y:(WINDOW_BOTTOM-256)/2
|
||||
ImageCollection:logos
|
||||
ImageName:nod-load
|
||||
Image@GDI:
|
||||
X:WINDOW_RIGHT/2+128
|
||||
Y:(WINDOW_BOTTOM-256)/2
|
||||
ImageCollection:logos
|
||||
ImageName:gdi-load
|
||||
Image@EVA:
|
||||
X:WINDOW_RIGHT-128-43
|
||||
Y:43
|
||||
|
||||
Reference in New Issue
Block a user