Merge pull request #4520 from ScottNZ/new-menu
Unify ra and cnc main menu logic
This commit is contained in:
@@ -1,10 +1,14 @@
|
|||||||
NEW:
|
NEW:
|
||||||
All Mods:
|
All Mods:
|
||||||
Display an error dialog if the server connection is lost.
|
An error dialog is now displayed when server connections are lost.
|
||||||
|
Unified the main menu navigation between TD and other mods:
|
||||||
|
Moved Create Game and Direct Connect facilities to the server browser.
|
||||||
|
Added skirmish mode to RA and D2k to complement TD's skirmish mode.
|
||||||
|
Added an Extras submenu for miscellaneous game extras.
|
||||||
Dune 2000:
|
Dune 2000:
|
||||||
Added the Atreides grenadier from the 1.06 patch.
|
Added the Atreides grenadier from the 1.06 patch.
|
||||||
Added randomized tiles for Sand and Rock terrain.
|
Added randomized tiles for Sand and Rock terrain.
|
||||||
Display shroud by default again (disable it in the lobby settings).
|
Shroud is now displayed by default again (disable it in the lobby settings).
|
||||||
Removed the build radius restrictions.
|
Removed the build radius restrictions.
|
||||||
Added the BLOXXMAS terrain tiles from the 1.06 patch.
|
Added the BLOXXMAS terrain tiles from the 1.06 patch.
|
||||||
Red Alert:
|
Red Alert:
|
||||||
@@ -1585,3 +1589,4 @@ NEW:
|
|||||||
"Give Exploration" developer-mode option
|
"Give Exploration" developer-mode option
|
||||||
Check for .net framework on windows install
|
Check for .net framework on windows install
|
||||||
Allow the viewport to scroll past the map edge to prevent ui from blocking buildings
|
Allow the viewport to scroll past the map edge to prevent ui from blocking buildings
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ namespace OpenRA.GameRules
|
|||||||
public bool SanityCheckUnsyncedCode = false;
|
public bool SanityCheckUnsyncedCode = false;
|
||||||
public int Samples = 25;
|
public int Samples = 25;
|
||||||
public bool IgnoreVersionMismatch = false;
|
public bool IgnoreVersionMismatch = false;
|
||||||
public bool DeveloperMenu = false;
|
|
||||||
|
|
||||||
public bool ShowFatalErrorDialog = true;
|
public bool ShowFatalErrorDialog = true;
|
||||||
public string FatalErrorDialogFaq = "http://github.com/OpenRA/OpenRA/wiki/FAQ";
|
public string FatalErrorDialogFaq = "http://github.com/OpenRA/OpenRA/wiki/FAQ";
|
||||||
|
|||||||
@@ -74,7 +74,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Activities\HarvesterDockSequence.cs" />
|
<Compile Include="Activities\HarvesterDockSequence.cs" />
|
||||||
<Compile Include="CncLoadScreen.cs" />
|
<Compile Include="CncLoadScreen.cs" />
|
||||||
<Compile Include="CncMenuPaletteEffect.cs" />
|
|
||||||
<Compile Include="Effects\IonCannon.cs" />
|
<Compile Include="Effects\IonCannon.cs" />
|
||||||
<Compile Include="IonCannonPower.cs" />
|
<Compile Include="IonCannonPower.cs" />
|
||||||
<Compile Include="PoisonedByTiberium.cs" />
|
<Compile Include="PoisonedByTiberium.cs" />
|
||||||
@@ -90,7 +89,7 @@
|
|||||||
<Compile Include="Widgets\Logic\CncIngameChromeLogic.cs" />
|
<Compile Include="Widgets\Logic\CncIngameChromeLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\CncIngameMenuLogic.cs" />
|
<Compile Include="Widgets\Logic\CncIngameMenuLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\CncInstallFromCDLogic.cs" />
|
<Compile Include="Widgets\Logic\CncInstallFromCDLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\CncMenuLogic.cs" />
|
<Compile Include="Widgets\Logic\CncMainMenuLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\ProductionTooltipLogic.cs" />
|
<Compile Include="Widgets\Logic\ProductionTooltipLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\SupportPowerTooltipLogic.cs" />
|
<Compile Include="Widgets\Logic\SupportPowerTooltipLogic.cs" />
|
||||||
<Compile Include="Widgets\ProductionPaletteWidget.cs" />
|
<Compile Include="Widgets\ProductionPaletteWidget.cs" />
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
public CncIngameChromeLogic(Widget widget, World world)
|
public CncIngameChromeLogic(Widget widget, World world)
|
||||||
{
|
{
|
||||||
this.world = world;
|
this.world = world;
|
||||||
world.WorldActor.Trait<CncMenuPaletteEffect>()
|
world.WorldActor.Trait<MenuPaletteEffect>()
|
||||||
.Fade(CncMenuPaletteEffect.EffectType.None);
|
.Fade(MenuPaletteEffect.EffectType.None);
|
||||||
|
|
||||||
ingameRoot = widget.Get("INGAME_ROOT");
|
ingameRoot = widget.Get("INGAME_ROOT");
|
||||||
var playerRoot = ingameRoot.Get("PLAYER_ROOT");
|
var playerRoot = ingameRoot.Get("PLAYER_ROOT");
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.Graphics;
|
using OpenRA.Graphics;
|
||||||
|
using OpenRA.Mods.RA;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
using OpenRA.Widgets;
|
using OpenRA.Widgets;
|
||||||
|
|
||||||
@@ -27,8 +28,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
{
|
{
|
||||||
var resumeDisabled = false;
|
var resumeDisabled = false;
|
||||||
menu = widget.Get("INGAME_MENU");
|
menu = widget.Get("INGAME_MENU");
|
||||||
var mpe = world.WorldActor.Trait<CncMenuPaletteEffect>();
|
var mpe = world.WorldActor.Trait<MenuPaletteEffect>();
|
||||||
mpe.Fade(CncMenuPaletteEffect.EffectType.Desaturated);
|
mpe.Fade(MenuPaletteEffect.EffectType.Desaturated);
|
||||||
|
|
||||||
menu.Get<LabelWidget>("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version;
|
menu.Get<LabelWidget>("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version;
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
{
|
{
|
||||||
Sound.PlayNotification(null, "Speech", "Leave", null);
|
Sound.PlayNotification(null, "Speech", "Leave", null);
|
||||||
resumeDisabled = true;
|
resumeDisabled = true;
|
||||||
Game.RunAfterDelay(1200, () => mpe.Fade(CncMenuPaletteEffect.EffectType.Black));
|
Game.RunAfterDelay(1200, () => mpe.Fade(MenuPaletteEffect.EffectType.Black));
|
||||||
Game.RunAfterDelay(1200 + 40 * mpe.Info.FadeLength, () =>
|
Game.RunAfterDelay(1200 + 40 * mpe.Info.FadeLength, () =>
|
||||||
{
|
{
|
||||||
Game.Disconnect();
|
Game.Disconnect();
|
||||||
@@ -86,7 +87,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
{
|
{
|
||||||
Ui.CloseWindow();
|
Ui.CloseWindow();
|
||||||
Ui.Root.RemoveChild(menu);
|
Ui.Root.RemoveChild(menu);
|
||||||
world.WorldActor.Trait<CncMenuPaletteEffect>().Fade(CncMenuPaletteEffect.EffectType.None);
|
world.WorldActor.Trait<MenuPaletteEffect>().Fade(MenuPaletteEffect.EffectType.None);
|
||||||
onExit();
|
onExit();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
30
OpenRA.Mods.Cnc/Widgets/Logic/CncMainMenuLogic.cs
Normal file
30
OpenRA.Mods.Cnc/Widgets/Logic/CncMainMenuLogic.cs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using OpenRA.Mods.RA.Widgets.Logic;
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||||
|
{
|
||||||
|
public class CncMainMenuLogic : MainMenuLogic
|
||||||
|
{
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public CncMainMenuLogic(Widget widget, World world)
|
||||||
|
: base(widget, world)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,152 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see COPYING.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System.Net;
|
|
||||||
using OpenRA.Mods.RA.Widgets.Logic;
|
|
||||||
using OpenRA.Widgets;
|
|
||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|
||||||
{
|
|
||||||
public class CncMenuLogic
|
|
||||||
{
|
|
||||||
enum MenuType { Main, Multiplayer, Settings, None }
|
|
||||||
|
|
||||||
MenuType menuType = MenuType.Main;
|
|
||||||
Widget rootMenu;
|
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
|
||||||
public CncMenuLogic(Widget widget, World world)
|
|
||||||
{
|
|
||||||
world.WorldActor.Trait<CncMenuPaletteEffect>()
|
|
||||||
.Fade(CncMenuPaletteEffect.EffectType.Desaturated);
|
|
||||||
|
|
||||||
rootMenu = widget.Get("MENU_BACKGROUND");
|
|
||||||
rootMenu.Get<LabelWidget>("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version;
|
|
||||||
|
|
||||||
// Menu buttons
|
|
||||||
var mainMenu = widget.Get("MAIN_MENU");
|
|
||||||
mainMenu.IsVisible = () => menuType == MenuType.Main;
|
|
||||||
|
|
||||||
mainMenu.Get<ButtonWidget>("SOLO_BUTTON").OnClick = StartSkirmishGame;
|
|
||||||
mainMenu.Get<ButtonWidget>("MULTIPLAYER_BUTTON").OnClick = () => menuType = MenuType.Multiplayer;
|
|
||||||
|
|
||||||
mainMenu.Get<ButtonWidget>("MODS_BUTTON").OnClick = () =>
|
|
||||||
{
|
|
||||||
menuType = MenuType.None;
|
|
||||||
Ui.OpenWindow("MODS_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => menuType = MenuType.Main },
|
|
||||||
{ "onSwitch", RemoveShellmapUI }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
mainMenu.Get<ButtonWidget>("SETTINGS_BUTTON").OnClick = () => menuType = MenuType.Settings;
|
|
||||||
mainMenu.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
|
|
||||||
|
|
||||||
// Multiplayer menu
|
|
||||||
var multiplayerMenu = widget.Get("MULTIPLAYER_MENU");
|
|
||||||
multiplayerMenu.IsVisible = () => menuType == MenuType.Multiplayer;
|
|
||||||
|
|
||||||
multiplayerMenu.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => menuType = MenuType.Main;
|
|
||||||
multiplayerMenu.Get<ButtonWidget>("JOIN_BUTTON").OnClick = () => OpenGamePanel("SERVERBROWSER_PANEL");
|
|
||||||
multiplayerMenu.Get<ButtonWidget>("CREATE_BUTTON").OnClick = () => OpenGamePanel("CREATESERVER_PANEL");
|
|
||||||
multiplayerMenu.Get<ButtonWidget>("DIRECTCONNECT_BUTTON").OnClick = () => OpenGamePanel("DIRECTCONNECT_PANEL");
|
|
||||||
|
|
||||||
// Settings menu
|
|
||||||
var settingsMenu = widget.Get("SETTINGS_MENU");
|
|
||||||
settingsMenu.IsVisible = () => menuType == MenuType.Settings;
|
|
||||||
|
|
||||||
settingsMenu.Get<ButtonWidget>("REPLAYS_BUTTON").OnClick = () =>
|
|
||||||
{
|
|
||||||
menuType = MenuType.None;
|
|
||||||
Ui.OpenWindow("REPLAYBROWSER_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => menuType = MenuType.Settings },
|
|
||||||
{ "onStart", RemoveShellmapUI }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsMenu.Get<ButtonWidget>("MUSIC_BUTTON").OnClick = () =>
|
|
||||||
{
|
|
||||||
menuType = MenuType.None;
|
|
||||||
Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => menuType = MenuType.Settings },
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsMenu.Get<ButtonWidget>("CREDITS_BUTTON").OnClick = () =>
|
|
||||||
{
|
|
||||||
menuType = MenuType.None;
|
|
||||||
Ui.OpenWindow("CREDITS_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => menuType = MenuType.Settings },
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsMenu.Get<ButtonWidget>("SETTINGS_BUTTON").OnClick = () =>
|
|
||||||
{
|
|
||||||
menuType = MenuType.None;
|
|
||||||
Game.OpenWindow("SETTINGS_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => menuType = MenuType.Settings },
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsMenu.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => menuType = MenuType.Main;
|
|
||||||
|
|
||||||
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)
|
|
||||||
{
|
|
||||||
menuType = MenuType.None;
|
|
||||||
Ui.OpenWindow(id, new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => menuType = MenuType.Multiplayer },
|
|
||||||
{ "openLobby", () => OpenLobbyPanel(MenuType.Multiplayer, false) }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void RemoveShellmapUI()
|
|
||||||
{
|
|
||||||
rootMenu.Parent.RemoveChild(rootMenu);
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenLobbyPanel(MenuType menu, bool addBots)
|
|
||||||
{
|
|
||||||
menuType = MenuType.None;
|
|
||||||
Game.OpenWindow("SERVER_LOBBY", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => { Game.Disconnect(); menuType = menu; } },
|
|
||||||
{ "onStart", RemoveShellmapUI },
|
|
||||||
{ "addBots", addBots }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void StartSkirmishGame()
|
|
||||||
{
|
|
||||||
var map = WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map);
|
|
||||||
Game.Settings.Server.Map = map;
|
|
||||||
Game.Settings.Save();
|
|
||||||
|
|
||||||
ConnectionLogic.Connect(IPAddress.Loopback.ToString(),
|
|
||||||
Game.CreateLocalServer(map),
|
|
||||||
"",
|
|
||||||
() => OpenLobbyPanel(MenuType.Main, true),
|
|
||||||
() => { Game.CloseServer(); menuType = MenuType.Main; });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -14,25 +14,25 @@ using OpenRA.FileFormats;
|
|||||||
using OpenRA.Graphics;
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.Cnc
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
public class CncMenuPaletteEffectInfo : ITraitInfo
|
public class MenuPaletteEffectInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public readonly int FadeLength = 10;
|
public readonly int FadeLength = 10;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new CncMenuPaletteEffect(this); }
|
public object Create(ActorInitializer init) { return new MenuPaletteEffect(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CncMenuPaletteEffect : IPaletteModifier, ITickRender
|
public class MenuPaletteEffect : IPaletteModifier, ITickRender
|
||||||
{
|
{
|
||||||
public enum EffectType { None, Black, Desaturated }
|
public enum EffectType { None, Black, Desaturated }
|
||||||
public readonly CncMenuPaletteEffectInfo Info;
|
public readonly MenuPaletteEffectInfo Info;
|
||||||
|
|
||||||
int remainingFrames;
|
int remainingFrames;
|
||||||
EffectType from = EffectType.Black;
|
EffectType from = EffectType.Black;
|
||||||
EffectType to = EffectType.Black;
|
EffectType to = EffectType.Black;
|
||||||
|
|
||||||
public CncMenuPaletteEffect(CncMenuPaletteEffectInfo info) { Info = info; }
|
public MenuPaletteEffect(MenuPaletteEffectInfo info) { Info = info; }
|
||||||
|
|
||||||
public void Fade(EffectType type)
|
public void Fade(EffectType type)
|
||||||
{
|
{
|
||||||
@@ -123,6 +123,7 @@
|
|||||||
<Compile Include="Air\Aircraft.cs" />
|
<Compile Include="Air\Aircraft.cs" />
|
||||||
<Compile Include="Air\AttackHeli.cs" />
|
<Compile Include="Air\AttackHeli.cs" />
|
||||||
<Compile Include="Air\AttackPlane.cs" />
|
<Compile Include="Air\AttackPlane.cs" />
|
||||||
|
<Compile Include="MenuPaletteEffect.cs" />
|
||||||
<Compile Include="Crates\UnitUpgradeCrateAction.cs" />
|
<Compile Include="Crates\UnitUpgradeCrateAction.cs" />
|
||||||
<Compile Include="EjectOnDeath.cs" />
|
<Compile Include="EjectOnDeath.cs" />
|
||||||
<Compile Include="Air\FallsToEarth.cs" />
|
<Compile Include="Air\FallsToEarth.cs" />
|
||||||
@@ -401,7 +402,7 @@
|
|||||||
<Compile Include="Widgets\Logic\IngameChromeLogic.cs" />
|
<Compile Include="Widgets\Logic\IngameChromeLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\LobbyLogic.cs" />
|
<Compile Include="Widgets\Logic\LobbyLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\LobbyUtils.cs" />
|
<Compile Include="Widgets\Logic\LobbyUtils.cs" />
|
||||||
<Compile Include="Widgets\Logic\MainMenuButtonsLogic.cs" />
|
<Compile Include="Widgets\Logic\MainMenuLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\MapChooserLogic.cs" />
|
<Compile Include="Widgets\Logic\MapChooserLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\MissionObjectivesLogic.cs" />
|
<Compile Include="Widgets\Logic\MissionObjectivesLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\MusicPlayerLogic.cs" />
|
<Compile Include="Widgets\Logic\MusicPlayerLogic.cs" />
|
||||||
@@ -412,6 +413,7 @@
|
|||||||
<Compile Include="Widgets\Logic\ReplayBrowserLogic.cs" />
|
<Compile Include="Widgets\Logic\ReplayBrowserLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\ServerBrowserLogic.cs" />
|
<Compile Include="Widgets\Logic\ServerBrowserLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\ServerCreationLogic.cs" />
|
<Compile Include="Widgets\Logic\ServerCreationLogic.cs" />
|
||||||
|
<Compile Include="Widgets\Logic\ShellmapDesaturationLogic.cs" />
|
||||||
<Compile Include="Widgets\MoneyBinWidget.cs" />
|
<Compile Include="Widgets\MoneyBinWidget.cs" />
|
||||||
<Compile Include="Widgets\ObserverProductionIconsWidget.cs" />
|
<Compile Include="Widgets\ObserverProductionIconsWidget.cs" />
|
||||||
<Compile Include="Widgets\ObserverSupportPowerIconsWidget.cs" />
|
<Compile Include="Widgets\ObserverSupportPowerIconsWidget.cs" />
|
||||||
|
|||||||
@@ -1,133 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see COPYING.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using OpenRA.Widgets;
|
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Widgets.Logic
|
|
||||||
{
|
|
||||||
public class MainMenuButtonsLogic
|
|
||||||
{
|
|
||||||
enum MenuType { Main, None }
|
|
||||||
MenuType Menu = MenuType.Main;
|
|
||||||
|
|
||||||
Widget rootMenu;
|
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
|
||||||
public MainMenuButtonsLogic(Widget widget)
|
|
||||||
{
|
|
||||||
rootMenu = widget;
|
|
||||||
rootMenu.IsVisible = () => Menu == MenuType.Main;
|
|
||||||
|
|
||||||
var versionLabel = Ui.Root.GetOrNull<LabelWidget>("VERSION_LABEL");
|
|
||||||
if (versionLabel != null)
|
|
||||||
versionLabel.Text = Game.modData.Manifest.Mod.Version;
|
|
||||||
|
|
||||||
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_DIRECTCONNECT").OnClick = () => OpenGamePanel("DIRECTCONNECT_BG");
|
|
||||||
|
|
||||||
widget.Get<ButtonWidget>("MAINMENU_BUTTON_SETTINGS").OnClick = () =>
|
|
||||||
{
|
|
||||||
Menu = MenuType.None;
|
|
||||||
Game.OpenWindow("SETTINGS_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => Menu = MenuType.Main }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
widget.Get<ButtonWidget>("MAINMENU_BUTTON_MUSIC").OnClick = () =>
|
|
||||||
{
|
|
||||||
Menu = MenuType.None;
|
|
||||||
Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => Menu = MenuType.Main }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
widget.Get<ButtonWidget>("MAINMENU_BUTTON_MODS").OnClick = () =>
|
|
||||||
{
|
|
||||||
Menu = MenuType.None;
|
|
||||||
Ui.OpenWindow("MODS_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => Menu = MenuType.Main },
|
|
||||||
{ "onSwitch", RemoveShellmapUI }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
widget.Get<ButtonWidget>("MAINMENU_BUTTON_CREDITS").OnClick = () =>
|
|
||||||
{
|
|
||||||
Menu = MenuType.None;
|
|
||||||
Ui.OpenWindow("CREDITS_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => Menu = MenuType.Main },
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
widget.Get<ButtonWidget>("MAINMENU_BUTTON_REPLAY_VIEWER").OnClick = () =>
|
|
||||||
{
|
|
||||||
Menu = MenuType.None;
|
|
||||||
Ui.OpenWindow("REPLAYBROWSER_BG", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => Menu = MenuType.Main },
|
|
||||||
{ "onStart", RemoveShellmapUI }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var assetBrowserButton = widget.Get<ButtonWidget>("MAINMENU_BUTTON_ASSET_BROWSER");
|
|
||||||
assetBrowserButton.OnClick = () =>
|
|
||||||
{
|
|
||||||
Menu = MenuType.None;
|
|
||||||
Game.OpenWindow("ASSETBROWSER_BG", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => Menu = MenuType.Main }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var quitButton = widget.Get<ButtonWidget>("MAINMENU_BUTTON_QUIT");
|
|
||||||
quitButton.OnClick = () => Game.Exit();
|
|
||||||
|
|
||||||
// Hide developer-specific buttons
|
|
||||||
if (Game.Settings.Debug.DeveloperMenu == false)
|
|
||||||
{
|
|
||||||
assetBrowserButton.IsVisible = () => false;
|
|
||||||
var offset = assetBrowserButton.Bounds.Y - quitButton.Bounds.Y;
|
|
||||||
quitButton.Bounds.Y += offset;
|
|
||||||
rootMenu.Bounds.Height += offset;
|
|
||||||
rootMenu.Bounds.Y -= offset/2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void RemoveShellmapUI()
|
|
||||||
{
|
|
||||||
rootMenu.Parent.RemoveChild(rootMenu);
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenGamePanel(string id)
|
|
||||||
{
|
|
||||||
Menu = MenuType.None;
|
|
||||||
Ui.OpenWindow(id, new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => Menu = MenuType.Main },
|
|
||||||
{ "openLobby", () => OpenLobbyPanel() }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenLobbyPanel()
|
|
||||||
{
|
|
||||||
Menu = MenuType.None;
|
|
||||||
Game.OpenWindow("SERVER_LOBBY", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => { Game.Disconnect(); Menu = MenuType.Main; } },
|
|
||||||
{ "onStart", RemoveShellmapUI },
|
|
||||||
{ "addBots", false }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
143
OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs
Normal file
143
OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System.Net;
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||||
|
{
|
||||||
|
public class MainMenuLogic
|
||||||
|
{
|
||||||
|
protected enum MenuType { Main, Extras, None }
|
||||||
|
|
||||||
|
protected MenuType menuType = MenuType.Main;
|
||||||
|
Widget rootMenu;
|
||||||
|
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public MainMenuLogic(Widget widget, World world)
|
||||||
|
{
|
||||||
|
rootMenu = widget;
|
||||||
|
rootMenu.Get<LabelWidget>("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version;
|
||||||
|
|
||||||
|
// Menu buttons
|
||||||
|
var mainMenu = widget.Get("MAIN_MENU");
|
||||||
|
mainMenu.IsVisible = () => menuType == MenuType.Main;
|
||||||
|
|
||||||
|
mainMenu.Get<ButtonWidget>("SINGLEPLAYER_BUTTON").OnClick = StartSkirmishGame;
|
||||||
|
|
||||||
|
mainMenu.Get<ButtonWidget>("MULTIPLAYER_BUTTON").OnClick = () =>
|
||||||
|
{
|
||||||
|
menuType = MenuType.None;
|
||||||
|
Ui.OpenWindow("SERVERBROWSER_PANEL", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "onStart", RemoveShellmapUI },
|
||||||
|
{ "onExit", () => menuType = MenuType.Main }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
mainMenu.Get<ButtonWidget>("MODS_BUTTON").OnClick = () =>
|
||||||
|
{
|
||||||
|
menuType = MenuType.None;
|
||||||
|
Ui.OpenWindow("MODS_PANEL", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "onExit", () => menuType = MenuType.Main },
|
||||||
|
{ "onSwitch", RemoveShellmapUI }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
mainMenu.Get<ButtonWidget>("SETTINGS_BUTTON").OnClick = () =>
|
||||||
|
{
|
||||||
|
menuType = MenuType.None;
|
||||||
|
Game.OpenWindow("SETTINGS_PANEL", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "onExit", () => menuType = MenuType.Main }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
mainMenu.Get<ButtonWidget>("EXTRAS_BUTTON").OnClick = () => menuType = MenuType.Extras;
|
||||||
|
|
||||||
|
mainMenu.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
|
||||||
|
|
||||||
|
// Extras menu
|
||||||
|
var extrasMenu = widget.Get("EXTRAS_MENU");
|
||||||
|
extrasMenu.IsVisible = () => menuType == MenuType.Extras;
|
||||||
|
|
||||||
|
extrasMenu.Get<ButtonWidget>("REPLAYS_BUTTON").OnClick = () =>
|
||||||
|
{
|
||||||
|
menuType = MenuType.None;
|
||||||
|
Ui.OpenWindow("REPLAYBROWSER_PANEL", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "onExit", () => menuType = MenuType.Extras },
|
||||||
|
{ "onStart", RemoveShellmapUI }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
extrasMenu.Get<ButtonWidget>("MUSIC_BUTTON").OnClick = () =>
|
||||||
|
{
|
||||||
|
menuType = MenuType.None;
|
||||||
|
Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "onExit", () => menuType = MenuType.Extras },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var assetBrowserButton = extrasMenu.GetOrNull<ButtonWidget>("ASSETBROWSER_BUTTON");
|
||||||
|
if (assetBrowserButton != null)
|
||||||
|
assetBrowserButton.OnClick = () =>
|
||||||
|
{
|
||||||
|
menuType = MenuType.None;
|
||||||
|
Game.OpenWindow("ASSETBROWSER_PANEL", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "onExit", () => menuType = MenuType.Extras },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
extrasMenu.Get<ButtonWidget>("CREDITS_BUTTON").OnClick = () =>
|
||||||
|
{
|
||||||
|
menuType = MenuType.None;
|
||||||
|
Ui.OpenWindow("CREDITS_PANEL", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "onExit", () => menuType = MenuType.Extras },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
extrasMenu.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => menuType = MenuType.Main;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RemoveShellmapUI()
|
||||||
|
{
|
||||||
|
rootMenu.Parent.RemoveChild(rootMenu);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OpenSkirmishLobbyPanel()
|
||||||
|
{
|
||||||
|
menuType = MenuType.None;
|
||||||
|
Game.OpenWindow("SERVER_LOBBY", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "onExit", () => { Game.Disconnect(); menuType = MenuType.Main; } },
|
||||||
|
{ "onStart", RemoveShellmapUI },
|
||||||
|
{ "addBots", true }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartSkirmishGame()
|
||||||
|
{
|
||||||
|
var map = WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map);
|
||||||
|
Game.Settings.Server.Map = map;
|
||||||
|
Game.Settings.Save();
|
||||||
|
|
||||||
|
ConnectionLogic.Connect(IPAddress.Loopback.ToString(),
|
||||||
|
Game.CreateLocalServer(map),
|
||||||
|
"",
|
||||||
|
OpenSkirmishLobbyPanel,
|
||||||
|
() => { Game.CloseServer(); menuType = MenuType.Main; });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,8 +23,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
GameServer currentServer;
|
GameServer currentServer;
|
||||||
ScrollItemWidget serverTemplate;
|
ScrollItemWidget serverTemplate;
|
||||||
Action OpenLobby;
|
|
||||||
Action OnExit;
|
Action onStart;
|
||||||
|
Action onExit;
|
||||||
|
|
||||||
enum SearchStatus { Fetching, Failed, NoGames, Hidden }
|
enum SearchStatus { Fetching, Failed, NoGames, Hidden }
|
||||||
SearchStatus searchStatus = SearchStatus.Fetching;
|
SearchStatus searchStatus = SearchStatus.Fetching;
|
||||||
@@ -38,19 +39,20 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
switch (searchStatus)
|
switch (searchStatus)
|
||||||
{
|
{
|
||||||
case SearchStatus.Fetching: return "Fetching game list...";
|
case SearchStatus.Fetching: return "Fetching game list...";
|
||||||
case SearchStatus.Failed: return "Failed to contact master server.";
|
case SearchStatus.Failed: return "Failed to contact master server.";
|
||||||
case SearchStatus.NoGames: return "No games found.";
|
case SearchStatus.NoGames: return "No games found.";
|
||||||
default: return "";
|
default: return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public ServerBrowserLogic(Widget widget, Action openLobby, Action onExit)
|
public ServerBrowserLogic(Widget widget, Action onStart, Action onExit)
|
||||||
{
|
{
|
||||||
var panel = widget;
|
var panel = widget;
|
||||||
OpenLobby = openLobby;
|
this.onStart = onStart;
|
||||||
OnExit = onExit;
|
this.onExit = onExit;
|
||||||
|
|
||||||
var sl = panel.Get<ScrollPanelWidget>("SERVER_LIST");
|
var sl = panel.Get<ScrollPanelWidget>("SERVER_LIST");
|
||||||
|
|
||||||
// Menu buttons
|
// Menu buttons
|
||||||
@@ -58,6 +60,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
refreshButton.IsDisabled = () => searchStatus == SearchStatus.Fetching;
|
refreshButton.IsDisabled = () => searchStatus == SearchStatus.Fetching;
|
||||||
refreshButton.OnClick = () => ServerList.Query(games => RefreshServerList(panel, games));
|
refreshButton.OnClick = () => ServerList.Query(games => RefreshServerList(panel, games));
|
||||||
|
|
||||||
|
panel.Get<ButtonWidget>("DIRECTCONNECT_BUTTON").OnClick = OpenDirectConnectPanel;
|
||||||
|
panel.Get<ButtonWidget>("CREATE_BUTTON").OnClick = OpenCreateServerPanel;
|
||||||
|
|
||||||
var join = panel.Get<ButtonWidget>("JOIN_BUTTON");
|
var join = panel.Get<ButtonWidget>("JOIN_BUTTON");
|
||||||
join.IsDisabled = () => currentServer == null || !currentServer.CanJoin();
|
join.IsDisabled = () => currentServer == null || !currentServer.CanJoin();
|
||||||
join.OnClick = () => Join(currentServer);
|
join.OnClick = () => Join(currentServer);
|
||||||
@@ -106,6 +111,34 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
ServerList.Query(games => RefreshServerList(panel, games));
|
ServerList.Query(games => RefreshServerList(panel, games));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OpenLobby()
|
||||||
|
{
|
||||||
|
Game.OpenWindow("SERVER_LOBBY", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "onExit", Game.Disconnect },
|
||||||
|
{ "onStart", onStart },
|
||||||
|
{ "addBots", false }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void OpenDirectConnectPanel()
|
||||||
|
{
|
||||||
|
Ui.OpenWindow("DIRECTCONNECT_PANEL", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "openLobby", OpenLobby },
|
||||||
|
{ "onExit", () => { } }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void OpenCreateServerPanel()
|
||||||
|
{
|
||||||
|
Ui.OpenWindow("CREATESERVER_PANEL", new WidgetArgs
|
||||||
|
{
|
||||||
|
{ "openLobby", OpenLobby },
|
||||||
|
{ "onExit", () => { } }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void Join(GameServer server)
|
void Join(GameServer server)
|
||||||
{
|
{
|
||||||
if (server == null || !server.CanJoin())
|
if (server == null || !server.CanJoin())
|
||||||
@@ -114,8 +147,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
var host = server.Address.Split(':')[0];
|
var host = server.Address.Split(':')[0];
|
||||||
var port = int.Parse(server.Address.Split(':')[1]);
|
var port = int.Parse(server.Address.Split(':')[1]);
|
||||||
|
|
||||||
Ui.CloseWindow();
|
ConnectionLogic.Connect(host, port, "", OpenLobby, onExit);
|
||||||
ConnectionLogic.Connect(host, port, "", OpenLobby, OnExit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string GetPlayersLabel(GameServer game)
|
string GetPlayersLabel(GameServer game)
|
||||||
@@ -164,10 +196,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
if ((game.State == (int)ServerState.GameStarted) && !showStarted)
|
if ((game.State == (int)ServerState.GameStarted) && !showStarted)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ((game.State == (int)ServerState.WaitingPlayers) && !showWaiting)
|
if ((game.State == (int)ServerState.WaitingPlayers) && !showWaiting)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ((game.Players == 0) && !showEmpty)
|
if ((game.Players == 0) && !showEmpty)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -230,7 +262,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
|
|
||||||
var state = item.Get<LabelWidget>("STATE");
|
var state = item.Get<LabelWidget>("STATE");
|
||||||
state.GetText = () => GetStateLabel(game);
|
state.GetText = () => GetStateLabel(game);
|
||||||
|
|
||||||
var ip = item.Get<LabelWidget>("IP");
|
var ip = item.Get<LabelWidget>("IP");
|
||||||
ip.GetText = () => game.Address;
|
ip.GetText = () => game.Address;
|
||||||
|
|
||||||
|
|||||||
@@ -356,7 +356,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
BindCheckboxPref(panel, "PERFGRAPH_CHECKBOX", ds, "PerfGraph");
|
BindCheckboxPref(panel, "PERFGRAPH_CHECKBOX", ds, "PerfGraph");
|
||||||
BindCheckboxPref(panel, "CHECKUNSYNCED_CHECKBOX", ds, "SanityCheckUnsyncedCode");
|
BindCheckboxPref(panel, "CHECKUNSYNCED_CHECKBOX", ds, "SanityCheckUnsyncedCode");
|
||||||
BindCheckboxPref(panel, "BOTDEBUG_CHECKBOX", ds, "BotDebug");
|
BindCheckboxPref(panel, "BOTDEBUG_CHECKBOX", ds, "BotDebug");
|
||||||
BindCheckboxPref(panel, "DEVELOPER_MENU_CHECKBOX", ds, "DeveloperMenu");
|
|
||||||
BindCheckboxPref(panel, "CRASH_DIALOG_CHECKBOX", ds, "ShowFatalErrorDialog");
|
BindCheckboxPref(panel, "CRASH_DIALOG_CHECKBOX", ds, "ShowFatalErrorDialog");
|
||||||
|
|
||||||
return () => { };
|
return () => { };
|
||||||
@@ -377,7 +376,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
ds.PerfGraph = dds.PerfGraph;
|
ds.PerfGraph = dds.PerfGraph;
|
||||||
ds.SanityCheckUnsyncedCode = dds.SanityCheckUnsyncedCode;
|
ds.SanityCheckUnsyncedCode = dds.SanityCheckUnsyncedCode;
|
||||||
ds.BotDebug = dds.BotDebug;
|
ds.BotDebug = dds.BotDebug;
|
||||||
ds.DeveloperMenu = dds.DeveloperMenu;
|
|
||||||
ds.ShowFatalErrorDialog = dds.ShowFatalErrorDialog;
|
ds.ShowFatalErrorDialog = dds.ShowFatalErrorDialog;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
23
OpenRA.Mods.RA/Widgets/Logic/ShellmapDesaturationLogic.cs
Normal file
23
OpenRA.Mods.RA/Widgets/Logic/ShellmapDesaturationLogic.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||||
|
{
|
||||||
|
public class ShellmapDesaturationLogic
|
||||||
|
{
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public ShellmapDesaturationLogic(World world)
|
||||||
|
{
|
||||||
|
var paletteEffect = world.WorldActor.TraitOrDefault<MenuPaletteEffect>();
|
||||||
|
if (paletteEffect != null)
|
||||||
|
paletteEffect.Fade(MenuPaletteEffect.EffectType.Desaturated);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
Container@MENU_BACKGROUND:
|
Container@MENU_BACKGROUND:
|
||||||
Width:WINDOW_RIGHT
|
Width:WINDOW_RIGHT
|
||||||
Height:WINDOW_BOTTOM
|
Height:WINDOW_BOTTOM
|
||||||
Logic:CncMenuLogic
|
Logic:CncMainMenuLogic
|
||||||
Children:
|
Children:
|
||||||
|
Container@SHELLMAP_DESATURATION:
|
||||||
|
Logic:ShellmapDesaturationLogic
|
||||||
Container@SHELLMAP_DECORATIONS:
|
Container@SHELLMAP_DECORATIONS:
|
||||||
Children:
|
Children:
|
||||||
Image@RETICLE:
|
Image@RETICLE:
|
||||||
@@ -57,7 +59,7 @@ Container@MENU_BACKGROUND:
|
|||||||
Container@MENUS:
|
Container@MENUS:
|
||||||
X:(WINDOW_RIGHT-WIDTH)/2
|
X:(WINDOW_RIGHT-WIDTH)/2
|
||||||
Y:WINDOW_BOTTOM-33-HEIGHT-10
|
Y:WINDOW_BOTTOM-33-HEIGHT-10
|
||||||
Width:740
|
Width:890
|
||||||
Height:35
|
Height:35
|
||||||
Children:
|
Children:
|
||||||
Container@MAIN_MENU:
|
Container@MAIN_MENU:
|
||||||
@@ -72,7 +74,7 @@ Container@MENU_BACKGROUND:
|
|||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Contrast:True
|
Contrast:True
|
||||||
Button@SOLO_BUTTON:
|
Button@SINGLEPLAYER_BUTTON:
|
||||||
X:0
|
X:0
|
||||||
Y:0
|
Y:0
|
||||||
Width:140
|
Width:140
|
||||||
@@ -84,72 +86,40 @@ Container@MENU_BACKGROUND:
|
|||||||
Width:140
|
Width:140
|
||||||
Height:35
|
Height:35
|
||||||
Text:Multiplayer
|
Text:Multiplayer
|
||||||
Button@SETTINGS_BUTTON:
|
|
||||||
X:300
|
|
||||||
Y:0
|
|
||||||
Width:140
|
|
||||||
Height:35
|
|
||||||
Text:Options
|
|
||||||
Button@MODS_BUTTON:
|
Button@MODS_BUTTON:
|
||||||
X:450
|
X:300
|
||||||
Y:0
|
Y:0
|
||||||
Width:140
|
Width:140
|
||||||
Height:35
|
Height:35
|
||||||
Text:Mods
|
Text:Mods
|
||||||
Button@QUIT_BUTTON:
|
Button@SETTINGS_BUTTON:
|
||||||
|
X:450
|
||||||
|
Y:0
|
||||||
|
Width:140
|
||||||
|
Height:35
|
||||||
|
Text:Settings
|
||||||
|
Button@EXTRAS_BUTTON:
|
||||||
X:600
|
X:600
|
||||||
Y:0
|
Y:0
|
||||||
Width:140
|
Width:140
|
||||||
Height:35
|
Height:35
|
||||||
|
Text:Extras
|
||||||
|
Button@QUIT_BUTTON:
|
||||||
|
X:750
|
||||||
|
Y:0
|
||||||
|
Width:140
|
||||||
|
Height:35
|
||||||
Text:Quit
|
Text:Quit
|
||||||
Container@MULTIPLAYER_MENU:
|
Container@EXTRAS_MENU:
|
||||||
Width:PARENT_RIGHT
|
|
||||||
Visible:false
|
|
||||||
Children:
|
|
||||||
Label@MULTIPLAYER_MENU_TITLE:
|
|
||||||
X:0
|
|
||||||
Y:0-30
|
|
||||||
Width:PARENT_RIGHT
|
|
||||||
Height:20
|
|
||||||
Text:Multiplayer
|
|
||||||
Align:Center
|
|
||||||
Font:Bold
|
|
||||||
Contrast:True
|
|
||||||
Button@CREATE_BUTTON:
|
|
||||||
X:0
|
|
||||||
Y:0
|
|
||||||
Width:140
|
|
||||||
Height:35
|
|
||||||
Text:Create Server
|
|
||||||
Button@JOIN_BUTTON:
|
|
||||||
X:150
|
|
||||||
Y:0
|
|
||||||
Width:140
|
|
||||||
Height:35
|
|
||||||
Text:Find Server
|
|
||||||
Button@DIRECTCONNECT_BUTTON:
|
|
||||||
X:300
|
|
||||||
Y:0
|
|
||||||
Width:140
|
|
||||||
Height:35
|
|
||||||
Text:Direct Connect
|
|
||||||
Button@BACK_BUTTON:
|
|
||||||
Key:escape
|
|
||||||
X:600
|
|
||||||
Y:0
|
|
||||||
Width:140
|
|
||||||
Height:35
|
|
||||||
Text:Back
|
|
||||||
Container@SETTINGS_MENU:
|
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Visible:False
|
Visible:False
|
||||||
Children:
|
Children:
|
||||||
Label@OPTIONS_MENU_TITLE:
|
Label@EXTRAS_MENU_TITLE:
|
||||||
X:0
|
X:0
|
||||||
Y:0-30
|
Y:0-30
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Height:20
|
Height:20
|
||||||
Text:Options
|
Text:Extras
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Contrast:True
|
Contrast:True
|
||||||
@@ -165,21 +135,15 @@ Container@MENU_BACKGROUND:
|
|||||||
Width:140
|
Width:140
|
||||||
Height:35
|
Height:35
|
||||||
Text:Music
|
Text:Music
|
||||||
Button@SETTINGS_BUTTON:
|
|
||||||
X:300
|
|
||||||
Y:0
|
|
||||||
Width:140
|
|
||||||
Height:35
|
|
||||||
Text:Settings
|
|
||||||
Button@CREDITS_BUTTON:
|
Button@CREDITS_BUTTON:
|
||||||
X:450
|
X:300
|
||||||
Y:0
|
Y:0
|
||||||
Width:140
|
Width:140
|
||||||
Height:35
|
Height:35
|
||||||
Text:Credits
|
Text:Credits
|
||||||
Button@BACK_BUTTON:
|
Button@BACK_BUTTON:
|
||||||
Key:escape
|
Key:escape
|
||||||
X:600
|
X:750
|
||||||
Y:0
|
Y:0
|
||||||
Width:140
|
Width:140
|
||||||
Height:35
|
Height:35
|
||||||
@@ -205,4 +169,4 @@ Container@MENU_BACKGROUND:
|
|||||||
X:10
|
X:10
|
||||||
Y:10
|
Y:10
|
||||||
Width:200
|
Width:200
|
||||||
Height:200
|
Height:200
|
||||||
@@ -6,7 +6,7 @@ Container@SERVERBROWSER_PANEL:
|
|||||||
Height:535
|
Height:535
|
||||||
Children:
|
Children:
|
||||||
Label@TITLE:
|
Label@TITLE:
|
||||||
Text:Find Server
|
Text:Multiplayer
|
||||||
Width:740
|
Width:740
|
||||||
Y:0-25
|
Y:0-25
|
||||||
Font:BigBold
|
Font:BigBold
|
||||||
@@ -19,38 +19,44 @@ Container@SERVERBROWSER_PANEL:
|
|||||||
Children:
|
Children:
|
||||||
Label@SHOW_LABEL_TITLE:
|
Label@SHOW_LABEL_TITLE:
|
||||||
X:20
|
X:20
|
||||||
Y:10
|
Y:465
|
||||||
Width:20
|
Width:20
|
||||||
Height:25
|
Height:25
|
||||||
Text:Show:
|
Text:Show:
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Checkbox@WAITING_FOR_PLAYERS:
|
Checkbox@WAITING_FOR_PLAYERS:
|
||||||
X:80
|
X:80
|
||||||
Y:13
|
Y:468
|
||||||
Width:100
|
Width:100
|
||||||
Height:20
|
Height:20
|
||||||
Text:Waiting
|
Text:Waiting
|
||||||
Checkbox@EMPTY:
|
Checkbox@EMPTY:
|
||||||
X:180
|
X:180
|
||||||
Y:13
|
Y:468
|
||||||
Width:100
|
Width:100
|
||||||
Height:20
|
Height:20
|
||||||
Text:Empty
|
Text:Empty
|
||||||
Checkbox@ALREADY_STARTED:
|
Checkbox@ALREADY_STARTED:
|
||||||
X:280
|
X:280
|
||||||
Y:13
|
Y:468
|
||||||
Width:100
|
Width:100
|
||||||
Height:20
|
Height:20
|
||||||
Text:Started
|
Text:Started
|
||||||
Checkbox@INCOMPATIBLE_VERSION:
|
Checkbox@INCOMPATIBLE_VERSION:
|
||||||
X:380
|
X:380
|
||||||
Y:13
|
Y:468
|
||||||
Width:100
|
Width:100
|
||||||
Height:20
|
Height:20
|
||||||
Text:Incompatible
|
Text:Incompatible
|
||||||
|
Button@REFRESH_BUTTON:
|
||||||
|
X:PARENT_RIGHT - WIDTH - 20
|
||||||
|
Y:465
|
||||||
|
Width:100
|
||||||
|
Height:25
|
||||||
|
Text:Refresh
|
||||||
ScrollPanel@SERVER_LIST:
|
ScrollPanel@SERVER_LIST:
|
||||||
X:15
|
X:15
|
||||||
Y:45
|
Y:15
|
||||||
Width:700
|
Width:700
|
||||||
Height:440
|
Height:440
|
||||||
Children:
|
Children:
|
||||||
@@ -120,12 +126,18 @@ Container@SERVERBROWSER_PANEL:
|
|||||||
Width:140
|
Width:140
|
||||||
Height:35
|
Height:35
|
||||||
Text:Back
|
Text:Back
|
||||||
Button@REFRESH_BUTTON:
|
Button@CREATE_BUTTON:
|
||||||
|
X:PARENT_RIGHT - 140 - 10 - 140 - 10 - 140
|
||||||
|
Y:499
|
||||||
|
Width:140
|
||||||
|
Height:35
|
||||||
|
Text:Create
|
||||||
|
Button@DIRECTCONNECT_BUTTON:
|
||||||
X:PARENT_RIGHT - 140 - 10 - 140
|
X:PARENT_RIGHT - 140 - 10 - 140
|
||||||
Y:499
|
Y:499
|
||||||
Width:140
|
Width:140
|
||||||
Height:35
|
Height:35
|
||||||
Text:Refresh
|
Text:Direct IP
|
||||||
Button@JOIN_BUTTON:
|
Button@JOIN_BUTTON:
|
||||||
Key:return
|
Key:return
|
||||||
X:PARENT_RIGHT - 140
|
X:PARENT_RIGHT - 140
|
||||||
|
|||||||
@@ -427,13 +427,6 @@ Container@SETTINGS_PANEL:
|
|||||||
Height:20
|
Height:20
|
||||||
Font:Regular
|
Font:Regular
|
||||||
Text:Show Performance Graph
|
Text:Show Performance Graph
|
||||||
Checkbox@DEVELOPER_MENU_CHECKBOX:
|
|
||||||
X:15
|
|
||||||
Y:100
|
|
||||||
Width:300
|
|
||||||
Height:20
|
|
||||||
Font:Regular
|
|
||||||
Text:Enable Asset Browser (requires restart)
|
|
||||||
Label@HOTKEY_TITLE:
|
Label@HOTKEY_TITLE:
|
||||||
Y:140
|
Y:140
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ World:
|
|||||||
ActorMap:
|
ActorMap:
|
||||||
LoadWidgetAtGameStart:
|
LoadWidgetAtGameStart:
|
||||||
Widget: INGAME_ROOT
|
Widget: INGAME_ROOT
|
||||||
CncMenuPaletteEffect:
|
MenuPaletteEffect:
|
||||||
CloakPaletteEffect:
|
CloakPaletteEffect:
|
||||||
ScreenShaker:
|
ScreenShaker:
|
||||||
NukePaletteEffect:
|
NukePaletteEffect:
|
||||||
|
|||||||
@@ -1,105 +1,139 @@
|
|||||||
Background@MAINMENU:
|
Container@MAINMENU:
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
Logic:MainMenuLogic
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
|
||||||
Width:250
|
|
||||||
Height:500
|
|
||||||
Visible:true
|
|
||||||
Logic:MainMenuButtonsLogic
|
|
||||||
Children:
|
Children:
|
||||||
Label@MAINMENU_LABEL_TITLE:
|
Label@VERSION_LABEL:
|
||||||
X:0
|
X:WINDOW_RIGHT - 10
|
||||||
Y:20
|
Y:WINDOW_BOTTOM - 20
|
||||||
Width:250
|
Align:Right
|
||||||
Height:25
|
Font:Regular
|
||||||
Text:OpenD2k Main Menu
|
Contrast:True
|
||||||
Align:Center
|
Container@MENUS:
|
||||||
Font:Bold
|
X:100
|
||||||
Button@MAINMENU_BUTTON_JOIN:
|
Y:WINDOW_BOTTOM/2-HEIGHT/2
|
||||||
X:45
|
|
||||||
Y:70
|
|
||||||
Width:160
|
|
||||||
Height:25
|
|
||||||
Text:Join Game
|
|
||||||
Font:Bold
|
|
||||||
Button@MAINMENU_BUTTON_CREATE:
|
|
||||||
X:45
|
|
||||||
Y:110
|
|
||||||
Width:160
|
|
||||||
Height:25
|
|
||||||
Text:Create Game
|
|
||||||
Font:Bold
|
|
||||||
Button@MAINMENU_BUTTON_DIRECTCONNECT:
|
|
||||||
X:45
|
|
||||||
Y:150
|
|
||||||
Width:160
|
|
||||||
Height:25
|
|
||||||
Text:Direct Connect
|
|
||||||
Font:Bold
|
|
||||||
Button@MAINMENU_BUTTON_SETTINGS:
|
|
||||||
X:45
|
|
||||||
Y:190
|
|
||||||
Width:160
|
|
||||||
Height:25
|
|
||||||
Text:Settings
|
|
||||||
Font:Bold
|
|
||||||
Button@MAINMENU_BUTTON_MODS:
|
|
||||||
X:45
|
|
||||||
Y:230
|
|
||||||
Width:160
|
|
||||||
Height:25
|
|
||||||
Text:Mods
|
|
||||||
Font:Bold
|
|
||||||
Button@MAINMENU_BUTTON_MUSIC:
|
|
||||||
X:45
|
|
||||||
Y:270
|
|
||||||
Width:160
|
|
||||||
Height:25
|
|
||||||
Text:Music
|
|
||||||
Font:Bold
|
|
||||||
Button@MAINMENU_BUTTON_REPLAY_VIEWER:
|
|
||||||
X:45
|
|
||||||
Y:310
|
|
||||||
Width:160
|
|
||||||
Height:25
|
|
||||||
Text:Replay Viewer
|
|
||||||
Font:Bold
|
|
||||||
Button@MAINMENU_BUTTON_CREDITS:
|
|
||||||
X:45
|
|
||||||
Y:350
|
|
||||||
Width:160
|
|
||||||
Height:25
|
|
||||||
Text:Credits
|
|
||||||
Font:Bold
|
|
||||||
Button@MAINMENU_BUTTON_ASSET_BROWSER:
|
|
||||||
X:45
|
|
||||||
Y:390
|
|
||||||
Width:160
|
|
||||||
Height:25
|
|
||||||
Text:Asset Browser
|
|
||||||
Font:Bold
|
|
||||||
Button@MAINMENU_BUTTON_QUIT:
|
|
||||||
X:45
|
|
||||||
Y:430
|
|
||||||
Width:160
|
|
||||||
Height:25
|
|
||||||
Text:Quit
|
|
||||||
Font:Bold
|
|
||||||
Background@PERF_BG:
|
|
||||||
ClickThrough:true
|
|
||||||
Background:dialog4
|
|
||||||
Logic:PerfDebugLogic
|
|
||||||
X:10
|
|
||||||
Y:WINDOW_BOTTOM - 250
|
|
||||||
Width: 210
|
|
||||||
Height: 250
|
|
||||||
Children:
|
|
||||||
PerfGraph@GRAPH:
|
|
||||||
X:5
|
|
||||||
Y:5
|
|
||||||
Width:200
|
Width:200
|
||||||
Height:200
|
Height:320
|
||||||
Label@TEXT:
|
Children:
|
||||||
X:20
|
Background@MAIN_MENU:
|
||||||
Y:205
|
Width:PARENT_RIGHT
|
||||||
Width:170
|
Height:PARENT_BOTTOM
|
||||||
Height:40
|
Children:
|
||||||
|
Label@MAINMENU_LABEL_TITLE:
|
||||||
|
X:0
|
||||||
|
Y:20
|
||||||
|
Width:200
|
||||||
|
Height:30
|
||||||
|
Text:OpenRA
|
||||||
|
Align:Center
|
||||||
|
Font:Bold
|
||||||
|
Button@SINGLEPLAYER_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:60
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Singleplayer
|
||||||
|
Font:Bold
|
||||||
|
Button@MULTIPLAYER_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:100
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Multiplayer
|
||||||
|
Font:Bold
|
||||||
|
Button@MODS_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:140
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Mods
|
||||||
|
Font:Bold
|
||||||
|
Button@SETTINGS_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:180
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Settings
|
||||||
|
Font:Bold
|
||||||
|
Button@EXTRAS_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:220
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Extras
|
||||||
|
Font:Bold
|
||||||
|
Button@QUIT_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:260
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Quit
|
||||||
|
Font:Bold
|
||||||
|
Background@EXTRAS_MENU:
|
||||||
|
Width:PARENT_RIGHT
|
||||||
|
Height:PARENT_BOTTOM
|
||||||
|
Children:
|
||||||
|
Label@EXTRAS_MENU_TITLE:
|
||||||
|
X:0
|
||||||
|
Y:20
|
||||||
|
Width:200
|
||||||
|
Height:30
|
||||||
|
Text:Extras
|
||||||
|
Align:Center
|
||||||
|
Font:Bold
|
||||||
|
Button@REPLAYS_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:60
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Replays
|
||||||
|
Font:Bold
|
||||||
|
Button@MUSIC_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:100
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Music
|
||||||
|
Font:Bold
|
||||||
|
Button@ASSETBROWSER_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:140
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Asset Browser
|
||||||
|
Font:Bold
|
||||||
|
Button@CREDITS_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:180
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Credits
|
||||||
|
Font:Bold
|
||||||
|
Button@BACK_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Key:escape
|
||||||
|
Y:260
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Back
|
||||||
|
Font:Bold
|
||||||
|
Container@PERFORMANCE_INFO:
|
||||||
|
Logic:PerfDebugLogic
|
||||||
|
Children:
|
||||||
|
Label@PERF_TEXT:
|
||||||
|
X:30
|
||||||
|
Y:WINDOW_BOTTOM - 70
|
||||||
|
Width:170
|
||||||
|
Height:40
|
||||||
|
Contrast:true
|
||||||
|
Background@GRAPH_BG:
|
||||||
|
ClickThrough:true
|
||||||
|
Background:dialog4
|
||||||
|
X:WINDOW_RIGHT - 240
|
||||||
|
Y:WINDOW_BOTTOM - 240
|
||||||
|
Width:210
|
||||||
|
Height:210
|
||||||
|
Children:
|
||||||
|
PerfGraph@GRAPH:
|
||||||
|
X:5
|
||||||
|
Y:5
|
||||||
|
Width:200
|
||||||
|
Height:200
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
Background@ASSETBROWSER_BG:
|
Background@ASSETBROWSER_PANEL:
|
||||||
Logic:AssetBrowserLogic
|
Logic:AssetBrowserLogic
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Background@CREATESERVER_BG:
|
Background@CREATESERVER_PANEL:
|
||||||
Logic:ServerCreationLogic
|
Logic:ServerCreationLogic
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Background@DIRECTCONNECT_BG:
|
Background@DIRECTCONNECT_PANEL:
|
||||||
Logic:DirectConnectLogic
|
Logic:DirectConnectLogic
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
@@ -10,7 +10,7 @@ Background@DIRECTCONNECT_BG:
|
|||||||
Y:20
|
Y:20
|
||||||
Width:400
|
Width:400
|
||||||
Height:25
|
Height:25
|
||||||
Text:Direct Connect
|
Text:Connect to Server
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Label@ADDRESS_LABEL:
|
Label@ADDRESS_LABEL:
|
||||||
@@ -47,4 +47,4 @@ Background@DIRECTCONNECT_BG:
|
|||||||
Height:25
|
Height:25
|
||||||
Text:Cancel
|
Text:Cancel
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Key:escape
|
Key:escape
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Container@MAINMENU:
|
Container@MAINMENU:
|
||||||
|
Logic:MainMenuLogic
|
||||||
Children:
|
Children:
|
||||||
Background@BORDER:
|
Background@BORDER:
|
||||||
Background:mainmenu-border
|
Background:mainmenu-border
|
||||||
@@ -19,91 +20,114 @@ Container@MAINMENU:
|
|||||||
Align:Center
|
Align:Center
|
||||||
Font:Regular
|
Font:Regular
|
||||||
Contrast:True
|
Contrast:True
|
||||||
Background@MAINMENU_BG:
|
Container@MENUS:
|
||||||
X:(WINDOW_RIGHT - WIDTH)/8
|
X:100
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:WINDOW_BOTTOM/2-HEIGHT/2
|
||||||
Width:250
|
Width:200
|
||||||
Height:605
|
Height:320
|
||||||
Logic:MainMenuButtonsLogic
|
|
||||||
Children:
|
Children:
|
||||||
Label@MAINMENU_LABEL_TITLE:
|
Background@MAIN_MENU:
|
||||||
X:0
|
Width:PARENT_RIGHT
|
||||||
Y:20
|
Height:PARENT_BOTTOM
|
||||||
Width:250
|
Children:
|
||||||
Height:35
|
Label@MAINMENU_LABEL_TITLE:
|
||||||
Text:OpenRA
|
X:0
|
||||||
Align:Center
|
Y:20
|
||||||
Font:Title
|
Width:200
|
||||||
Button@MAINMENU_BUTTON_JOIN:
|
Height:30
|
||||||
X:45
|
Text:OpenRA
|
||||||
Y:80
|
Align:Center
|
||||||
Width:160
|
Font:Bold
|
||||||
Height:35
|
Button@SINGLEPLAYER_BUTTON:
|
||||||
Text:Join Game
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
Font:Bold
|
Y:60
|
||||||
Button@MAINMENU_BUTTON_CREATE:
|
Width:140
|
||||||
X:45
|
Height:30
|
||||||
Y:130
|
Text:Singleplayer
|
||||||
Width:160
|
Font:Bold
|
||||||
Height:35
|
Button@MULTIPLAYER_BUTTON:
|
||||||
Text:Create Game
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
Font:Bold
|
Y:100
|
||||||
Button@MAINMENU_BUTTON_DIRECTCONNECT:
|
Width:140
|
||||||
X:45
|
Height:30
|
||||||
Y:180
|
Text:Multiplayer
|
||||||
Width:160
|
Font:Bold
|
||||||
Height:35
|
Button@MODS_BUTTON:
|
||||||
Text:Direct Connect
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
Font:Bold
|
Y:140
|
||||||
Button@MAINMENU_BUTTON_SETTINGS:
|
Width:140
|
||||||
X:45
|
Height:30
|
||||||
Y:230
|
Text:Mods
|
||||||
Width:160
|
Font:Bold
|
||||||
Height:35
|
Button@SETTINGS_BUTTON:
|
||||||
Text:Settings
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
Font:Bold
|
Y:180
|
||||||
Button@MAINMENU_BUTTON_MODS:
|
Width:140
|
||||||
X:45
|
Height:30
|
||||||
Y:280
|
Text:Settings
|
||||||
Width:160
|
Font:Bold
|
||||||
Height:35
|
Button@EXTRAS_BUTTON:
|
||||||
Text:Mods
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
Font:Bold
|
Y:220
|
||||||
Button@MAINMENU_BUTTON_MUSIC:
|
Width:140
|
||||||
X:45
|
Height:30
|
||||||
Y:330
|
Text:Extras
|
||||||
Width:160
|
Font:Bold
|
||||||
Height:35
|
Button@QUIT_BUTTON:
|
||||||
Text:Music
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
Font:Bold
|
Y:260
|
||||||
Button@MAINMENU_BUTTON_REPLAY_VIEWER:
|
Width:140
|
||||||
X:45
|
Height:30
|
||||||
Y:380
|
Text:Quit
|
||||||
Width:160
|
Font:Bold
|
||||||
Height:35
|
Background@EXTRAS_MENU:
|
||||||
Text:Replay Viewer
|
Width:PARENT_RIGHT
|
||||||
Font:Bold
|
Height:PARENT_BOTTOM
|
||||||
Button@MAINMENU_BUTTON_CREDITS:
|
Children:
|
||||||
X:45
|
Label@EXTRAS_MENU_TITLE:
|
||||||
Y:430
|
X:0
|
||||||
Width:160
|
Y:20
|
||||||
Height:35
|
Width:200
|
||||||
Text:Credits
|
Height:30
|
||||||
Font:Bold
|
Text:Extras
|
||||||
Button@MAINMENU_BUTTON_ASSET_BROWSER:
|
Align:Center
|
||||||
X:45
|
Font:Bold
|
||||||
Y:480
|
Button@REPLAYS_BUTTON:
|
||||||
Width:160
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
Height:35
|
Y:60
|
||||||
Text:Asset Browser
|
Width:140
|
||||||
Font:Bold
|
Height:30
|
||||||
Button@MAINMENU_BUTTON_QUIT:
|
Text:Replays
|
||||||
X:45
|
Font:Bold
|
||||||
Y:530
|
Button@MUSIC_BUTTON:
|
||||||
Width:160
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
Height:35
|
Y:100
|
||||||
Text:Quit
|
Width:140
|
||||||
Font:Bold
|
Height:30
|
||||||
|
Text:Music
|
||||||
|
Font:Bold
|
||||||
|
Button@ASSETBROWSER_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:140
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Asset Browser
|
||||||
|
Font:Bold
|
||||||
|
Button@CREDITS_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Y:180
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Credits
|
||||||
|
Font:Bold
|
||||||
|
Button@BACK_BUTTON:
|
||||||
|
X:PARENT_RIGHT/2-WIDTH/2
|
||||||
|
Key:escape
|
||||||
|
Y:260
|
||||||
|
Width:140
|
||||||
|
Height:30
|
||||||
|
Text:Back
|
||||||
|
Font:Bold
|
||||||
Container@PERFORMANCE_INFO:
|
Container@PERFORMANCE_INFO:
|
||||||
Logic:PerfDebugLogic
|
Logic:PerfDebugLogic
|
||||||
Children:
|
Children:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Background@REPLAYBROWSER_BG:
|
Background@REPLAYBROWSER_PANEL:
|
||||||
Logic:ReplayBrowserLogic
|
Logic:ReplayBrowserLogic
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
Background@JOINSERVER_BG:
|
Background@SERVERBROWSER_PANEL:
|
||||||
Logic:ServerBrowserLogic
|
Logic:ServerBrowserLogic
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
Width:740
|
Width:740
|
||||||
Height:505
|
Height:500
|
||||||
Children:
|
Children:
|
||||||
Label@JOINSERVER_LABEL_TITLE:
|
Label@MULTIPLAYER_LABEL_TITLE:
|
||||||
X:0
|
X:0
|
||||||
Y:15
|
Y:15
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Height:25
|
Height:25
|
||||||
Text:Join Server
|
Text:Multiplayer
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Label@SHOW_LABEL_TITLE:
|
Label@SHOW_LABEL_TITLE:
|
||||||
@@ -48,7 +48,7 @@ Background@JOINSERVER_BG:
|
|||||||
X:20
|
X:20
|
||||||
Y:80
|
Y:80
|
||||||
Width:700
|
Width:700
|
||||||
Height:355
|
Height:360
|
||||||
Children:
|
Children:
|
||||||
ScrollItem@SERVER_TEMPLATE:
|
ScrollItem@SERVER_TEMPLATE:
|
||||||
Width:PARENT_RIGHT-27
|
Width:PARENT_RIGHT-27
|
||||||
@@ -115,6 +115,20 @@ Background@JOINSERVER_BG:
|
|||||||
Height:25
|
Height:25
|
||||||
Text:Refresh
|
Text:Refresh
|
||||||
Font:Bold
|
Font:Bold
|
||||||
|
Button@CREATE_BUTTON:
|
||||||
|
X:PARENT_RIGHT - 120 - 120 - 120 - 120
|
||||||
|
Y:PARENT_BOTTOM - 45
|
||||||
|
Width:100
|
||||||
|
Height:25
|
||||||
|
Text:Create
|
||||||
|
Font:Bold
|
||||||
|
Button@DIRECTCONNECT_BUTTON:
|
||||||
|
X:PARENT_RIGHT - 120 - 120 - 120
|
||||||
|
Y:PARENT_BOTTOM - 45
|
||||||
|
Width:100
|
||||||
|
Height:25
|
||||||
|
Text:Direct IP
|
||||||
|
Font:Bold
|
||||||
Button@JOIN_BUTTON:
|
Button@JOIN_BUTTON:
|
||||||
X:PARENT_RIGHT - 120 - 120
|
X:PARENT_RIGHT - 120 - 120
|
||||||
Y:PARENT_BOTTOM - 45
|
Y:PARENT_BOTTOM - 45
|
||||||
|
|||||||
@@ -415,13 +415,6 @@ Background@SETTINGS_PANEL:
|
|||||||
Height:20
|
Height:20
|
||||||
Font:Regular
|
Font:Regular
|
||||||
Text:Show Performance Graph
|
Text:Show Performance Graph
|
||||||
Checkbox@DEVELOPER_MENU_CHECKBOX:
|
|
||||||
X:15
|
|
||||||
Y:100
|
|
||||||
Width:300
|
|
||||||
Height:20
|
|
||||||
Font:Regular
|
|
||||||
Text:Enable Asset Browser (requires restart)
|
|
||||||
Label@HOTKEY_TITLE:
|
Label@HOTKEY_TITLE:
|
||||||
Y:140
|
Y:140
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
|
|||||||
Reference in New Issue
Block a user