Add a mission objectives GUI panel
This commit is contained in:
@@ -271,7 +271,7 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
public interface ILintPass { void Run(Action<string> emitError, Action<string> emitWarning, Map map); }
|
public interface ILintPass { void Run(Action<string> emitError, Action<string> emitWarning, Map map); }
|
||||||
|
|
||||||
public interface IObjectivesPanel { string ObjectivesPanel { get; } }
|
public interface IObjectivesPanel { string PanelName { get; } }
|
||||||
|
|
||||||
public interface INotifyObjectivesUpdated
|
public interface INotifyObjectivesUpdated
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,8 +75,6 @@
|
|||||||
<Compile Include="RenderGunboat.cs" />
|
<Compile Include="RenderGunboat.cs" />
|
||||||
<Compile Include="SpawnViceroid.cs" />
|
<Compile Include="SpawnViceroid.cs" />
|
||||||
<Compile Include="TiberiumRefinery.cs" />
|
<Compile Include="TiberiumRefinery.cs" />
|
||||||
<Compile Include="Widgets\Logic\CncConquestObjectivesLogic.cs" />
|
|
||||||
<Compile Include="Widgets\Logic\CncIngameMenuLogic.cs" />
|
|
||||||
<Compile Include="Widgets\Logic\CncMainMenuLogic.cs" />
|
<Compile Include="Widgets\Logic\CncMainMenuLogic.cs" />
|
||||||
<Compile Include="WithFire.cs" />
|
<Compile Include="WithFire.cs" />
|
||||||
<Compile Include="WithRoof.cs" />
|
<Compile Include="WithRoof.cs" />
|
||||||
|
|||||||
@@ -1,131 +0,0 @@
|
|||||||
#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;
|
|
||||||
using System.Linq;
|
|
||||||
using OpenRA.Graphics;
|
|
||||||
using OpenRA.Mods.RA;
|
|
||||||
using OpenRA.Mods.RA.Widgets;
|
|
||||||
using OpenRA.Traits;
|
|
||||||
using OpenRA.Widgets;
|
|
||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|
||||||
{
|
|
||||||
public class CncIngameMenuLogic
|
|
||||||
{
|
|
||||||
Widget menu;
|
|
||||||
|
|
||||||
enum PanelType { Objectives, Debug }
|
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
|
||||||
public CncIngameMenuLogic(Widget widget, World world, Action onExit, WorldRenderer worldRenderer)
|
|
||||||
{
|
|
||||||
var resumeDisabled = false;
|
|
||||||
menu = widget.Get("INGAME_MENU");
|
|
||||||
var mpe = world.WorldActor.Trait<MenuPaletteEffect>();
|
|
||||||
mpe.Fade(MenuPaletteEffect.EffectType.Desaturated);
|
|
||||||
|
|
||||||
menu.Get<LabelWidget>("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version;
|
|
||||||
|
|
||||||
var hideButtons = false;
|
|
||||||
menu.Get("MENU_BUTTONS").IsVisible = () => !hideButtons;
|
|
||||||
|
|
||||||
// TODO: Create a mechanism to do things like this cleaner. Also needed for scripted missions
|
|
||||||
Action onQuit = () =>
|
|
||||||
{
|
|
||||||
Sound.PlayNotification(world.Map.Rules, null, "Speech", "Leave", null);
|
|
||||||
resumeDisabled = true;
|
|
||||||
Game.RunAfterDelay(1200, () => mpe.Fade(MenuPaletteEffect.EffectType.Black));
|
|
||||||
Game.RunAfterDelay(1200 + 40 * mpe.Info.FadeLength, () =>
|
|
||||||
{
|
|
||||||
Game.Disconnect();
|
|
||||||
Ui.ResetAll();
|
|
||||||
Game.LoadShellMap();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
Action doNothing = () => { };
|
|
||||||
|
|
||||||
menu.Get<ButtonWidget>("QUIT_BUTTON").OnClick = () =>
|
|
||||||
ConfirmationDialogs.PromptConfirmAction("Abort Mission", "Leave this game and return to the menu?", onQuit, doNothing);
|
|
||||||
|
|
||||||
Action onSurrender = () => world.IssueOrder(new Order("Surrender", world.LocalPlayer.PlayerActor, false));
|
|
||||||
var surrenderButton = menu.Get<ButtonWidget>("SURRENDER_BUTTON");
|
|
||||||
surrenderButton.IsDisabled = () => (world.LocalPlayer == null || world.LocalPlayer.WinState != WinState.Undefined);
|
|
||||||
surrenderButton.OnClick = () =>
|
|
||||||
ConfirmationDialogs.PromptConfirmAction("Surrender", "Are you sure you want to surrender?", onSurrender, doNothing);
|
|
||||||
|
|
||||||
menu.Get<ButtonWidget>("MUSIC_BUTTON").OnClick = () =>
|
|
||||||
{
|
|
||||||
hideButtons = true;
|
|
||||||
Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "onExit", () => hideButtons = false },
|
|
||||||
{ "world", world }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
menu.Get<ButtonWidget>("SETTINGS_BUTTON").OnClick = () =>
|
|
||||||
{
|
|
||||||
hideButtons = true;
|
|
||||||
Ui.OpenWindow("SETTINGS_PANEL", new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "world", world },
|
|
||||||
{ "worldRenderer", worldRenderer },
|
|
||||||
{ "onExit", () => hideButtons = false },
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var resumeButton = menu.Get<ButtonWidget>("RESUME_BUTTON");
|
|
||||||
resumeButton.IsDisabled = () => resumeDisabled;
|
|
||||||
resumeButton.OnClick = () =>
|
|
||||||
{
|
|
||||||
Ui.CloseWindow();
|
|
||||||
Ui.Root.RemoveChild(menu);
|
|
||||||
world.WorldActor.Trait<MenuPaletteEffect>().Fade(MenuPaletteEffect.EffectType.None);
|
|
||||||
onExit();
|
|
||||||
};
|
|
||||||
|
|
||||||
// Menu panels - ordered from lowest to highest priority
|
|
||||||
var panelParent = Game.OpenWindow(world, "INGAME_MENU_PANEL");
|
|
||||||
var panelType = PanelType.Objectives;
|
|
||||||
var visibleButtons = 0;
|
|
||||||
|
|
||||||
// Debug / Cheats panel
|
|
||||||
var debugButton = panelParent.Get<ButtonWidget>("DEBUG_BUTTON");
|
|
||||||
debugButton.OnClick = () => panelType = PanelType.Debug;
|
|
||||||
debugButton.IsHighlighted = () => panelType == PanelType.Debug;
|
|
||||||
|
|
||||||
if (world.LocalPlayer != null && world.LobbyInfo.GlobalSettings.AllowCheats)
|
|
||||||
{
|
|
||||||
panelType = PanelType.Debug;
|
|
||||||
visibleButtons++;
|
|
||||||
var debugPanel = Game.LoadWidget(world, "DEBUG_PANEL", panelParent, new WidgetArgs() { { "onExit", doNothing }, { "transient", true } });
|
|
||||||
debugPanel.IsVisible = () => panelType == PanelType.Debug;
|
|
||||||
debugButton.IsVisible = () => visibleButtons > 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mission objectives
|
|
||||||
var iop = world.WorldActor.TraitsImplementing<IObjectivesPanel>().FirstOrDefault();
|
|
||||||
var objectivesButton = panelParent.Get<ButtonWidget>("OBJECTIVES_BUTTON");
|
|
||||||
objectivesButton.OnClick = () => panelType = PanelType.Objectives;
|
|
||||||
objectivesButton.IsHighlighted = () => panelType == PanelType.Objectives;
|
|
||||||
|
|
||||||
if (iop != null && iop.ObjectivesPanel != null)
|
|
||||||
{
|
|
||||||
panelType = PanelType.Objectives;
|
|
||||||
visibleButtons++;
|
|
||||||
var objectivesPanel = Game.LoadWidget(world, iop.ObjectivesPanel, panelParent, new WidgetArgs());
|
|
||||||
objectivesPanel.IsVisible = () => panelType == PanelType.Objectives;
|
|
||||||
objectivesButton.IsVisible = () => visibleButtons > 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,6 +13,8 @@ using System.Linq;
|
|||||||
using OpenRA.Mods.RA;
|
using OpenRA.Mods.RA;
|
||||||
using OpenRA.Mods.RA.Buildings;
|
using OpenRA.Mods.RA.Buildings;
|
||||||
using OpenRA.Mods.RA.Widgets;
|
using OpenRA.Mods.RA.Widgets;
|
||||||
|
using OpenRA.Mods.RA.Widgets.Logic;
|
||||||
|
using OpenRA.Mods.D2k.Widgets;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
using OpenRA.Widgets;
|
using OpenRA.Widgets;
|
||||||
|
|
||||||
@@ -40,54 +42,12 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
|
|||||||
|
|
||||||
void InitRootWidgets()
|
void InitRootWidgets()
|
||||||
{
|
{
|
||||||
var cachedPause = false;
|
|
||||||
Widget optionsBG = null;
|
|
||||||
optionsBG = Game.LoadWidget(world, "INGAME_OPTIONS_BG", Ui.Root, new WidgetArgs
|
|
||||||
{
|
|
||||||
{ "transient", false },
|
|
||||||
{ "onExit", () =>
|
|
||||||
{
|
|
||||||
optionsBG.Visible = false;
|
|
||||||
|
|
||||||
if (world.LobbyInfo.IsSinglePlayer)
|
|
||||||
world.SetPauseState(cachedPause);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
optionsBG.Visible = false;
|
|
||||||
|
|
||||||
gameRoot.Get<ButtonWidget>("INGAME_OPTIONS_BUTTON").OnClick = () =>
|
|
||||||
{
|
|
||||||
optionsBG.Visible ^= true;
|
|
||||||
if (optionsBG.Visible)
|
|
||||||
{
|
|
||||||
cachedPause = world.PredictedPaused;
|
|
||||||
|
|
||||||
if (world.LobbyInfo.IsSinglePlayer)
|
|
||||||
world.SetPauseState(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
world.SetPauseState(cachedPause);
|
|
||||||
};
|
|
||||||
|
|
||||||
Game.LoadWidget(world, "CHAT_PANEL", gameRoot, new WidgetArgs());
|
Game.LoadWidget(world, "CHAT_PANEL", gameRoot, new WidgetArgs());
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitObserverWidgets()
|
void InitObserverWidgets()
|
||||||
{
|
{
|
||||||
var observerWidgets = Game.LoadWidget(world, "OBSERVER_WIDGETS", playerRoot, new WidgetArgs());
|
Game.LoadWidget(world, "OBSERVER_WIDGETS", playerRoot, new WidgetArgs());
|
||||||
|
|
||||||
Widget observerstats = null;
|
|
||||||
observerstats = Game.LoadWidget(world, "INGAME_OBSERVERSTATS_BG", observerWidgets, new WidgetArgs
|
|
||||||
{
|
|
||||||
{ "transient", false },
|
|
||||||
{ "onExit", () => observerstats.Visible = false }
|
|
||||||
});
|
|
||||||
observerstats.Visible = false;
|
|
||||||
|
|
||||||
var statsButton = observerWidgets.Get<ButtonWidget>("OBSERVER_STATS_BUTTON");
|
|
||||||
statsButton.OnClick = () => observerstats.Visible ^= true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum RadarBinState { Closed, BinAnimating, RadarAnimating, Open };
|
enum RadarBinState { Closed, BinAnimating, RadarAnimating, Open };
|
||||||
@@ -95,41 +55,6 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
|
|||||||
{
|
{
|
||||||
var playerWidgets = Game.LoadWidget(world, "PLAYER_WIDGETS", playerRoot, new WidgetArgs());
|
var playerWidgets = Game.LoadWidget(world, "PLAYER_WIDGETS", playerRoot, new WidgetArgs());
|
||||||
|
|
||||||
Widget diplomacy = null;
|
|
||||||
diplomacy = Game.LoadWidget(world, "INGAME_DIPLOMACY_BG", playerWidgets, new WidgetArgs
|
|
||||||
{
|
|
||||||
{ "transient", false },
|
|
||||||
{ "onExit", () => diplomacy.Visible = false }
|
|
||||||
});
|
|
||||||
diplomacy.Visible = false;
|
|
||||||
|
|
||||||
var diplomacyButton = playerWidgets.Get<ButtonWidget>("INGAME_DIPLOMACY_BUTTON");
|
|
||||||
diplomacyButton.OnClick = () => diplomacy.Visible ^= true;
|
|
||||||
var validPlayers = 0;
|
|
||||||
validPlayers = world.Players.Where(a => a != world.LocalPlayer && !a.NonCombatant).Count();
|
|
||||||
diplomacyButton.IsVisible = () => validPlayers > 0;
|
|
||||||
|
|
||||||
Widget cheats = null;
|
|
||||||
cheats = Game.LoadWidget(world, "INGAME_DEBUG_BG", playerWidgets, new WidgetArgs
|
|
||||||
{
|
|
||||||
{ "transient", false },
|
|
||||||
{ "onExit", () => cheats.Visible = false }
|
|
||||||
});
|
|
||||||
cheats.Visible = false;
|
|
||||||
|
|
||||||
var cheatsButton = playerWidgets.Get<ButtonWidget>("INGAME_DEBUG_BUTTON");
|
|
||||||
cheatsButton.OnClick = () => cheats.Visible ^= true;
|
|
||||||
cheatsButton.IsVisible = () => world.LobbyInfo.GlobalSettings.AllowCheats;
|
|
||||||
|
|
||||||
var iop = world.WorldActor.TraitsImplementing<IObjectivesPanel>().FirstOrDefault();
|
|
||||||
if (iop != null && iop.ObjectivesPanel != null)
|
|
||||||
{
|
|
||||||
var objectivesButton = playerWidgets.Get<ButtonWidget>("OBJECTIVES_BUTTON");
|
|
||||||
var objectivesWidget = Game.LoadWidget(world, iop.ObjectivesPanel, playerWidgets, new WidgetArgs());
|
|
||||||
objectivesButton.Visible = true;
|
|
||||||
objectivesButton.OnClick += () => objectivesWidget.Visible ^= true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var radarActive = false;
|
var radarActive = false;
|
||||||
var binState = RadarBinState.Closed;
|
var binState = RadarBinState.Closed;
|
||||||
var radarBin = playerWidgets.Get<SlidingContainerWidget>("INGAME_RADAR_BIN");
|
var radarBin = playerWidgets.Get<SlidingContainerWidget>("INGAME_RADAR_BIN");
|
||||||
|
|||||||
@@ -91,19 +91,4 @@ namespace OpenRA.Mods.RA
|
|||||||
[Desc("Tag trait for things that must be destroyed for a short game to end.")]
|
[Desc("Tag trait for things that must be destroyed for a short game to end.")]
|
||||||
public class MustBeDestroyedInfo : TraitInfo<MustBeDestroyed> { }
|
public class MustBeDestroyedInfo : TraitInfo<MustBeDestroyed> { }
|
||||||
public class MustBeDestroyed { }
|
public class MustBeDestroyed { }
|
||||||
|
|
||||||
[Desc("Provides game mode information for players/observers.",
|
|
||||||
"Goes on WorldActor - observers don't have a player it can live on.")]
|
|
||||||
public class ConquestObjectivesPanelInfo : ITraitInfo
|
|
||||||
{
|
|
||||||
public string ObjectivesPanel = null;
|
|
||||||
public object Create(ActorInitializer init) { return new ConquestObjectivesPanel(this); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ConquestObjectivesPanel : IObjectivesPanel
|
|
||||||
{
|
|
||||||
ConquestObjectivesPanelInfo info;
|
|
||||||
public ConquestObjectivesPanel(ConquestObjectivesPanelInfo info) { this.info = info; }
|
|
||||||
public string ObjectivesPanel { get { return info.ObjectivesPanel; } }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,9 +21,12 @@ namespace OpenRA.Mods.RA
|
|||||||
[Desc("Time (in ticks) to fade between states")]
|
[Desc("Time (in ticks) to fade between states")]
|
||||||
public readonly int FadeLength = 10;
|
public readonly int FadeLength = 10;
|
||||||
|
|
||||||
[Desc("Effect style to fade to. Accepts values of None or Desaturated")]
|
[Desc("Effect style to fade to during gameplay. Accepts values of None or Desaturated.")]
|
||||||
public readonly MenuPaletteEffect.EffectType Effect = MenuPaletteEffect.EffectType.None;
|
public readonly MenuPaletteEffect.EffectType Effect = MenuPaletteEffect.EffectType.None;
|
||||||
|
|
||||||
|
[Desc("Effect style to fade to when opening the in-game menu. Accepts values of None, Black or Desaturated.")]
|
||||||
|
public readonly MenuPaletteEffect.EffectType MenuEffect = MenuPaletteEffect.EffectType.None;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new MenuPaletteEffect(this); }
|
public object Create(ActorInitializer init) { return new MenuPaletteEffect(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -373,6 +373,10 @@
|
|||||||
<Compile Include="Widgets\Logic\KickSpectatorsLogic.cs" />
|
<Compile Include="Widgets\Logic\KickSpectatorsLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\MissionBrowserLogic.cs" />
|
<Compile Include="Widgets\Logic\MissionBrowserLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\IngameMenuLogic.cs" />
|
<Compile Include="Widgets\Logic\IngameMenuLogic.cs" />
|
||||||
|
<Compile Include="Widgets\Logic\Ingame\GameInfoLogic.cs" />
|
||||||
|
<Compile Include="Widgets\Logic\Ingame\GameInfoBriefingLogic.cs" />
|
||||||
|
<Compile Include="Widgets\Logic\Ingame\GameInfoObjectivesLogic.cs" />
|
||||||
|
<Compile Include="Widgets\Logic\Ingame\GameInfoStatsLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\IrcLogic.cs" />
|
<Compile Include="Widgets\Logic\IrcLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\KickClientLogic.cs" />
|
<Compile Include="Widgets\Logic\KickClientLogic.cs" />
|
||||||
<Compile Include="Widgets\Logic\ModBrowserLogic.cs" />
|
<Compile Include="Widgets\Logic\ModBrowserLogic.cs" />
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.Primitives;
|
using OpenRA.Primitives;
|
||||||
@@ -77,6 +78,7 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
objectives.Insert(newID, new MissionObjective(type, description));
|
objectives.Insert(newID, new MissionObjective(type, description));
|
||||||
|
|
||||||
|
ObjectiveAdded(player);
|
||||||
foreach (var imo in player.PlayerActor.TraitsImplementing<INotifyObjectivesUpdated>())
|
foreach (var imo in player.PlayerActor.TraitsImplementing<INotifyObjectivesUpdated>())
|
||||||
imo.OnObjectiveAdded(player, newID);
|
imo.OnObjectiveAdded(player, newID);
|
||||||
|
|
||||||
@@ -195,8 +197,26 @@ namespace OpenRA.Mods.RA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public event Action<Player> ObjectiveAdded = player => { };
|
||||||
|
|
||||||
public void OnObjectiveAdded(Player player, int id) {}
|
public void OnObjectiveAdded(Player player, int id) {}
|
||||||
public void OnObjectiveCompleted(Player player, int id) {}
|
public void OnObjectiveCompleted(Player player, int id) {}
|
||||||
public void OnObjectiveFailed(Player player, int id) {}
|
public void OnObjectiveFailed(Player player, int id) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Desc("Provides game mode progress information for players.",
|
||||||
|
"Goes on WorldActor - observers don't have a player it can live on.",
|
||||||
|
"Current options for PanelName are 'SKIRMISH_STATS' and 'MISSION_OBJECTIVES'.")]
|
||||||
|
public class ObjectivesPanelInfo : ITraitInfo
|
||||||
|
{
|
||||||
|
public string PanelName = null;
|
||||||
|
public object Create(ActorInitializer init) { return new ObjectivesPanel(this); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ObjectivesPanel : IObjectivesPanel
|
||||||
|
{
|
||||||
|
ObjectivesPanelInfo info;
|
||||||
|
public ObjectivesPanel(ObjectivesPanelInfo info) { this.info = info; }
|
||||||
|
public string PanelName { get { return info.PanelName; } }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
public class DebugMenuLogic
|
public class DebugMenuLogic
|
||||||
{
|
{
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public DebugMenuLogic(Widget widget, Action onExit, World world, bool transient)
|
public DebugMenuLogic(Widget widget, World world)
|
||||||
{
|
{
|
||||||
var devTrait = world.LocalPlayer.PlayerActor.Trait<DeveloperMode>();
|
var devTrait = world.LocalPlayer.PlayerActor.Trait<DeveloperMode>();
|
||||||
|
|
||||||
@@ -112,21 +112,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
showAstarCostCheckbox.IsChecked = () => dbgOverlay != null ? dbgOverlay.Visible : false;
|
showAstarCostCheckbox.IsChecked = () => dbgOverlay != null ? dbgOverlay.Visible : false;
|
||||||
showAstarCostCheckbox.OnClick = () => { if (dbgOverlay != null) dbgOverlay.Visible ^= true; };
|
showAstarCostCheckbox.OnClick = () => { if (dbgOverlay != null) dbgOverlay.Visible ^= true; };
|
||||||
}
|
}
|
||||||
|
|
||||||
var close = widget.GetOrNull<ButtonWidget>("CLOSE");
|
|
||||||
if (close != null)
|
|
||||||
{
|
|
||||||
close.OnClick = () =>
|
|
||||||
{
|
|
||||||
if (transient)
|
|
||||||
{
|
|
||||||
Ui.CloseWindow();
|
|
||||||
Ui.Root.RemoveChild(widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
onExit();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Order(World world, string order)
|
public void Order(World world, string order)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
ScrollPanelWidget diplomacyPanel;
|
ScrollPanelWidget diplomacyPanel;
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public DiplomacyLogic(Widget widget, Action onExit, World world, bool transient)
|
public DiplomacyLogic(Widget widget, Action onExit, World world)
|
||||||
{
|
{
|
||||||
this.world = world;
|
this.world = world;
|
||||||
|
|
||||||
@@ -33,18 +33,12 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
|
|
||||||
var close = widget.GetOrNull<ButtonWidget>("CLOSE");
|
var close = widget.GetOrNull<ButtonWidget>("CLOSE");
|
||||||
if (close != null)
|
if (close != null)
|
||||||
{
|
|
||||||
close.OnClick = () =>
|
close.OnClick = () =>
|
||||||
{
|
{
|
||||||
if (transient)
|
Ui.CloseWindow();
|
||||||
{
|
Ui.Root.RemoveChild(widget);
|
||||||
Ui.CloseWindow();
|
|
||||||
Ui.Root.RemoveChild(widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
onExit();
|
onExit();
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LayoutPlayers()
|
void LayoutPlayers()
|
||||||
|
|||||||
38
OpenRA.Mods.RA/Widgets/Logic/Ingame/GameInfoBriefingLogic.cs
Normal file
38
OpenRA.Mods.RA/Widgets/Logic/Ingame/GameInfoBriefingLogic.cs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#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;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
using OpenRA.Mods.RA;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||||
|
{
|
||||||
|
class GameInfoBriefingLogic
|
||||||
|
{
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public GameInfoBriefingLogic(Widget widget, World world)
|
||||||
|
{
|
||||||
|
var previewWidget = widget.Get<MapPreviewWidget>("MAP_PREVIEW");
|
||||||
|
previewWidget.Preview = () => Game.modData.MapCache[world.Map.Uid];
|
||||||
|
|
||||||
|
var mapDescriptionPanel = widget.Get<ScrollPanelWidget>("MAP_DESCRIPTION_PANEL");
|
||||||
|
var mapDescription = widget.Get<LabelWidget>("MAP_DESCRIPTION");
|
||||||
|
var mapFont = Game.Renderer.Fonts[mapDescription.Font];
|
||||||
|
var text = world.Map.Description != null ? world.Map.Description.Replace("\\n", "\n") : "";
|
||||||
|
text = WidgetUtils.WrapText(text, mapDescription.Bounds.Width, mapFont);
|
||||||
|
mapDescription.Text = text;
|
||||||
|
mapDescription.Bounds.Height = mapFont.Measure(text).Y;
|
||||||
|
mapDescriptionPanel.ScrollToTop();
|
||||||
|
mapDescriptionPanel.Layout.AdjustChildren();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
109
OpenRA.Mods.RA/Widgets/Logic/Ingame/GameInfoLogic.cs
Normal file
109
OpenRA.Mods.RA/Widgets/Logic/Ingame/GameInfoLogic.cs
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
#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;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
using OpenRA.Mods.RA;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||||
|
{
|
||||||
|
public enum IngameInfoPanel { AutoSelect, Map, Objectives, Debug };
|
||||||
|
|
||||||
|
class GameInfoLogic
|
||||||
|
{
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public GameInfoLogic(Widget widget, World world, IngameInfoPanel activePanel)
|
||||||
|
{
|
||||||
|
var lp = world.LocalPlayer;
|
||||||
|
var numTabs = 0;
|
||||||
|
|
||||||
|
widget.IsVisible = () => activePanel != IngameInfoPanel.AutoSelect;
|
||||||
|
|
||||||
|
// Objectives/Stats tab
|
||||||
|
var iop = world.WorldActor.TraitsImplementing<IObjectivesPanel>().FirstOrDefault();
|
||||||
|
if (lp != null && iop != null && iop.PanelName != null)
|
||||||
|
{
|
||||||
|
numTabs++;
|
||||||
|
var objectivesTabButton = widget.Get<ButtonWidget>(string.Concat("BUTTON", numTabs.ToString()));
|
||||||
|
objectivesTabButton.GetText = () => "Objectives";
|
||||||
|
objectivesTabButton.IsVisible = () => lp != null && numTabs > 1;
|
||||||
|
objectivesTabButton.OnClick = () => activePanel = IngameInfoPanel.Objectives;
|
||||||
|
objectivesTabButton.IsHighlighted = () => activePanel == IngameInfoPanel.Objectives;
|
||||||
|
|
||||||
|
var objectivesPanel = widget.Get<ContainerWidget>("OBJECTIVES_PANEL");
|
||||||
|
objectivesPanel.IsVisible = () => activePanel == IngameInfoPanel.Objectives;
|
||||||
|
|
||||||
|
Game.LoadWidget(world, iop.PanelName, objectivesPanel, new WidgetArgs());
|
||||||
|
|
||||||
|
if (activePanel == IngameInfoPanel.AutoSelect)
|
||||||
|
activePanel = IngameInfoPanel.Objectives;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Briefing tab
|
||||||
|
if (world.Map.CustomPreview != null)
|
||||||
|
{
|
||||||
|
numTabs++;
|
||||||
|
var mapTabButton = widget.Get<ButtonWidget>(string.Concat("BUTTON", numTabs.ToString()));
|
||||||
|
mapTabButton.Text = "Briefing";
|
||||||
|
mapTabButton.IsVisible = () => numTabs > 1;
|
||||||
|
mapTabButton.OnClick = () => activePanel = IngameInfoPanel.Map;
|
||||||
|
mapTabButton.IsHighlighted = () => activePanel == IngameInfoPanel.Map;
|
||||||
|
|
||||||
|
var mapPanel = widget.Get<ContainerWidget>("MAP_PANEL");
|
||||||
|
mapPanel.IsVisible = () => activePanel == IngameInfoPanel.Map;
|
||||||
|
|
||||||
|
Game.LoadWidget(world, "MAP_PANEL", mapPanel, new WidgetArgs());
|
||||||
|
|
||||||
|
if (activePanel == IngameInfoPanel.AutoSelect)
|
||||||
|
activePanel = IngameInfoPanel.Map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Debug/Cheats tab
|
||||||
|
if (lp != null && world.LobbyInfo.GlobalSettings.AllowCheats)
|
||||||
|
{
|
||||||
|
numTabs++;
|
||||||
|
var debugTabButton = widget.Get<ButtonWidget>(string.Concat("BUTTON", numTabs.ToString()));
|
||||||
|
debugTabButton.Text = "Debug";
|
||||||
|
debugTabButton.IsVisible = () => lp != null && world.LobbyInfo.GlobalSettings.AllowCheats && numTabs > 1;
|
||||||
|
debugTabButton.OnClick = () => activePanel = IngameInfoPanel.Debug;
|
||||||
|
debugTabButton.IsHighlighted = () => activePanel == IngameInfoPanel.Debug;
|
||||||
|
|
||||||
|
var debugPanelContainer = widget.Get<ContainerWidget>("DEBUG_PANEL");
|
||||||
|
debugPanelContainer.IsVisible = () => activePanel == IngameInfoPanel.Debug;
|
||||||
|
|
||||||
|
Game.LoadWidget(world, "DEBUG_PANEL", debugPanelContainer, new WidgetArgs());
|
||||||
|
|
||||||
|
if (activePanel == IngameInfoPanel.AutoSelect)
|
||||||
|
activePanel = IngameInfoPanel.Debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle empty space when tabs aren't displayed
|
||||||
|
var titleText = widget.Get<LabelWidget>("TITLE");
|
||||||
|
var titleTextNoTabs = widget.GetOrNull<LabelWidget>("TITLE_NO_TABS");
|
||||||
|
|
||||||
|
titleText.IsVisible = () => numTabs > 1 || (numTabs == 1 && titleTextNoTabs == null);
|
||||||
|
titleText.GetText = () => string.Concat(world.Map.Type, ": ", world.Map.Title);
|
||||||
|
if (titleTextNoTabs != null)
|
||||||
|
{
|
||||||
|
titleTextNoTabs.IsVisible = () => numTabs == 1;
|
||||||
|
titleTextNoTabs.GetText = () => string.Concat(world.Map.Type, ": ", world.Map.Title);
|
||||||
|
}
|
||||||
|
|
||||||
|
var bg = widget.Get<BackgroundWidget>("BACKGROUND");
|
||||||
|
var bgNoTabs = widget.GetOrNull<BackgroundWidget>("BACKGROUND_NO_TABS");
|
||||||
|
|
||||||
|
bg.IsVisible = () => numTabs > 1 || (numTabs == 1 && bgNoTabs == null);
|
||||||
|
if (bgNoTabs != null)
|
||||||
|
bgNoTabs.IsVisible = () => numTabs == 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
#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;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Drawing;
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
using OpenRA.Mods.RA;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||||
|
{
|
||||||
|
class GameInfoObjectivesLogic
|
||||||
|
{
|
||||||
|
ContainerWidget template;
|
||||||
|
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public GameInfoObjectivesLogic(Widget widget, World world)
|
||||||
|
{
|
||||||
|
var lp = world.LocalPlayer;
|
||||||
|
|
||||||
|
var missionStatus = widget.Get<LabelWidget>("MISSION_STATUS");
|
||||||
|
missionStatus.GetText = () => lp.WinState == WinState.Undefined ? "In progress" :
|
||||||
|
lp.WinState == WinState.Won ? "Accomplished" : "Failed";
|
||||||
|
missionStatus.GetColor = () => lp.WinState == WinState.Undefined ? Color.White :
|
||||||
|
lp.WinState == WinState.Won ? Color.LimeGreen : Color.Red;
|
||||||
|
|
||||||
|
var mo = lp.PlayerActor.TraitOrDefault<MissionObjectives>();
|
||||||
|
if (mo == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var objectivesPanel = widget.Get<ScrollPanelWidget>("OBJECTIVES_PANEL");
|
||||||
|
template = objectivesPanel.Get<ContainerWidget>("OBJECTIVE_TEMPLATE");
|
||||||
|
|
||||||
|
PopulateObjectivesList(mo, objectivesPanel, template);
|
||||||
|
|
||||||
|
Action<Player> RedrawObjectives = player =>
|
||||||
|
{
|
||||||
|
if (player == lp)
|
||||||
|
PopulateObjectivesList(mo, objectivesPanel, template);
|
||||||
|
};
|
||||||
|
mo.ObjectiveAdded += RedrawObjectives;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopulateObjectivesList(MissionObjectives mo, ScrollPanelWidget parent, ContainerWidget template)
|
||||||
|
{
|
||||||
|
parent.RemoveChildren();
|
||||||
|
|
||||||
|
foreach (var objective in mo.Objectives.OrderBy(o => o.Type))
|
||||||
|
{
|
||||||
|
var widget = template.Clone();
|
||||||
|
|
||||||
|
var label = widget.Get<LabelWidget>("OBJECTIVE_TYPE");
|
||||||
|
label.GetText = () => objective.Type == ObjectiveType.Primary ? "Primary" : "Secondary";
|
||||||
|
|
||||||
|
var checkbox = widget.Get<CheckboxWidget>("OBJECTIVE_STATUS");
|
||||||
|
checkbox.IsChecked = () => objective.State != ObjectiveState.Incomplete;
|
||||||
|
checkbox.GetCheckType = () => objective.State == ObjectiveState.Completed ? "checked" : "crossed";
|
||||||
|
checkbox.GetText = () => objective.Description;
|
||||||
|
|
||||||
|
parent.AddChild(widget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,
|
||||||
@@ -8,46 +8,42 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.Mods.RA;
|
|
||||||
using OpenRA.Widgets;
|
using OpenRA.Widgets;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
using OpenRA.Mods.RA;
|
||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Widgets.Logic
|
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||||
{
|
{
|
||||||
public class CncConquestObjectivesLogic
|
class GameInfoStatsLogic
|
||||||
{
|
{
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public CncConquestObjectivesLogic(Widget widget, World world)
|
public GameInfoStatsLogic(Widget widget, World world)
|
||||||
{
|
{
|
||||||
var panel = widget.Get("CONQUEST_OBJECTIVES");
|
var lp = world.LocalPlayer;
|
||||||
panel.Get<LabelWidget>("TITLE").GetText = () => "Conquest: " + world.Map.Title;
|
|
||||||
|
|
||||||
var statusLabel = panel.Get<LabelWidget>("STATUS");
|
var checkbox = widget.Get<CheckboxWidget>("STATS_CHECKBOX");
|
||||||
statusLabel.IsVisible = () => world.LocalPlayer != null;
|
checkbox.IsChecked = () => lp.WinState != WinState.Undefined;
|
||||||
|
checkbox.GetCheckType = () => lp.WinState == WinState.Won ?
|
||||||
|
"checked" : "crossed";
|
||||||
|
|
||||||
if (world.LocalPlayer != null)
|
var statusLabel = widget.Get<LabelWidget>("STATS_STATUS");
|
||||||
{
|
|
||||||
var lp = world.LocalPlayer;
|
|
||||||
var objectiveCheckbox = panel.Get<CheckboxWidget>("1");
|
|
||||||
objectiveCheckbox.IsChecked = () => lp.WinState != WinState.Undefined;
|
|
||||||
objectiveCheckbox.GetCheckType = () => lp.WinState == WinState.Won ?
|
|
||||||
"checked" : "crossed";
|
|
||||||
|
|
||||||
statusLabel.GetText = () => lp.WinState == WinState.Won ? "Complete" :
|
statusLabel.GetText = () => lp.WinState == WinState.Won ? "Accomplished" :
|
||||||
lp.WinState == WinState.Lost ? "Failed" : "Incomplete";
|
lp.WinState == WinState.Lost ? "Failed" : "In progress";
|
||||||
statusLabel.GetColor = () => lp.WinState == WinState.Won ? Color.Green :
|
statusLabel.GetColor = () => lp.WinState == WinState.Won ? Color.LimeGreen :
|
||||||
lp.WinState == WinState.Lost ? Color.Red : Color.White;
|
lp.WinState == WinState.Lost ? Color.Red : Color.White;
|
||||||
}
|
|
||||||
|
|
||||||
var scrollpanel = panel.Get<ScrollPanelWidget>("PLAYER_LIST");
|
var playerPanel = widget.Get<ScrollPanelWidget>("PLAYER_LIST");
|
||||||
var itemTemplate = scrollpanel.Get("PLAYER_TEMPLATE");
|
var playerTemplate = playerPanel.Get("PLAYER_TEMPLATE");
|
||||||
scrollpanel.RemoveChildren();
|
playerPanel.RemoveChildren();
|
||||||
|
|
||||||
foreach (var p in world.Players.Where(a => !a.NonCombatant))
|
foreach (var p in world.Players.Where(a => !a.NonCombatant))
|
||||||
{
|
{
|
||||||
var pp = p;
|
var pp = p;
|
||||||
var item = itemTemplate.Clone();
|
var item = playerTemplate.Clone();
|
||||||
var nameLabel = item.Get<LabelWidget>("NAME");
|
var nameLabel = item.Get<LabelWidget>("NAME");
|
||||||
nameLabel.GetText = () => pp.WinState == WinState.Lost ? pp.PlayerName + " (Dead)" : pp.PlayerName;
|
nameLabel.GetText = () => pp.WinState == WinState.Lost ? pp.PlayerName + " (Dead)" : pp.PlayerName;
|
||||||
nameLabel.GetColor = () => pp.Color.RGB;
|
nameLabel.GetColor = () => pp.Color.RGB;
|
||||||
@@ -61,7 +57,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
var client = world.LobbyInfo.ClientWithIndex(pp.ClientIndex);
|
var client = world.LobbyInfo.ClientWithIndex(pp.ClientIndex);
|
||||||
var teamNumber = (client == null) ? 0 : client.Team;
|
var teamNumber = (client == null) ? 0 : client.Team;
|
||||||
team.GetText = () => (teamNumber == 0) ? "-" : teamNumber.ToString();
|
team.GetText = () => (teamNumber == 0) ? "-" : teamNumber.ToString();
|
||||||
scrollpanel.AddChild(item);
|
playerPanel.AddChild(item);
|
||||||
|
|
||||||
var stats = pp.PlayerActor.TraitOrDefault<PlayerStatistics>();
|
var stats = pp.PlayerActor.TraitOrDefault<PlayerStatistics>();
|
||||||
if (stats == null)
|
if (stats == null)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2014 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
|
||||||
@@ -9,19 +9,34 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using OpenRA.Graphics;
|
using OpenRA.Graphics;
|
||||||
|
using OpenRA.Mods.RA;
|
||||||
|
using OpenRA.Mods.RA.Widgets;
|
||||||
|
using OpenRA.Traits;
|
||||||
using OpenRA.Widgets;
|
using OpenRA.Widgets;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Widgets.Logic
|
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||||
{
|
{
|
||||||
class IngameMenuLogic
|
public class IngameMenuLogic
|
||||||
{
|
{
|
||||||
|
Widget menu;
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public IngameMenuLogic(Widget widget, World world, Action onExit, WorldRenderer worldRenderer, bool transient)
|
public IngameMenuLogic(Widget widget, World world, Action onExit, WorldRenderer worldRenderer, IngameInfoPanel activePanel)
|
||||||
{
|
{
|
||||||
var resumeDisabled = false;
|
var resumeDisabled = false;
|
||||||
|
menu = widget.Get("INGAME_MENU");
|
||||||
var mpe = world.WorldActor.TraitOrDefault<MenuPaletteEffect>();
|
var mpe = world.WorldActor.TraitOrDefault<MenuPaletteEffect>();
|
||||||
|
if (mpe != null)
|
||||||
|
mpe.Fade(mpe.Info.MenuEffect);
|
||||||
|
|
||||||
|
menu.Get<LabelWidget>("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version;
|
||||||
|
|
||||||
|
var hideMenu = false;
|
||||||
|
menu.Get("MENU_BUTTONS").IsVisible = () => !hideMenu;
|
||||||
|
|
||||||
|
// TODO: Create a mechanism to do things like this cleaner. Also needed for scripted missions
|
||||||
Action onQuit = () =>
|
Action onQuit = () =>
|
||||||
{
|
{
|
||||||
Sound.PlayNotification(world.Map.Rules, null, "Speech", "Leave", world.LocalPlayer == null ? null : world.LocalPlayer.Country.Race);
|
Sound.PlayNotification(world.Map.Rules, null, "Speech", "Leave", world.LocalPlayer == null ? null : world.LocalPlayer.Country.Race);
|
||||||
@@ -33,7 +48,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
Game.RunAfterDelay(exitDelay, () => mpe.Fade(MenuPaletteEffect.EffectType.Black));
|
Game.RunAfterDelay(exitDelay, () => mpe.Fade(MenuPaletteEffect.EffectType.Black));
|
||||||
exitDelay += 40 * mpe.Info.FadeLength;
|
exitDelay += 40 * mpe.Info.FadeLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
Game.RunAfterDelay(exitDelay, () =>
|
Game.RunAfterDelay(exitDelay, () =>
|
||||||
{
|
{
|
||||||
Game.Disconnect();
|
Game.Disconnect();
|
||||||
@@ -42,62 +56,68 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Action onSurrender = () =>
|
Action closeMenu = () =>
|
||||||
{
|
{
|
||||||
world.IssueOrder(new Order("Surrender", world.LocalPlayer.PlayerActor, false));
|
Ui.CloseWindow();
|
||||||
|
Ui.Root.RemoveChild(menu);
|
||||||
|
if (mpe != null)
|
||||||
|
mpe.Fade(MenuPaletteEffect.EffectType.None);
|
||||||
onExit();
|
onExit();
|
||||||
};
|
};
|
||||||
|
|
||||||
widget.Get<ButtonWidget>("DISCONNECT").OnClick = () =>
|
Action showMenu = () => hideMenu = false;
|
||||||
|
|
||||||
|
menu.Get<ButtonWidget>("ABORT_MISSION").OnClick = () =>
|
||||||
{
|
{
|
||||||
widget.Visible = false;
|
hideMenu = true;
|
||||||
ConfirmationDialogs.PromptConfirmAction("Abort Mission", "Leave this game and return to the menu?", onQuit, () => widget.Visible = true);
|
ConfirmationDialogs.PromptConfirmAction("Abort Mission", "Leave this game and return to the menu?", onQuit, showMenu);
|
||||||
};
|
};
|
||||||
|
|
||||||
widget.Get<ButtonWidget>("SETTINGS").OnClick = () =>
|
Action onSurrender = () =>
|
||||||
{
|
{
|
||||||
widget.Visible = false;
|
world.IssueOrder(new Order("Surrender", world.LocalPlayer.PlayerActor, false));
|
||||||
Ui.OpenWindow("SETTINGS_PANEL", new WidgetArgs()
|
closeMenu();
|
||||||
{
|
|
||||||
{ "onExit", () => widget.Visible = true },
|
|
||||||
{ "worldRenderer", worldRenderer },
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
var surrenderButton = menu.Get<ButtonWidget>("SURRENDER");
|
||||||
widget.Get<ButtonWidget>("MUSIC").OnClick = () =>
|
surrenderButton.IsDisabled = () => (world.LocalPlayer == null || world.LocalPlayer.WinState != WinState.Undefined);
|
||||||
|
surrenderButton.OnClick = () =>
|
||||||
{
|
{
|
||||||
widget.Visible = false;
|
hideMenu = true;
|
||||||
Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs
|
ConfirmationDialogs.PromptConfirmAction("Surrender", "Are you sure you want to surrender?", onSurrender, showMenu);
|
||||||
|
};
|
||||||
|
widget.Get("SURRENDER").IsVisible = () => world.LocalPlayer != null && world.LocalPlayer.WinState == WinState.Undefined;
|
||||||
|
|
||||||
|
menu.Get<ButtonWidget>("MUSIC").OnClick = () =>
|
||||||
|
{
|
||||||
|
hideMenu = true;
|
||||||
|
Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs()
|
||||||
{
|
{
|
||||||
{ "onExit", () => { widget.Visible = true; } },
|
{ "onExit", () => hideMenu = false },
|
||||||
{ "world", world }
|
{ "world", world }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var resumeButton = widget.Get<ButtonWidget>("RESUME");
|
menu.Get<ButtonWidget>("SETTINGS").OnClick = () =>
|
||||||
resumeButton.IsDisabled = () => resumeDisabled;
|
|
||||||
resumeButton.OnClick = () =>
|
|
||||||
{
|
{
|
||||||
if (transient)
|
hideMenu = true;
|
||||||
|
Ui.OpenWindow("SETTINGS_PANEL", new WidgetArgs()
|
||||||
{
|
{
|
||||||
Ui.CloseWindow();
|
{ "world", world },
|
||||||
Ui.Root.RemoveChild(widget);
|
{ "worldRenderer", worldRenderer },
|
||||||
}
|
{ "onExit", () => hideMenu = false },
|
||||||
|
});
|
||||||
onExit();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
widget.Get<ButtonWidget>("SURRENDER").OnClick = () =>
|
var resumeButton = menu.Get<ButtonWidget>("RESUME");
|
||||||
|
resumeButton.IsDisabled = () => resumeDisabled;
|
||||||
|
resumeButton.OnClick = closeMenu;
|
||||||
|
|
||||||
|
// Game info panel
|
||||||
|
var gameInfoPanel = Game.LoadWidget(world, "GAME_INFO_PANEL", menu, new WidgetArgs()
|
||||||
{
|
{
|
||||||
widget.Visible = false;
|
{ "activePanel", activePanel }
|
||||||
ConfirmationDialogs.PromptConfirmAction(
|
});
|
||||||
"Surrender",
|
gameInfoPanel.IsVisible = () => !hideMenu;
|
||||||
"Are you sure you want to surrender?",
|
|
||||||
onSurrender,
|
|
||||||
() => widget.Visible = true,
|
|
||||||
"Surrender");
|
|
||||||
};
|
|
||||||
widget.Get("SURRENDER").IsVisible = () => world.LocalPlayer != null && world.LocalPlayer.WinState == WinState.Undefined;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
WorldRenderer worldRenderer;
|
WorldRenderer worldRenderer;
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public ObserverStatsLogic(World world, WorldRenderer worldRenderer, Widget widget, Action onExit, bool transient)
|
public ObserverStatsLogic(World world, WorldRenderer worldRenderer, Widget widget, Action onExit)
|
||||||
{
|
{
|
||||||
this.world = world;
|
this.world = world;
|
||||||
this.worldRenderer = worldRenderer;
|
this.worldRenderer = worldRenderer;
|
||||||
@@ -139,18 +139,12 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
|
|
||||||
var close = widget.GetOrNull<ButtonWidget>("CLOSE");
|
var close = widget.GetOrNull<ButtonWidget>("CLOSE");
|
||||||
if (close != null)
|
if (close != null)
|
||||||
{
|
|
||||||
close.OnClick = () =>
|
close.OnClick = () =>
|
||||||
{
|
{
|
||||||
if (transient)
|
Ui.CloseWindow();
|
||||||
{
|
Ui.Root.RemoveChild(widget);
|
||||||
Ui.CloseWindow();
|
|
||||||
Ui.Root.RemoveChild(widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
onExit();
|
onExit();
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearStats()
|
void ClearStats()
|
||||||
|
|||||||
@@ -8,9 +8,11 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.Mods.RA.Orders;
|
using OpenRA.Mods.RA.Orders;
|
||||||
using OpenRA.Widgets;
|
using OpenRA.Widgets;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Widgets.Logic
|
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||||
{
|
{
|
||||||
@@ -59,8 +61,32 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
var options = widget.GetOrNull<MenuButtonWidget>("OPTIONS_BUTTON");
|
var options = widget.GetOrNull<MenuButtonWidget>("OPTIONS_BUTTON");
|
||||||
if (options != null)
|
if (options != null)
|
||||||
{
|
{
|
||||||
|
var blinking = false;
|
||||||
|
var lp = world.LocalPlayer;
|
||||||
options.IsDisabled = () => disableSystemButtons;
|
options.IsDisabled = () => disableSystemButtons;
|
||||||
options.OnClick = () => OpenMenuPanel(options);
|
options.OnClick = () =>
|
||||||
|
{
|
||||||
|
blinking = false;
|
||||||
|
OpenMenuPanel(options, new WidgetArgs()
|
||||||
|
{
|
||||||
|
{ "activePanel", IngameInfoPanel.AutoSelect }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
options.IsHighlighted = () => blinking && Game.LocalTick % 50 < 25;
|
||||||
|
|
||||||
|
if (lp != null)
|
||||||
|
{
|
||||||
|
Action<Player> StartBlinking = player =>
|
||||||
|
{
|
||||||
|
if (player == world.LocalPlayer)
|
||||||
|
blinking = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var mo = lp.PlayerActor.TraitOrDefault<MissionObjectives>();
|
||||||
|
|
||||||
|
if (mo != null)
|
||||||
|
mo.ObjectiveAdded += StartBlinking;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var diplomacy = widget.GetOrNull<MenuButtonWidget>("DIPLOMACY_BUTTON");
|
var diplomacy = widget.GetOrNull<MenuButtonWidget>("DIPLOMACY_BUTTON");
|
||||||
@@ -76,7 +102,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
debug.IsVisible = () => world.LobbyInfo.GlobalSettings.AllowCheats;
|
debug.IsVisible = () => world.LobbyInfo.GlobalSettings.AllowCheats;
|
||||||
debug.IsDisabled = () => disableSystemButtons;
|
debug.IsDisabled = () => disableSystemButtons;
|
||||||
debug.OnClick = () => OpenMenuPanel(debug);
|
debug.OnClick = () => OpenMenuPanel(debug, new WidgetArgs()
|
||||||
|
{
|
||||||
|
{ "activePanel", IngameInfoPanel.Debug }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var stats = widget.GetOrNull<MenuButtonWidget>("OBSERVER_STATS_BUTTON");
|
var stats = widget.GetOrNull<MenuButtonWidget>("OBSERVER_STATS_BUTTON");
|
||||||
@@ -87,7 +116,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenMenuPanel(MenuButtonWidget button)
|
void OpenMenuPanel(MenuButtonWidget button, WidgetArgs widgetArgs = null)
|
||||||
{
|
{
|
||||||
disableSystemButtons = true;
|
disableSystemButtons = true;
|
||||||
var cachedPause = world.PredictedPaused;
|
var cachedPause = world.PredictedPaused;
|
||||||
@@ -98,21 +127,19 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
if (button.Pause && world.LobbyInfo.IsSinglePlayer)
|
if (button.Pause && world.LobbyInfo.IsSinglePlayer)
|
||||||
world.SetPauseState(true);
|
world.SetPauseState(true);
|
||||||
|
|
||||||
Game.LoadWidget(world, button.MenuContainer, Ui.Root, new WidgetArgs()
|
widgetArgs = widgetArgs ?? new WidgetArgs();
|
||||||
|
widgetArgs.Add("onExit", () =>
|
||||||
{
|
{
|
||||||
{ "transient", true },
|
if (button.HideIngameUI)
|
||||||
{ "onExit", () =>
|
ingameRoot.IsVisible = () => true;
|
||||||
{
|
|
||||||
if (button.HideIngameUI)
|
|
||||||
ingameRoot.IsVisible = () => true;
|
|
||||||
|
|
||||||
if (button.Pause && world.LobbyInfo.IsSinglePlayer)
|
if (button.Pause && world.LobbyInfo.IsSinglePlayer)
|
||||||
world.SetPauseState(cachedPause);
|
world.SetPauseState(cachedPause);
|
||||||
|
|
||||||
disableSystemButtons = false;
|
disableSystemButtons = false;
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Game.LoadWidget(world, button.MenuContainer, Ui.Root, widgetArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void BindOrderButton<T>(World world, ButtonWidget w, string icon)
|
static void BindOrderButton<T>(World world, ButtonWidget w, string icon)
|
||||||
|
|||||||
@@ -3,122 +3,110 @@ Container@DEBUG_PANEL:
|
|||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
Height: PARENT_BOTTOM
|
Height: PARENT_BOTTOM
|
||||||
Children:
|
Children:
|
||||||
Label@TITLE:
|
Label@CHEATS_TITLE:
|
||||||
Width: PARENT_RIGHT
|
Y: 25
|
||||||
Y: 0-25
|
Font: Bold
|
||||||
Font: BigBold
|
Text: Cheats
|
||||||
Contrast: true
|
|
||||||
Align: Center
|
Align: Center
|
||||||
Text: Debug Options
|
|
||||||
Background@bg:
|
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
Height: PARENT_BOTTOM
|
Checkbox@INSTANT_BUILD:
|
||||||
Background: panel-black
|
X: 45
|
||||||
Children:
|
Y: 45
|
||||||
Label@CHEATS_TITLE:
|
Width: 200
|
||||||
Y: 25
|
Height: 20
|
||||||
Font: Bold
|
Font: Regular
|
||||||
Text: Cheats
|
Text: Instant Build Speed
|
||||||
Align: Center
|
Checkbox@ENABLE_TECH:
|
||||||
Width: PARENT_RIGHT
|
X: 45
|
||||||
Checkbox@INSTANT_BUILD:
|
Y: 75
|
||||||
X: 45
|
Width: 200
|
||||||
Y: 45
|
Height: 20
|
||||||
Width: 200
|
Font: Regular
|
||||||
Height: 20
|
Text: Build Everything
|
||||||
Font: Regular
|
Checkbox@BUILD_ANYWHERE:
|
||||||
Text: Instant Build Speed
|
X: 45
|
||||||
Checkbox@ENABLE_TECH:
|
Y: 105
|
||||||
X: 45
|
Width: 200
|
||||||
Y: 75
|
Height: 20
|
||||||
Width: 200
|
Font: Regular
|
||||||
Height: 20
|
Text: Build Anywhere
|
||||||
Font: Regular
|
Checkbox@UNLIMITED_POWER:
|
||||||
Text: Build Everything
|
X: 290
|
||||||
Checkbox@BUILD_ANYWHERE:
|
Y: 45
|
||||||
X: 45
|
Width: 200
|
||||||
Y: 105
|
Height: 20
|
||||||
Width: 200
|
Font: Regular
|
||||||
Height: 20
|
Text: Unlimited Power
|
||||||
Font: Regular
|
Checkbox@INSTANT_CHARGE:
|
||||||
Text: Build Anywhere
|
X: 290
|
||||||
Checkbox@UNLIMITED_POWER:
|
Y: 75
|
||||||
X: 290
|
Width: 200
|
||||||
Y: 45
|
Height: 20
|
||||||
Width: 200
|
Font: Regular
|
||||||
Height: 20
|
Text: Instant Charge Time
|
||||||
Font: Regular
|
Checkbox@DISABLE_SHROUD:
|
||||||
Text: Unlimited Power
|
X: 290
|
||||||
Checkbox@INSTANT_CHARGE:
|
Y: 105
|
||||||
X: 290
|
Height: 20
|
||||||
Y: 75
|
Width: 200
|
||||||
Width: 200
|
Font: Regular
|
||||||
Height: 20
|
Text: Disable Shroud & Fog
|
||||||
Font: Regular
|
Button@GIVE_CASH:
|
||||||
Text: Instant Charge Time
|
X: 90
|
||||||
Checkbox@DISABLE_SHROUD:
|
Y: 145
|
||||||
X: 290
|
Width: 140
|
||||||
Y: 105
|
Height: 35
|
||||||
Height: 20
|
Text: Give $20,000
|
||||||
Width: 200
|
Button@GROW_RESOURCES:
|
||||||
Font: Regular
|
X: 271
|
||||||
Text: Disable Shroud & Fog
|
Y: 145
|
||||||
Button@GIVE_CASH:
|
Width: 140
|
||||||
X: 90
|
Height: 35
|
||||||
Y: 145
|
Text: Grow Resources
|
||||||
Width: 140
|
Button@GIVE_EXPLORATION:
|
||||||
Height: 35
|
X: 90
|
||||||
Text: Give $20,000
|
Y: 195
|
||||||
Button@GROW_RESOURCES:
|
Width: 140
|
||||||
X: 271
|
Height: 35
|
||||||
Y: 145
|
Text: Clear Shroud
|
||||||
Width: 140
|
Button@RESET_EXPLORATION:
|
||||||
Height: 35
|
X: 271
|
||||||
Text: Grow Resources
|
Y: 195
|
||||||
Button@GIVE_EXPLORATION:
|
Width: 140
|
||||||
X: 90
|
Height: 35
|
||||||
Y: 195
|
Text: Reset Shroud
|
||||||
Width: 140
|
Label@VISUALIZATIONS_TITLE:
|
||||||
Height: 35
|
Y: 255
|
||||||
Text: Clear Shroud
|
Font: Bold
|
||||||
Button@RESET_EXPLORATION:
|
Text: Visualizations
|
||||||
X: 271
|
Align: Center
|
||||||
Y: 195
|
Width: PARENT_RIGHT
|
||||||
Width: 140
|
Checkbox@SHOW_UNIT_PATHS:
|
||||||
Height: 35
|
X: 45
|
||||||
Text: Reset Shroud
|
Y: 285
|
||||||
Label@VISUALIZATIONS_TITLE:
|
Width: 200
|
||||||
Y: 255
|
Height: 20
|
||||||
Font: Bold
|
Font: Regular
|
||||||
Text: Visualizations
|
Text: Show Unit Paths
|
||||||
Align: Center
|
Checkbox@SHOW_ASTAR:
|
||||||
Width: PARENT_RIGHT
|
X: 45
|
||||||
Checkbox@SHOW_UNIT_PATHS:
|
Y: 315
|
||||||
X: 45
|
Height: 20
|
||||||
Y: 285
|
Width: 200
|
||||||
Width: 200
|
Font: Regular
|
||||||
Height: 20
|
Text: Show A* Cost
|
||||||
Font: Regular
|
Checkbox@SHOW_COMBATOVERLAY:
|
||||||
Text: Show Unit Paths
|
X: 290
|
||||||
Checkbox@SHOW_ASTAR:
|
Y: 285
|
||||||
X: 45
|
Height: 20
|
||||||
Y: 315
|
Width: 200
|
||||||
Height: 20
|
Font: Regular
|
||||||
Width: 200
|
Text: Show Combat Geometry
|
||||||
Font: Regular
|
Checkbox@SHOW_GEOMETRY:
|
||||||
Text: Show A* Cost
|
X: 290
|
||||||
Checkbox@SHOW_COMBATOVERLAY:
|
Y: 315
|
||||||
X: 290
|
Height: 20
|
||||||
Y: 285
|
Width: 200
|
||||||
Height: 20
|
Font: Regular
|
||||||
Width: 200
|
Text: Show Render Geometry
|
||||||
Font: Regular
|
|
||||||
Text: Show Combat Geometry
|
|
||||||
Checkbox@SHOW_GEOMETRY:
|
|
||||||
X: 290
|
|
||||||
Y: 315
|
|
||||||
Height: 20
|
|
||||||
Width: 200
|
|
||||||
Font: Regular
|
|
||||||
Text: Show Render Geometry
|
|
||||||
|
|
||||||
|
|||||||
55
mods/cnc/chrome/ingame-info.yaml
Normal file
55
mods/cnc/chrome/ingame-info.yaml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
Container@GAME_INFO_PANEL:
|
||||||
|
X: (WINDOW_RIGHT - WIDTH) / 2
|
||||||
|
Y: (WINDOW_BOTTOM - HEIGHT) / 2
|
||||||
|
Width: 512
|
||||||
|
Height: 375
|
||||||
|
Logic: GameInfoLogic
|
||||||
|
Visible: False
|
||||||
|
Children:
|
||||||
|
Label@TITLE:
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Y: 0 - 20
|
||||||
|
Text: Game Information
|
||||||
|
Align: Center
|
||||||
|
Font: BigBold
|
||||||
|
Contrast: true
|
||||||
|
Label@TITLE_NO_TABS:
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Y: 15
|
||||||
|
Text: Game Information
|
||||||
|
Align: Center
|
||||||
|
Font: BigBold
|
||||||
|
Contrast: true
|
||||||
|
Container@TAB_CONTAINER:
|
||||||
|
Children:
|
||||||
|
Button@BUTTON1:
|
||||||
|
Y: 5
|
||||||
|
Width: 140
|
||||||
|
Height: 35
|
||||||
|
Visible: False
|
||||||
|
Button@BUTTON2:
|
||||||
|
X: 150
|
||||||
|
Y: 5
|
||||||
|
Width: 140
|
||||||
|
Height: 35
|
||||||
|
Visible: False
|
||||||
|
Button@BUTTON3:
|
||||||
|
X: 300
|
||||||
|
Y: 5
|
||||||
|
Width: 140
|
||||||
|
Height: 35
|
||||||
|
Visible: False
|
||||||
|
Background@BACKGROUND:
|
||||||
|
Y: 39
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
|
Background: panel-black
|
||||||
|
Children:
|
||||||
|
Container@STATS_PANEL:
|
||||||
|
Container@MAP_PANEL:
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
|
Container@OBJECTIVES_PANEL:
|
||||||
|
Container@DEBUG_PANEL:
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
32
mods/cnc/chrome/ingame-infobriefing.yaml
Normal file
32
mods/cnc/chrome/ingame-infobriefing.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
Container@MAP_PANEL:
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Logic: GameInfoBriefingLogic
|
||||||
|
Children:
|
||||||
|
Background@PREVIEW_BG:
|
||||||
|
X: (PARENT_RIGHT - WIDTH) / 2
|
||||||
|
Y: 15
|
||||||
|
Width: 324
|
||||||
|
Height: 160
|
||||||
|
Background: panel-gray
|
||||||
|
Children:
|
||||||
|
MapPreview@MAP_PREVIEW:
|
||||||
|
Width: 320
|
||||||
|
Height: 156
|
||||||
|
X: 2
|
||||||
|
Y: 2
|
||||||
|
IgnoreMouseOver: True
|
||||||
|
IgnoreMouseInput: True
|
||||||
|
ShowSpawnPoints: False
|
||||||
|
ScrollPanel@MAP_DESCRIPTION_PANEL:
|
||||||
|
X: 15
|
||||||
|
Y: 190
|
||||||
|
Width: 482
|
||||||
|
Height: 170
|
||||||
|
Children:
|
||||||
|
Label@MAP_DESCRIPTION:
|
||||||
|
X: 5
|
||||||
|
Y: 195
|
||||||
|
Width: 452
|
||||||
|
Height: 160
|
||||||
|
|
||||||
40
mods/cnc/chrome/ingame-infoobjectives.yaml
Normal file
40
mods/cnc/chrome/ingame-infoobjectives.yaml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
Container@MISSION_OBJECTIVES:
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Logic: GameInfoObjectivesLogic
|
||||||
|
Children:
|
||||||
|
Label@MISSION:
|
||||||
|
X: 15
|
||||||
|
Y: 15
|
||||||
|
Width: 80
|
||||||
|
Height: 20
|
||||||
|
Font: MediumBold
|
||||||
|
Text: Mission:
|
||||||
|
Label@MISSION_STATUS:
|
||||||
|
X: 95
|
||||||
|
Y: 15
|
||||||
|
Width: PARENT_RIGHT - 110
|
||||||
|
Height: 20
|
||||||
|
Font: MediumBold
|
||||||
|
ScrollPanel@OBJECTIVES_PANEL:
|
||||||
|
X: 15
|
||||||
|
Y: 50
|
||||||
|
Width: 482
|
||||||
|
Height: 310
|
||||||
|
ItemSpacing: 35
|
||||||
|
Children:
|
||||||
|
Container@OBJECTIVE_TEMPLATE:
|
||||||
|
Children:
|
||||||
|
Label@OBJECTIVE_TYPE:
|
||||||
|
X: 10
|
||||||
|
Y: 0 - 20
|
||||||
|
Height: 20
|
||||||
|
Width: 70
|
||||||
|
Align: Center
|
||||||
|
Checkbox@OBJECTIVE_STATUS:
|
||||||
|
X: 90
|
||||||
|
Y: 0 - 20
|
||||||
|
Width: PARENT_RIGHT - 100
|
||||||
|
Height: 20
|
||||||
|
Disabled: True
|
||||||
|
TextColorDisabled: 255,255,255
|
||||||
108
mods/cnc/chrome/ingame-infostats.yaml
Normal file
108
mods/cnc/chrome/ingame-infostats.yaml
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
Container@SKIRMISH_STATS:
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Logic: GameInfoStatsLogic
|
||||||
|
Children:
|
||||||
|
Label@STATS_OBJECTIVE:
|
||||||
|
X: 15
|
||||||
|
Y: 10
|
||||||
|
Width: 85
|
||||||
|
Height: 25
|
||||||
|
Font: MediumBold
|
||||||
|
Text: Mission:
|
||||||
|
Label@STATS_STATUS:
|
||||||
|
X: 100
|
||||||
|
Y: 10
|
||||||
|
Width: PARENT_RIGHT - 10
|
||||||
|
Height: 25
|
||||||
|
Font: MediumBold
|
||||||
|
Checkbox@STATS_CHECKBOX:
|
||||||
|
X: 15
|
||||||
|
Y: 45
|
||||||
|
Width: 482
|
||||||
|
Height: 20
|
||||||
|
Font: Bold
|
||||||
|
Text: Destroy all opposition!
|
||||||
|
Disabled: yes
|
||||||
|
TextColorDisabled: 255,255,255
|
||||||
|
Container@STATS_HEADERS:
|
||||||
|
X: 17
|
||||||
|
Y: 80
|
||||||
|
Width: 393
|
||||||
|
Children:
|
||||||
|
Label@NAME:
|
||||||
|
X: 10
|
||||||
|
Width: 150
|
||||||
|
Height: 25
|
||||||
|
Text: Player
|
||||||
|
Font: Bold
|
||||||
|
Label@RACE:
|
||||||
|
X: 150
|
||||||
|
Width: 80
|
||||||
|
Height: 25
|
||||||
|
Text: Faction
|
||||||
|
Font: Bold
|
||||||
|
Align: Center
|
||||||
|
Label@STANCE:
|
||||||
|
X: 240
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Text: Team
|
||||||
|
Font: Bold
|
||||||
|
Align: Center
|
||||||
|
Label@KILLS:
|
||||||
|
X: 310
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Text: Kills
|
||||||
|
Font: Bold
|
||||||
|
Align: Center
|
||||||
|
Label@DEATHS:
|
||||||
|
X: 380
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Text: Deaths
|
||||||
|
Font: Bold
|
||||||
|
Align: Center
|
||||||
|
ScrollPanel@PLAYER_LIST:
|
||||||
|
X: 15
|
||||||
|
Y: 105
|
||||||
|
Width: 482
|
||||||
|
Height: 250
|
||||||
|
ItemSpacing: 5
|
||||||
|
Children:
|
||||||
|
Container@PLAYER_TEMPLATE:
|
||||||
|
Width: PARENT_RIGHT-27
|
||||||
|
Height: 25
|
||||||
|
X: 2
|
||||||
|
Y: 0
|
||||||
|
Children:
|
||||||
|
Label@NAME:
|
||||||
|
X: 10
|
||||||
|
Width: 150
|
||||||
|
Height: 25
|
||||||
|
Image@FACTIONFLAG:
|
||||||
|
X: 159
|
||||||
|
Y: 6
|
||||||
|
Width: 32
|
||||||
|
Height: 16
|
||||||
|
Label@FACTION:
|
||||||
|
X: 195
|
||||||
|
Width: 40
|
||||||
|
Height: 25
|
||||||
|
Label@TEAM:
|
||||||
|
X: 240
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Align: Center
|
||||||
|
Label@KILLS:
|
||||||
|
X: 310
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Align: Center
|
||||||
|
Label@DEATHS:
|
||||||
|
X: 380
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Align: Center
|
||||||
|
|
||||||
@@ -1,27 +1,7 @@
|
|||||||
Container@INGAME_MENU_PANEL:
|
|
||||||
X: (WINDOW_RIGHT - WIDTH)/2
|
|
||||||
Y: (WINDOW_BOTTOM - HEIGHT)/2
|
|
||||||
Width: 512
|
|
||||||
Height: 370
|
|
||||||
Children:
|
|
||||||
Button@OBJECTIVES_BUTTON:
|
|
||||||
Y: PARENT_BOTTOM - 1
|
|
||||||
Width: 140
|
|
||||||
Height: 35
|
|
||||||
Text: Objectives
|
|
||||||
Visible: false
|
|
||||||
Button@DEBUG_BUTTON:
|
|
||||||
X: 150
|
|
||||||
Y: PARENT_BOTTOM - 1
|
|
||||||
Width: 140
|
|
||||||
Height: 35
|
|
||||||
Text: Debug
|
|
||||||
Visible: false
|
|
||||||
|
|
||||||
Container@INGAME_MENU:
|
Container@INGAME_MENU:
|
||||||
Width: WINDOW_RIGHT
|
Width: WINDOW_RIGHT
|
||||||
Height: WINDOW_BOTTOM
|
Height: WINDOW_BOTTOM
|
||||||
Logic: CncIngameMenuLogic
|
Logic: IngameMenuLogic
|
||||||
Children:
|
Children:
|
||||||
Image@EVA:
|
Image@EVA:
|
||||||
X: WINDOW_RIGHT-128-43
|
X: WINDOW_RIGHT-128-43
|
||||||
@@ -46,31 +26,31 @@ Container@INGAME_MENU:
|
|||||||
Width: 740
|
Width: 740
|
||||||
Height: 35
|
Height: 35
|
||||||
Children:
|
Children:
|
||||||
Button@QUIT_BUTTON:
|
Button@ABORT_MISSION:
|
||||||
X: 0
|
X: 0
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 140
|
Width: 140
|
||||||
Height: 35
|
Height: 35
|
||||||
Text: Abort Mission
|
Text: Abort Mission
|
||||||
Button@SURRENDER_BUTTON:
|
Button@SURRENDER:
|
||||||
X: 150
|
X: 150
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 140
|
Width: 140
|
||||||
Height: 35
|
Height: 35
|
||||||
Text: Surrender
|
Text: Surrender
|
||||||
Button@MUSIC_BUTTON:
|
Button@MUSIC:
|
||||||
X: 300
|
X: 300
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 140
|
Width: 140
|
||||||
Height: 35
|
Height: 35
|
||||||
Text: Music
|
Text: Music
|
||||||
Button@SETTINGS_BUTTON:
|
Button@SETTINGS:
|
||||||
X: 450
|
X: 450
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 140
|
Width: 140
|
||||||
Height: 35
|
Height: 35
|
||||||
Text: Settings
|
Text: Settings
|
||||||
Button@RESUME_BUTTON:
|
Button@RESUME:
|
||||||
Key: escape
|
Key: escape
|
||||||
X: 600
|
X: 600
|
||||||
Y: 0
|
Y: 0
|
||||||
|
|||||||
@@ -1,120 +0,0 @@
|
|||||||
Container@CONQUEST_OBJECTIVES:
|
|
||||||
Logic: CncConquestObjectivesLogic
|
|
||||||
Width: PARENT_RIGHT
|
|
||||||
Height: PARENT_BOTTOM
|
|
||||||
Children:
|
|
||||||
Label@TITLE:
|
|
||||||
Width: PARENT_RIGHT
|
|
||||||
Y: 0-25
|
|
||||||
Font: BigBold
|
|
||||||
Contrast: true
|
|
||||||
Align: Center
|
|
||||||
Background@bg:
|
|
||||||
Width: PARENT_RIGHT
|
|
||||||
Height: PARENT_BOTTOM
|
|
||||||
Background: panel-black
|
|
||||||
Children:
|
|
||||||
Label@PRIMARY:
|
|
||||||
X: 15
|
|
||||||
Y: 10
|
|
||||||
Width: 482
|
|
||||||
Height: 25
|
|
||||||
Font: MediumBold
|
|
||||||
Text: Primary Objectives:
|
|
||||||
Label@STATUS:
|
|
||||||
X: 190
|
|
||||||
Y: 10
|
|
||||||
Width: 482
|
|
||||||
Height: 25
|
|
||||||
Font: MediumBold
|
|
||||||
Text: Incomplete
|
|
||||||
Checkbox@1:
|
|
||||||
X: 25
|
|
||||||
Y: 45
|
|
||||||
Width: 482
|
|
||||||
Height: 20
|
|
||||||
Font: Bold
|
|
||||||
Text: Crush all opposition!
|
|
||||||
Disabled: yes
|
|
||||||
Container@LABEL_CONTAINER:
|
|
||||||
X: 17
|
|
||||||
Y: 80
|
|
||||||
Width: 393
|
|
||||||
Children:
|
|
||||||
Label@NAME:
|
|
||||||
X: 10
|
|
||||||
Width: 150
|
|
||||||
Height: 25
|
|
||||||
Text: Player
|
|
||||||
Align: Center
|
|
||||||
Font: Bold
|
|
||||||
Label@RACE:
|
|
||||||
X: 150
|
|
||||||
Width: 80
|
|
||||||
Height: 25
|
|
||||||
Text: Faction
|
|
||||||
Font: Bold
|
|
||||||
Align: Center
|
|
||||||
Label@STANCE:
|
|
||||||
X: 240
|
|
||||||
Width: 70
|
|
||||||
Height: 25
|
|
||||||
Text: Team
|
|
||||||
Font: Bold
|
|
||||||
Align: Center
|
|
||||||
Label@KILLS:
|
|
||||||
X: 310
|
|
||||||
Width: 70
|
|
||||||
Height: 25
|
|
||||||
Text: Kills
|
|
||||||
Font: Bold
|
|
||||||
Align: Center
|
|
||||||
Label@DEATHS:
|
|
||||||
X: 380
|
|
||||||
Width: 70
|
|
||||||
Height: 25
|
|
||||||
Text: Deaths
|
|
||||||
Font: Bold
|
|
||||||
Align: Center
|
|
||||||
ScrollPanel@PLAYER_LIST:
|
|
||||||
X: 15
|
|
||||||
Y: 105
|
|
||||||
Width: 482
|
|
||||||
Height: 250
|
|
||||||
ItemSpacing: 5
|
|
||||||
Children:
|
|
||||||
Container@PLAYER_TEMPLATE:
|
|
||||||
Width: PARENT_RIGHT-27
|
|
||||||
Height: 25
|
|
||||||
X: 2
|
|
||||||
Y: 0
|
|
||||||
Children:
|
|
||||||
Label@NAME:
|
|
||||||
X: 10
|
|
||||||
Width: 150
|
|
||||||
Height: 25
|
|
||||||
Image@FACTIONFLAG:
|
|
||||||
X: 159
|
|
||||||
Y: 6
|
|
||||||
Width: 32
|
|
||||||
Height: 16
|
|
||||||
Label@FACTION:
|
|
||||||
X: 195
|
|
||||||
Width: 40
|
|
||||||
Height: 25
|
|
||||||
Label@TEAM:
|
|
||||||
X: 240
|
|
||||||
Width: 70
|
|
||||||
Height: 25
|
|
||||||
Align: Center
|
|
||||||
Label@KILLS:
|
|
||||||
X: 310
|
|
||||||
Width: 70
|
|
||||||
Height: 25
|
|
||||||
Align: Center
|
|
||||||
Label@DEATHS:
|
|
||||||
X: 380
|
|
||||||
Width: 70
|
|
||||||
Height: 25
|
|
||||||
Align: Center
|
|
||||||
|
|
||||||
@@ -88,13 +88,16 @@ ChromeLayout:
|
|||||||
mods/cnc/chrome/replaybrowser.yaml
|
mods/cnc/chrome/replaybrowser.yaml
|
||||||
mods/cnc/chrome/ingame.yaml
|
mods/cnc/chrome/ingame.yaml
|
||||||
mods/cnc/chrome/ingame-chat.yaml
|
mods/cnc/chrome/ingame-chat.yaml
|
||||||
mods/cnc/chrome/ingame-debug.yaml
|
|
||||||
mods/cnc/chrome/ingame-menu.yaml
|
mods/cnc/chrome/ingame-menu.yaml
|
||||||
|
mods/cnc/chrome/ingame-debug.yaml
|
||||||
|
mods/cnc/chrome/ingame-info.yaml
|
||||||
|
mods/cnc/chrome/ingame-infobriefing.yaml
|
||||||
|
mods/cnc/chrome/ingame-infoobjectives.yaml
|
||||||
|
mods/cnc/chrome/ingame-infostats.yaml
|
||||||
mods/cnc/chrome/music.yaml
|
mods/cnc/chrome/music.yaml
|
||||||
mods/cnc/chrome/settings.yaml
|
mods/cnc/chrome/settings.yaml
|
||||||
mods/cnc/chrome/credits.yaml
|
mods/cnc/chrome/credits.yaml
|
||||||
mods/cnc/chrome/dialogs.yaml
|
mods/cnc/chrome/dialogs.yaml
|
||||||
mods/cnc/chrome/objectives.yaml
|
|
||||||
mods/cnc/chrome/tooltips.yaml
|
mods/cnc/chrome/tooltips.yaml
|
||||||
mods/cnc/chrome/irc.yaml
|
mods/cnc/chrome/irc.yaml
|
||||||
mods/cnc/chrome/assetbrowser.yaml
|
mods/cnc/chrome/assetbrowser.yaml
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ World:
|
|||||||
LoadWidgetAtGameStart:
|
LoadWidgetAtGameStart:
|
||||||
Widget: INGAME_ROOT
|
Widget: INGAME_ROOT
|
||||||
MenuPaletteEffect:
|
MenuPaletteEffect:
|
||||||
|
MenuEffect: Desaturated
|
||||||
CloakPaletteEffect:
|
CloakPaletteEffect:
|
||||||
ScreenShaker:
|
ScreenShaker:
|
||||||
NukePaletteEffect:
|
NukePaletteEffect:
|
||||||
@@ -185,7 +186,7 @@ World:
|
|||||||
PathFinder:
|
PathFinder:
|
||||||
ValidateOrder:
|
ValidateOrder:
|
||||||
DebugPauseState:
|
DebugPauseState:
|
||||||
ConquestObjectivesPanel:
|
ObjectivesPanel:
|
||||||
ObjectivesPanel: CONQUEST_OBJECTIVES
|
PanelName: SKIRMISH_STATS
|
||||||
RadarPings:
|
RadarPings:
|
||||||
|
|
||||||
|
|||||||
61
mods/d2k/chrome/ingame-menu.yaml
Normal file
61
mods/d2k/chrome/ingame-menu.yaml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
Container@INGAME_MENU:
|
||||||
|
Width: WINDOW_RIGHT
|
||||||
|
Height: WINDOW_BOTTOM
|
||||||
|
Logic: IngameMenuLogic
|
||||||
|
Children:
|
||||||
|
Label@VERSION_LABEL:
|
||||||
|
X: WINDOW_RIGHT - 10
|
||||||
|
Y: WINDOW_BOTTOM - 20
|
||||||
|
Align: Right
|
||||||
|
Font: Regular
|
||||||
|
Contrast: True
|
||||||
|
Background@MENU_BUTTONS:
|
||||||
|
X: 100
|
||||||
|
Y: (WINDOW_BOTTOM - HEIGHT)/2
|
||||||
|
Width: 200
|
||||||
|
Height: 295
|
||||||
|
Children:
|
||||||
|
Label@LABEL_TITLE:
|
||||||
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y: 20
|
||||||
|
Width: 200
|
||||||
|
Height: 30
|
||||||
|
Text: Options
|
||||||
|
Align: Center
|
||||||
|
Font: Bold
|
||||||
|
Button@RESUME:
|
||||||
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y: 60
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Text: Resume
|
||||||
|
Font: Bold
|
||||||
|
Key: escape
|
||||||
|
Button@SETTINGS:
|
||||||
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y: 100
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Text: Settings
|
||||||
|
Font: Bold
|
||||||
|
Button@MUSIC:
|
||||||
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y: 140
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Text: Music
|
||||||
|
Font: Bold
|
||||||
|
Button@SURRENDER:
|
||||||
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y: 180
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Text: Surrender
|
||||||
|
Font: Bold
|
||||||
|
Button@ABORT_MISSION:
|
||||||
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y: 220
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Text: Abort Mission
|
||||||
|
Font: Bold
|
||||||
@@ -1,6 +1,10 @@
|
|||||||
Container@OBSERVER_WIDGETS:
|
Container@OBSERVER_WIDGETS:
|
||||||
Children:
|
Children:
|
||||||
Button@OBSERVER_STATS_BUTTON:
|
MenuButton@OBSERVER_STATS_BUTTON:
|
||||||
|
Logic: OrderButtonsChromeLogic
|
||||||
|
MenuContainer: INGAME_OBSERVERSTATS_BG
|
||||||
|
HideIngameUI: False
|
||||||
|
Pause: False
|
||||||
X: 162
|
X: 162
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 160
|
Width: 160
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ Container@PLAYER_WIDGETS:
|
|||||||
LogicKeyListener@CONTROLGROUP_KEYHANDLER:
|
LogicKeyListener@CONTROLGROUP_KEYHANDLER:
|
||||||
Logic: ControlGroupLogic
|
Logic: ControlGroupLogic
|
||||||
LogicTicker@SIDEBAR_TICKER:
|
LogicTicker@SIDEBAR_TICKER:
|
||||||
Button@INGAME_DIPLOMACY_BUTTON:
|
MenuButton@DIPLOMACY_BUTTON:
|
||||||
|
Logic: OrderButtonsChromeLogic
|
||||||
|
MenuContainer: INGAME_DIPLOMACY_BG
|
||||||
|
HideIngameUI: False
|
||||||
X: 162
|
X: 162
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 160
|
Width: 160
|
||||||
@@ -11,24 +14,16 @@ Container@PLAYER_WIDGETS:
|
|||||||
Text: Diplomacy (P)
|
Text: Diplomacy (P)
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Key: p
|
Key: p
|
||||||
Button@INGAME_DEBUG_BUTTON:
|
MenuButton@DEBUG_BUTTON:
|
||||||
|
Logic: OrderButtonsChromeLogic
|
||||||
|
MenuContainer: INGAME_MENU
|
||||||
X: 324
|
X: 324
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 160
|
Width: 160
|
||||||
Height: 25
|
Height: 25
|
||||||
Text: Debug (Shift + Esc)
|
Text: Debug (Shift + Esc)
|
||||||
Visible: false
|
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Key: escape Shift
|
Key: escape Shift
|
||||||
Button@OBJECTIVES_BUTTON:
|
|
||||||
X: 486
|
|
||||||
Y: 0
|
|
||||||
Width: 160
|
|
||||||
Height: 25
|
|
||||||
Text: Objectives (O)
|
|
||||||
Visible: false
|
|
||||||
Font: Bold
|
|
||||||
Key: o
|
|
||||||
SlidingContainer@INGAME_RADAR_BIN:
|
SlidingContainer@INGAME_RADAR_BIN:
|
||||||
X: WINDOW_RIGHT-215
|
X: WINDOW_RIGHT-215
|
||||||
Y: 0
|
Y: 0
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ Container@INGAME_ROOT:
|
|||||||
Y: 34
|
Y: 34
|
||||||
Order: Descending
|
Order: Descending
|
||||||
Container@PLAYER_ROOT:
|
Container@PLAYER_ROOT:
|
||||||
Button@INGAME_OPTIONS_BUTTON:
|
MenuButton@OPTIONS_BUTTON:
|
||||||
|
Logic: OrderButtonsChromeLogic
|
||||||
X: 0
|
X: 0
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 160
|
Width: 160
|
||||||
|
|||||||
@@ -61,7 +61,11 @@ ChromeLayout:
|
|||||||
mods/ra/chrome/ingame-chat.yaml
|
mods/ra/chrome/ingame-chat.yaml
|
||||||
mods/ra/chrome/ingame-diplomacy.yaml
|
mods/ra/chrome/ingame-diplomacy.yaml
|
||||||
mods/ra/chrome/ingame-fmvplayer.yaml
|
mods/ra/chrome/ingame-fmvplayer.yaml
|
||||||
mods/ra/chrome/ingame-menu.yaml
|
mods/d2k/chrome/ingame-menu.yaml
|
||||||
|
mods/ra/chrome/ingame-info.yaml
|
||||||
|
mods/ra/chrome/ingame-infobriefing.yaml
|
||||||
|
mods/ra/chrome/ingame-infoobjectives.yaml
|
||||||
|
mods/ra/chrome/ingame-infostats.yaml
|
||||||
mods/d2k/chrome/ingame-observer.yaml
|
mods/d2k/chrome/ingame-observer.yaml
|
||||||
mods/ra/chrome/ingame-observerstats.yaml
|
mods/ra/chrome/ingame-observerstats.yaml
|
||||||
mods/d2k/chrome/ingame-player.yaml
|
mods/d2k/chrome/ingame-player.yaml
|
||||||
@@ -152,6 +156,9 @@ Fonts:
|
|||||||
Title:
|
Title:
|
||||||
Font:mods/d2k/Dune2k.ttf
|
Font:mods/d2k/Dune2k.ttf
|
||||||
Size:32
|
Size:32
|
||||||
|
MediumBold:
|
||||||
|
Font:FreeSansBold.ttf
|
||||||
|
Size:18
|
||||||
BigBold:
|
BigBold:
|
||||||
Font:FreeSansBold.ttf
|
Font:FreeSansBold.ttf
|
||||||
Size:24
|
Size:24
|
||||||
|
|||||||
@@ -189,4 +189,6 @@ World:
|
|||||||
ValidateOrder:
|
ValidateOrder:
|
||||||
DebugPauseState:
|
DebugPauseState:
|
||||||
RadarPings:
|
RadarPings:
|
||||||
|
ObjectivesPanel:
|
||||||
|
PanelName: SKIRMISH_STATS
|
||||||
|
|
||||||
|
|||||||
@@ -1,110 +1,117 @@
|
|||||||
Background@INGAME_DEBUG_BG:
|
Container@DEBUG_PANEL:
|
||||||
Logic: DebugMenuLogic
|
Logic: DebugMenuLogic
|
||||||
X: (WINDOW_RIGHT - WIDTH)/2
|
Y: 20
|
||||||
Y: (WINDOW_BOTTOM - HEIGHT)/2
|
Width: PARENT_RIGHT
|
||||||
Width: 350
|
Height: PARENT_BOTTOM
|
||||||
Height: 475
|
|
||||||
Children:
|
Children:
|
||||||
Label@LABEL_TITLE:
|
Label@LABLE_TITLE:
|
||||||
X: (PARENT_RIGHT - WIDTH)/2
|
Y: 25
|
||||||
Y: 20
|
Font: Bold
|
||||||
Width: 250
|
|
||||||
Height: 25
|
|
||||||
Text: Debug Options
|
Text: Debug Options
|
||||||
Align: Center
|
Align: Center
|
||||||
Font: Bold
|
Width: PARENT_RIGHT
|
||||||
Checkbox@DISABLE_SHROUD:
|
|
||||||
X: 30
|
|
||||||
Y: 50
|
|
||||||
Height: 20
|
|
||||||
Width: PARENT_RIGHT - 30
|
|
||||||
Text: Disable Shroud & Fog
|
|
||||||
Button@GIVE_EXPLORATION:
|
|
||||||
X: 30
|
|
||||||
Y: 80
|
|
||||||
Width: 120
|
|
||||||
Height: 25
|
|
||||||
Text: Give Exploration
|
|
||||||
Button@RESET_EXPLORATION:
|
|
||||||
X: 200
|
|
||||||
Y: 80
|
|
||||||
Width: 120
|
|
||||||
Height: 25
|
|
||||||
Text: Reset Exploration
|
|
||||||
Checkbox@SHOW_UNIT_PATHS:
|
|
||||||
X: 30
|
|
||||||
Y: 110
|
|
||||||
Width: PARENT_RIGHT - 30
|
|
||||||
Height: 20
|
|
||||||
Text: Show Unit Paths
|
|
||||||
Button@GIVE_CASH:
|
|
||||||
X: 30
|
|
||||||
Y: 140
|
|
||||||
Width: 135
|
|
||||||
Height: 20
|
|
||||||
Text: Give $20000 Cash
|
|
||||||
Height: 25
|
|
||||||
Button@GROW_RESOURCES:
|
|
||||||
X: 185
|
|
||||||
Y: 140
|
|
||||||
Width: 135
|
|
||||||
Height: 20
|
|
||||||
Text: Grow Resources
|
|
||||||
Height: 25
|
|
||||||
Checkbox@INSTANT_BUILD:
|
Checkbox@INSTANT_BUILD:
|
||||||
X: 30
|
X: 45
|
||||||
Y: 170
|
Y: 45
|
||||||
Width: PARENT_RIGHT - 30
|
Width: 200
|
||||||
Height: 20
|
Height: 20
|
||||||
|
Font: Regular
|
||||||
Text: Instant Build Speed
|
Text: Instant Build Speed
|
||||||
Checkbox@INSTANT_CHARGE:
|
|
||||||
X: 30
|
|
||||||
Y: 200
|
|
||||||
Width: PARENT_RIGHT - 30
|
|
||||||
Height: 20
|
|
||||||
Text: Support Powers Charge Instantly
|
|
||||||
Checkbox@ENABLE_TECH:
|
Checkbox@ENABLE_TECH:
|
||||||
X: 30
|
X: 45
|
||||||
Y: 230
|
Y: 75
|
||||||
Width: PARENT_RIGHT - 30
|
Width: 200
|
||||||
Height: 20
|
Height: 20
|
||||||
|
Font: Regular
|
||||||
Text: Build Everything
|
Text: Build Everything
|
||||||
Checkbox@UNLIMITED_POWER:
|
|
||||||
X: 30
|
|
||||||
Y: 260
|
|
||||||
Width: PARENT_RIGHT - 30
|
|
||||||
Height: 20
|
|
||||||
Text: Unlimited Power
|
|
||||||
Checkbox@BUILD_ANYWHERE:
|
Checkbox@BUILD_ANYWHERE:
|
||||||
X: 30
|
X: 45
|
||||||
Y: 290
|
Y: 105
|
||||||
Width: PARENT_RIGHT - 30
|
Width: 200
|
||||||
Height: 20
|
Height: 20
|
||||||
|
Font: Regular
|
||||||
Text: Build Anywhere
|
Text: Build Anywhere
|
||||||
Checkbox@SHOW_ASTAR:
|
Checkbox@UNLIMITED_POWER:
|
||||||
X: 30
|
X: 290
|
||||||
Y: 320
|
Y: 45
|
||||||
Width: PARENT_RIGHT - 30
|
Width: 200
|
||||||
Height: 20
|
Height: 20
|
||||||
|
Font: Regular
|
||||||
|
Text: Unlimited Power
|
||||||
|
Checkbox@INSTANT_CHARGE:
|
||||||
|
X: 290
|
||||||
|
Y: 75
|
||||||
|
Width: 200
|
||||||
|
Height: 20
|
||||||
|
Font: Regular
|
||||||
|
Text: Instant Charge Time
|
||||||
|
Checkbox@DISABLE_SHROUD:
|
||||||
|
X: 290
|
||||||
|
Y: 105
|
||||||
|
Height: 20
|
||||||
|
Width: 200
|
||||||
|
Font: Regular
|
||||||
|
Text: Disable Shroud & Fog
|
||||||
|
Button@GIVE_CASH:
|
||||||
|
X: 90
|
||||||
|
Y: 150
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Font: Bold
|
||||||
|
Text: Give $20,000
|
||||||
|
Button@GROW_RESOURCES:
|
||||||
|
X: 271
|
||||||
|
Y: 150
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Font: Bold
|
||||||
|
Text: Grow Resources
|
||||||
|
Button@GIVE_EXPLORATION:
|
||||||
|
X: 90
|
||||||
|
Y: 200
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Font: Bold
|
||||||
|
Text: Clear Shroud
|
||||||
|
Button@RESET_EXPLORATION:
|
||||||
|
X: 271
|
||||||
|
Y: 200
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Font: Bold
|
||||||
|
Text: Reset Shroud
|
||||||
|
Label@VISUALIZATIONS_TITLE:
|
||||||
|
Y: 255
|
||||||
|
Font: Bold
|
||||||
|
Text: Visualizations
|
||||||
|
Align: Center
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Checkbox@SHOW_UNIT_PATHS:
|
||||||
|
X: 45
|
||||||
|
Y: 285
|
||||||
|
Width: 200
|
||||||
|
Height: 20
|
||||||
|
Font: Regular
|
||||||
|
Text: Show Unit Paths
|
||||||
|
Checkbox@SHOW_ASTAR:
|
||||||
|
X: 45
|
||||||
|
Y: 315
|
||||||
|
Height: 20
|
||||||
|
Width: 200
|
||||||
|
Font: Regular
|
||||||
Text: Show A* Cost
|
Text: Show A* Cost
|
||||||
Checkbox@SHOW_COMBATOVERLAY:
|
Checkbox@SHOW_COMBATOVERLAY:
|
||||||
X: 30
|
X: 290
|
||||||
Y: 350
|
Y: 285
|
||||||
Height: 20
|
Height: 20
|
||||||
Width: 200
|
Width: 200
|
||||||
|
Font: Regular
|
||||||
Text: Show Combat Geometry
|
Text: Show Combat Geometry
|
||||||
Checkbox@SHOW_GEOMETRY:
|
Checkbox@SHOW_GEOMETRY:
|
||||||
X: 30
|
X: 290
|
||||||
Y: 380
|
Y: 315
|
||||||
Height: 20
|
Height: 20
|
||||||
Width: 200
|
Width: 200
|
||||||
|
Font: Regular
|
||||||
Text: Show Render Geometry
|
Text: Show Render Geometry
|
||||||
Button@CLOSE:
|
|
||||||
X: 30
|
|
||||||
Y: 420
|
|
||||||
Width: PARENT_RIGHT - 60
|
|
||||||
Height: 25
|
|
||||||
Text: Close
|
|
||||||
Key: escape
|
|
||||||
Font: Bold
|
|
||||||
|
|
||||||
|
|||||||
64
mods/ra/chrome/ingame-info.yaml
Normal file
64
mods/ra/chrome/ingame-info.yaml
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
Container@GAME_INFO_PANEL:
|
||||||
|
X: (WINDOW_RIGHT - WIDTH) / 2
|
||||||
|
Y: (WINDOW_BOTTOM - HEIGHT) / 2
|
||||||
|
Width: 522
|
||||||
|
Height: 455
|
||||||
|
Logic: GameInfoLogic
|
||||||
|
Visible: False
|
||||||
|
Children:
|
||||||
|
Background@BACKGROUND:
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
|
Background@BACKGROUND_NO_TABS:
|
||||||
|
Y: 25
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: PARENT_BOTTOM - 25
|
||||||
|
Label@TITLE:
|
||||||
|
Y: 20
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 25
|
||||||
|
Align: Center
|
||||||
|
Font: Bold
|
||||||
|
Label@TITLE_NO_TABS:
|
||||||
|
Y: 45
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 25
|
||||||
|
Align: Center
|
||||||
|
Font: Bold
|
||||||
|
Container@TAB_CONTAINER:
|
||||||
|
X: (PARENT_RIGHT - WIDTH) / 2
|
||||||
|
Width: 360
|
||||||
|
Height: 25
|
||||||
|
Children:
|
||||||
|
Button@BUTTON1:
|
||||||
|
Y: 50
|
||||||
|
Width: 120
|
||||||
|
Height: 25
|
||||||
|
Font: Bold
|
||||||
|
Visible: False
|
||||||
|
Button@BUTTON2:
|
||||||
|
X: 120
|
||||||
|
Y: 50
|
||||||
|
Width: 120
|
||||||
|
Height: 25
|
||||||
|
Font: Bold
|
||||||
|
Visible: False
|
||||||
|
Button@BUTTON3:
|
||||||
|
X: 240
|
||||||
|
Y: 50
|
||||||
|
Width: 120
|
||||||
|
Height: 25
|
||||||
|
Font: Bold
|
||||||
|
Visible: False
|
||||||
|
Container@STATS_PANEL:
|
||||||
|
Y: 65
|
||||||
|
Container@MAP_PANEL:
|
||||||
|
Y: 65
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
|
Container@OBJECTIVES_PANEL:
|
||||||
|
Y: 65
|
||||||
|
Container@DEBUG_PANEL:
|
||||||
|
Y: 65
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
32
mods/ra/chrome/ingame-infobriefing.yaml
Normal file
32
mods/ra/chrome/ingame-infobriefing.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
Container@MAP_PANEL:
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Logic: GameInfoBriefingLogic
|
||||||
|
Children:
|
||||||
|
Background@PREVIEW_BG:
|
||||||
|
X: (PARENT_RIGHT - WIDTH) / 2
|
||||||
|
Y: 20
|
||||||
|
Width: 324
|
||||||
|
Height: 160
|
||||||
|
Background: panel-gray
|
||||||
|
Children:
|
||||||
|
MapPreview@MAP_PREVIEW:
|
||||||
|
Width: 320
|
||||||
|
Height: 156
|
||||||
|
X: 2
|
||||||
|
Y: 2
|
||||||
|
IgnoreMouseOver: True
|
||||||
|
IgnoreMouseInput: True
|
||||||
|
ShowSpawnPoints: False
|
||||||
|
ScrollPanel@MAP_DESCRIPTION_PANEL:
|
||||||
|
X: 20
|
||||||
|
Y: 195
|
||||||
|
Width: 482
|
||||||
|
Height: 175
|
||||||
|
Children:
|
||||||
|
Label@MAP_DESCRIPTION:
|
||||||
|
X: 5
|
||||||
|
Y: 180
|
||||||
|
Width: 452
|
||||||
|
Height: 145
|
||||||
|
|
||||||
40
mods/ra/chrome/ingame-infoobjectives.yaml
Normal file
40
mods/ra/chrome/ingame-infoobjectives.yaml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
Container@MISSION_OBJECTIVES:
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Logic: GameInfoObjectivesLogic
|
||||||
|
Children:
|
||||||
|
Label@MISSION:
|
||||||
|
X: 20
|
||||||
|
Y: 20
|
||||||
|
Width: 80
|
||||||
|
Height: 25
|
||||||
|
Font: MediumBold
|
||||||
|
Text: Mission:
|
||||||
|
Label@MISSION_STATUS:
|
||||||
|
X: 100
|
||||||
|
Y: 20
|
||||||
|
Width: PARENT_RIGHT - 120
|
||||||
|
Height: 25
|
||||||
|
Font: MediumBold
|
||||||
|
ScrollPanel@OBJECTIVES_PANEL:
|
||||||
|
X: 20
|
||||||
|
Y: 60
|
||||||
|
Width: 482
|
||||||
|
Height: 310
|
||||||
|
ItemSpacing: 35
|
||||||
|
Children:
|
||||||
|
Container@OBJECTIVE_TEMPLATE:
|
||||||
|
Children:
|
||||||
|
Label@OBJECTIVE_TYPE:
|
||||||
|
X: 10
|
||||||
|
Y: 0 - 20
|
||||||
|
Height: 20
|
||||||
|
Width: 70
|
||||||
|
Align: Center
|
||||||
|
Checkbox@OBJECTIVE_STATUS:
|
||||||
|
X: 90
|
||||||
|
Y: 0 - 20
|
||||||
|
Width: PARENT_RIGHT - 100
|
||||||
|
Height: 20
|
||||||
|
Disabled: True
|
||||||
|
TextColorDisabled: 255,255,255
|
||||||
108
mods/ra/chrome/ingame-infostats.yaml
Normal file
108
mods/ra/chrome/ingame-infostats.yaml
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
Container@SKIRMISH_STATS:
|
||||||
|
Height: PARENT_BOTTOM
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Logic: GameInfoStatsLogic
|
||||||
|
Children:
|
||||||
|
Label@MISSION:
|
||||||
|
X: 20
|
||||||
|
Y: 20
|
||||||
|
Width: 482
|
||||||
|
Height: 25
|
||||||
|
Font: MediumBold
|
||||||
|
Text: Mission:
|
||||||
|
Label@STATS_STATUS:
|
||||||
|
X: 100
|
||||||
|
Y: 20
|
||||||
|
Width: PARENT_RIGHT - 10
|
||||||
|
Height: 25
|
||||||
|
Font: MediumBold
|
||||||
|
Checkbox@STATS_CHECKBOX:
|
||||||
|
X: 20
|
||||||
|
Y: 55
|
||||||
|
Width: 482
|
||||||
|
Height: 20
|
||||||
|
Font: Bold
|
||||||
|
Text: Destroy all opposition!
|
||||||
|
Disabled: yes
|
||||||
|
TextColorDisabled: 255,255,255
|
||||||
|
Container@STATS_HEADERS:
|
||||||
|
X: 22
|
||||||
|
Y: 80
|
||||||
|
Width: 393
|
||||||
|
Children:
|
||||||
|
Label@NAME:
|
||||||
|
X: 10
|
||||||
|
Width: 150
|
||||||
|
Height: 25
|
||||||
|
Text: Player
|
||||||
|
Font: Bold
|
||||||
|
Label@RACE:
|
||||||
|
X: 150
|
||||||
|
Width: 80
|
||||||
|
Height: 25
|
||||||
|
Text: Faction
|
||||||
|
Font: Bold
|
||||||
|
Align: Center
|
||||||
|
Label@STANCE:
|
||||||
|
X: 240
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Text: Team
|
||||||
|
Font: Bold
|
||||||
|
Align: Center
|
||||||
|
Label@KILLS:
|
||||||
|
X: 310
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Text: Kills
|
||||||
|
Font: Bold
|
||||||
|
Align: Center
|
||||||
|
Label@DEATHS:
|
||||||
|
X: 380
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Text: Deaths
|
||||||
|
Font: Bold
|
||||||
|
Align: Center
|
||||||
|
ScrollPanel@PLAYER_LIST:
|
||||||
|
X: 20
|
||||||
|
Y: 105
|
||||||
|
Width: 482
|
||||||
|
Height: 265
|
||||||
|
ItemSpacing: 5
|
||||||
|
Children:
|
||||||
|
Container@PLAYER_TEMPLATE:
|
||||||
|
Width: PARENT_RIGHT-27
|
||||||
|
Height: 25
|
||||||
|
X: 2
|
||||||
|
Y: 0
|
||||||
|
Children:
|
||||||
|
Label@NAME:
|
||||||
|
X: 10
|
||||||
|
Width: 150
|
||||||
|
Height: 25
|
||||||
|
Image@FACTIONFLAG:
|
||||||
|
X: 159
|
||||||
|
Y: 6
|
||||||
|
Width: 32
|
||||||
|
Height: 16
|
||||||
|
Label@FACTION:
|
||||||
|
X: 195
|
||||||
|
Width: 40
|
||||||
|
Height: 25
|
||||||
|
Label@TEAM:
|
||||||
|
X: 240
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Align: Center
|
||||||
|
Label@KILLS:
|
||||||
|
X: 310
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Align: Center
|
||||||
|
Label@DEATHS:
|
||||||
|
X: 380
|
||||||
|
Width: 70
|
||||||
|
Height: 25
|
||||||
|
Align: Center
|
||||||
|
|
||||||
@@ -1,52 +1,74 @@
|
|||||||
Background@INGAME_OPTIONS_BG:
|
Container@INGAME_MENU:
|
||||||
X: (WINDOW_RIGHT - WIDTH)/2
|
Width: WINDOW_RIGHT
|
||||||
Y: (WINDOW_BOTTOM - HEIGHT)/2
|
Height: WINDOW_BOTTOM
|
||||||
Width: 300
|
|
||||||
Height: 295
|
|
||||||
Logic: IngameMenuLogic
|
Logic: IngameMenuLogic
|
||||||
Children:
|
Children:
|
||||||
Label@LABEL_TITLE:
|
Background@BORDER:
|
||||||
X: (PARENT_RIGHT - WIDTH)/2
|
X: 0 - 15
|
||||||
Y: 20
|
Y: 0 - 15
|
||||||
Width: 250
|
Width: WINDOW_RIGHT + 30
|
||||||
|
Height: WINDOW_BOTTOM + 30
|
||||||
|
Background: mainmenu-border
|
||||||
|
Image@LOGO:
|
||||||
|
X: WINDOW_RIGHT - 296
|
||||||
|
Y: 30
|
||||||
|
ImageCollection: logos
|
||||||
|
ImageName: logo
|
||||||
|
Label@VERSION_LABEL:
|
||||||
|
X: WINDOW_RIGHT - 296
|
||||||
|
Y: 296 - 20
|
||||||
|
Width: 296 - 20
|
||||||
Height: 25
|
Height: 25
|
||||||
Text: Options
|
|
||||||
Align: Center
|
Align: Center
|
||||||
Font: Bold
|
Font: Regular
|
||||||
Button@RESUME:
|
Contrast: True
|
||||||
X: (PARENT_RIGHT - WIDTH)/2
|
Background@MENU_BUTTONS:
|
||||||
Y: 60
|
X: 100
|
||||||
Width: 160
|
Y: (WINDOW_BOTTOM - HEIGHT)/2
|
||||||
Height: 25
|
Width: 200
|
||||||
Text: Resume
|
Height: 295
|
||||||
Font: Bold
|
Children:
|
||||||
Key: escape
|
Label@LABEL_TITLE:
|
||||||
Button@SETTINGS:
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
X: (PARENT_RIGHT - WIDTH)/2
|
Y: 20
|
||||||
Y: 100
|
Width: 200
|
||||||
Width: 160
|
Height: 30
|
||||||
Height: 25
|
Text: Options
|
||||||
Text: Settings
|
Align: Center
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Button@MUSIC:
|
Button@RESUME:
|
||||||
X: (PARENT_RIGHT - WIDTH)/2
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
Y: 140
|
Y: 60
|
||||||
Width: 160
|
Width: 140
|
||||||
Height: 25
|
Height: 30
|
||||||
Text: Music
|
Text: Resume
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Button@SURRENDER:
|
Key: escape
|
||||||
X: (PARENT_RIGHT - WIDTH)/2
|
Button@SETTINGS:
|
||||||
Y: 180
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
Width: 160
|
Y: 100
|
||||||
Height: 25
|
Width: 140
|
||||||
Text: Surrender
|
Height: 30
|
||||||
Font: Bold
|
Text: Settings
|
||||||
Button@DISCONNECT:
|
Font: Bold
|
||||||
X: (PARENT_RIGHT - WIDTH)/2
|
Button@MUSIC:
|
||||||
Y: 220
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
Width: 160
|
Y: 140
|
||||||
Height: 25
|
Width: 140
|
||||||
Text: Abort Mission
|
Height: 30
|
||||||
Font: Bold
|
Text: Music
|
||||||
|
Font: Bold
|
||||||
|
Button@SURRENDER:
|
||||||
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y: 180
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Text: Surrender
|
||||||
|
Font: Bold
|
||||||
|
Button@ABORT_MISSION:
|
||||||
|
X: (PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y: 220
|
||||||
|
Width: 140
|
||||||
|
Height: 30
|
||||||
|
Text: Abort Mission
|
||||||
|
Font: Bold
|
||||||
|
|||||||
@@ -1,98 +0,0 @@
|
|||||||
Background@MISSION_OBJECTIVES:
|
|
||||||
Logic: MissionObjectivesLogic
|
|
||||||
X: 25
|
|
||||||
Y: 50
|
|
||||||
Width: 512
|
|
||||||
Height: 530
|
|
||||||
Visible: false
|
|
||||||
Background: dialog
|
|
||||||
Children:
|
|
||||||
Label@TITLE:
|
|
||||||
X: 0
|
|
||||||
Y: 15
|
|
||||||
Width: PARENT_RIGHT
|
|
||||||
Height: 25
|
|
||||||
Font: Bold
|
|
||||||
Align: Center
|
|
||||||
Text: Objectives
|
|
||||||
Label@PRIMARY_OBJECTIVE_HEADER:
|
|
||||||
X: 40
|
|
||||||
Y: 40
|
|
||||||
Width: 300
|
|
||||||
Height: 25
|
|
||||||
Font: Bold
|
|
||||||
Text: Primary Objectives
|
|
||||||
Label@PRIMARY_STATUS_HEADER:
|
|
||||||
X: 350
|
|
||||||
Y: 40
|
|
||||||
Width: 122
|
|
||||||
Height: 25
|
|
||||||
Font: Bold
|
|
||||||
Text: Status
|
|
||||||
ScrollPanel@PRIMARY_OBJECTIVES:
|
|
||||||
X: 25
|
|
||||||
Y: 70
|
|
||||||
Width: PARENT_RIGHT-50
|
|
||||||
Height: 200
|
|
||||||
ItemSpacing: 20
|
|
||||||
Children:
|
|
||||||
Container@PRIMARY_OBJECTIVE_TEMPLATE:
|
|
||||||
X: 15
|
|
||||||
Y: 0
|
|
||||||
Width: PARENT_RIGHT
|
|
||||||
Children:
|
|
||||||
Label@PRIMARY_OBJECTIVE:
|
|
||||||
X: 0
|
|
||||||
Y: 0
|
|
||||||
Width: 300
|
|
||||||
Height: PARENT_BOTTOM
|
|
||||||
Font: Regular
|
|
||||||
WordWrap: True
|
|
||||||
Label@PRIMARY_STATUS:
|
|
||||||
X: 310
|
|
||||||
Y: 0
|
|
||||||
Width: 122
|
|
||||||
Height: PARENT_BOTTOM
|
|
||||||
Font: Bold
|
|
||||||
WordWrap: True
|
|
||||||
Label@SECONDARY_OBJECTIVE_HEADER:
|
|
||||||
X: 40
|
|
||||||
Y: 275
|
|
||||||
Width: 300
|
|
||||||
Height: 25
|
|
||||||
Font: Bold
|
|
||||||
Text: Secondary Objectives
|
|
||||||
Label@SECONDARY_STATUS_HEADER:
|
|
||||||
X: 350
|
|
||||||
Y: 275
|
|
||||||
Width: 122
|
|
||||||
Height: 25
|
|
||||||
Font: Bold
|
|
||||||
Text: Status
|
|
||||||
ScrollPanel@SECONDARY_OBJECTIVES:
|
|
||||||
X: 25
|
|
||||||
Y: 305
|
|
||||||
Width: PARENT_RIGHT-50
|
|
||||||
Height: 200
|
|
||||||
ItemSpacing: 20
|
|
||||||
Children:
|
|
||||||
Container@SECONDARY_OBJECTIVE_TEMPLATE:
|
|
||||||
X: 15
|
|
||||||
Y: 0
|
|
||||||
Width: PARENT_RIGHT
|
|
||||||
Children:
|
|
||||||
Label@SECONDARY_OBJECTIVE:
|
|
||||||
X: 0
|
|
||||||
Y: 0
|
|
||||||
Width: 300
|
|
||||||
Height: PARENT_BOTTOM
|
|
||||||
Font: Regular
|
|
||||||
WordWrap: True
|
|
||||||
Label@SECONDARY_STATUS:
|
|
||||||
X: 310
|
|
||||||
Y: 0
|
|
||||||
Width: 122
|
|
||||||
Height: PARENT_BOTTOM
|
|
||||||
Font: Bold
|
|
||||||
WordWrap: True
|
|
||||||
|
|
||||||
@@ -21,8 +21,8 @@ Container@OBSERVER_WIDGETS:
|
|||||||
Font: Bold
|
Font: Bold
|
||||||
Contrast: true
|
Contrast: true
|
||||||
MenuButton@OPTIONS_BUTTON:
|
MenuButton@OPTIONS_BUTTON:
|
||||||
MenuContainer: INGAME_OPTIONS_BG
|
MenuContainer: INGAME_MENU
|
||||||
HideIngameUI: false
|
HideIngameUI: true
|
||||||
Pause: false
|
Pause: false
|
||||||
X: 0
|
X: 0
|
||||||
Y: 0
|
Y: 0
|
||||||
|
|||||||
@@ -3,15 +3,6 @@ Container@PLAYER_WIDGETS:
|
|||||||
LogicKeyListener@CONTROLGROUP_KEYHANDLER:
|
LogicKeyListener@CONTROLGROUP_KEYHANDLER:
|
||||||
Logic: ControlGroupLogic
|
Logic: ControlGroupLogic
|
||||||
LogicTicker@SIDEBAR_TICKER:
|
LogicTicker@SIDEBAR_TICKER:
|
||||||
Button@OBJECTIVES_BUTTON:
|
|
||||||
X: 486
|
|
||||||
Y: 0
|
|
||||||
Width: 160
|
|
||||||
Height: 25
|
|
||||||
Text: Objectives (O)
|
|
||||||
Visible: false
|
|
||||||
Font: Bold
|
|
||||||
Key: o
|
|
||||||
Container@SUPPORT_POWERS:
|
Container@SUPPORT_POWERS:
|
||||||
Logic: SupportPowerBinLogic
|
Logic: SupportPowerBinLogic
|
||||||
X: 10
|
X: 10
|
||||||
@@ -106,9 +97,6 @@ Container@PLAYER_WIDGETS:
|
|||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
MenuButton@DEBUG_BUTTON:
|
MenuButton@DEBUG_BUTTON:
|
||||||
Logic: AddRaceSuffixLogic
|
Logic: AddRaceSuffixLogic
|
||||||
MenuContainer: INGAME_DEBUG_BG
|
|
||||||
HideIngameUI: false
|
|
||||||
Pause: false
|
|
||||||
Key: escape Shift
|
Key: escape Shift
|
||||||
X: 128
|
X: 128
|
||||||
Width: 28
|
Width: 28
|
||||||
@@ -144,8 +132,6 @@ Container@PLAYER_WIDGETS:
|
|||||||
ImageName: diplomacy
|
ImageName: diplomacy
|
||||||
MenuButton@OPTIONS_BUTTON:
|
MenuButton@OPTIONS_BUTTON:
|
||||||
Logic: AddRaceSuffixLogic
|
Logic: AddRaceSuffixLogic
|
||||||
MenuContainer: INGAME_OPTIONS_BG
|
|
||||||
HideIngameUI: false
|
|
||||||
Key: escape
|
Key: escape
|
||||||
X: 192
|
X: 192
|
||||||
Width: 28
|
Width: 28
|
||||||
|
|||||||
@@ -74,8 +74,11 @@ ChromeLayout:
|
|||||||
mods/ra/chrome/ingame-chat.yaml
|
mods/ra/chrome/ingame-chat.yaml
|
||||||
mods/ra/chrome/ingame-diplomacy.yaml
|
mods/ra/chrome/ingame-diplomacy.yaml
|
||||||
mods/ra/chrome/ingame-fmvplayer.yaml
|
mods/ra/chrome/ingame-fmvplayer.yaml
|
||||||
|
mods/ra/chrome/ingame-info.yaml
|
||||||
|
mods/ra/chrome/ingame-infobriefing.yaml
|
||||||
|
mods/ra/chrome/ingame-infoobjectives.yaml
|
||||||
|
mods/ra/chrome/ingame-infostats.yaml
|
||||||
mods/ra/chrome/ingame-menu.yaml
|
mods/ra/chrome/ingame-menu.yaml
|
||||||
mods/ra/chrome/ingame-objectives.yaml
|
|
||||||
mods/ra/chrome/ingame-observer.yaml
|
mods/ra/chrome/ingame-observer.yaml
|
||||||
mods/ra/chrome/ingame-observerstats.yaml
|
mods/ra/chrome/ingame-observerstats.yaml
|
||||||
mods/ra/chrome/ingame-player.yaml
|
mods/ra/chrome/ingame-player.yaml
|
||||||
@@ -169,6 +172,9 @@ Fonts:
|
|||||||
Title:
|
Title:
|
||||||
Font:mods/ra/ZoodRangmah.ttf
|
Font:mods/ra/ZoodRangmah.ttf
|
||||||
Size:48
|
Size:48
|
||||||
|
MediumBold:
|
||||||
|
Font:FreeSansBold.ttf
|
||||||
|
Size:18
|
||||||
BigBold:
|
BigBold:
|
||||||
Font:FreeSansBold.ttf
|
Font:FreeSansBold.ttf
|
||||||
Size:24
|
Size:24
|
||||||
|
|||||||
@@ -174,4 +174,6 @@ World:
|
|||||||
DebugPauseState:
|
DebugPauseState:
|
||||||
RadarPings:
|
RadarPings:
|
||||||
StartGameNotification:
|
StartGameNotification:
|
||||||
|
ObjectivesPanel:
|
||||||
|
PanelName: SKIRMISH_STATS
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ Container@PLAYER_WIDGETS:
|
|||||||
LogicKeyListener@CONTROLGROUP_KEYHANDLER:
|
LogicKeyListener@CONTROLGROUP_KEYHANDLER:
|
||||||
Logic: ControlGroupLogic
|
Logic: ControlGroupLogic
|
||||||
LogicTicker@SIDEBAR_TICKER:
|
LogicTicker@SIDEBAR_TICKER:
|
||||||
Button@INGAME_DIPLOMACY_BUTTON:
|
MenuButton@DIPLOMACY_BUTTON:
|
||||||
|
Logic: OrderButtonsChromeLogic
|
||||||
|
MenuContainer: INGAME_DIPLOMACY_BG
|
||||||
|
HideIngameUI: False
|
||||||
X: 162
|
X: 162
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 160
|
Width: 160
|
||||||
@@ -11,7 +14,9 @@ Container@PLAYER_WIDGETS:
|
|||||||
Text: Diplomacy (P)
|
Text: Diplomacy (P)
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Key: p
|
Key: p
|
||||||
Button@INGAME_DEBUG_BUTTON:
|
MenuButton@DEBUG_BUTTON:
|
||||||
|
Logic: OrderButtonsChromeLogic
|
||||||
|
MenuContainer: INGAME_MENU
|
||||||
X: 324
|
X: 324
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 160
|
Width: 160
|
||||||
@@ -20,15 +25,6 @@ Container@PLAYER_WIDGETS:
|
|||||||
Visible: false
|
Visible: false
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Key: escape Shift
|
Key: escape Shift
|
||||||
Button@OBJECTIVES_BUTTON:
|
|
||||||
X: 486
|
|
||||||
Y: 0
|
|
||||||
Width: 160
|
|
||||||
Height: 25
|
|
||||||
Text: Objectives (O)
|
|
||||||
Visible: false
|
|
||||||
Font: Bold
|
|
||||||
Key: o
|
|
||||||
SlidingContainer@INGAME_RADAR_BIN:
|
SlidingContainer@INGAME_RADAR_BIN:
|
||||||
X: WINDOW_RIGHT-215
|
X: WINDOW_RIGHT-215
|
||||||
Y: 0
|
Y: 0
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ Container@INGAME_ROOT:
|
|||||||
Y: 34
|
Y: 34
|
||||||
Order: Descending
|
Order: Descending
|
||||||
Container@PLAYER_ROOT:
|
Container@PLAYER_ROOT:
|
||||||
Button@INGAME_OPTIONS_BUTTON:
|
MenuButton@OPTIONS_BUTTON:
|
||||||
|
Logic: OrderButtonsChromeLogic
|
||||||
|
MenuContainer: INGAME_MENU
|
||||||
X: 0
|
X: 0
|
||||||
Y: 0
|
Y: 0
|
||||||
Width: 160
|
Width: 160
|
||||||
|
|||||||
@@ -104,7 +104,10 @@ ChromeLayout:
|
|||||||
mods/ra/chrome/ingame-diplomacy.yaml
|
mods/ra/chrome/ingame-diplomacy.yaml
|
||||||
mods/ra/chrome/ingame-fmvplayer.yaml
|
mods/ra/chrome/ingame-fmvplayer.yaml
|
||||||
mods/ra/chrome/ingame-menu.yaml
|
mods/ra/chrome/ingame-menu.yaml
|
||||||
mods/ra/chrome/ingame-objectives.yaml
|
mods/ra/chrome/ingame-info.yaml
|
||||||
|
mods/ra/chrome/ingame-infobriefing.yaml
|
||||||
|
mods/ra/chrome/ingame-infoobjectives.yaml
|
||||||
|
mods/ra/chrome/ingame-infostats.yaml
|
||||||
mods/ra/chrome/ingame-observer.yaml
|
mods/ra/chrome/ingame-observer.yaml
|
||||||
mods/ra/chrome/ingame-observerstats.yaml
|
mods/ra/chrome/ingame-observerstats.yaml
|
||||||
mods/ts/chrome/ingame-player.yaml
|
mods/ts/chrome/ingame-player.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user