Merge pull request #8105 from deniz1a/scrollafterend

Removes LeaveMap window.
This commit is contained in:
Oliver Brakmann
2015-07-25 18:13:57 +02:00
21 changed files with 80 additions and 712 deletions

View File

@@ -106,6 +106,9 @@ namespace OpenRA.Orders
if (self.Owner != self.World.LocalPlayer)
return null;
if (self.World.IsGameOver)
return null;
if (self.Disposed || !target.IsValidFor(self))
return null;

View File

@@ -57,6 +57,16 @@ namespace OpenRA
}
}
foreach (var a in newSelection)
foreach (var sel in a.TraitsImplementing<INotifySelected>())
sel.Selected(a);
foreach (var ns in world.WorldActor.TraitsImplementing<INotifySelection>())
ns.SelectionChanged();
if (world.IsGameOver)
return;
// Play the selection voice from one of the selected actors
// TODO: This probably should only be considering the newly selected actors
// TODO: Ship this into an INotifySelection trait to remove the engine dependency on Selectable
@@ -72,12 +82,6 @@ namespace OpenRA
actor.PlayVoice(selectable.Voice);
break;
}
foreach (var a in newSelection)
foreach (var sel in a.TraitsImplementing<INotifySelected>())
sel.Selected(a);
foreach (var ns in world.WorldActor.TraitsImplementing<INotifySelection>())
ns.SelectionChanged();
}
public IEnumerable<Actor> Actors { get { return actors; } }

View File

@@ -232,13 +232,13 @@ namespace OpenRA.Widgets
if (key == Game.Settings.Keys.PauseKey && World.LocalPlayer != null) // Disable pausing for spectators
World.SetPauseState(!World.Paused);
else if (key == Game.Settings.Keys.SelectAllUnitsKey)
else if (key == Game.Settings.Keys.SelectAllUnitsKey && !World.IsGameOver)
{
// Select actors on the screen which belong to the current player
var ownUnitsOnScreen = SelectActorsOnScreen(World, worldRenderer, null, player).SubsetWithHighestSelectionPriority();
World.Selection.Combine(World, ownUnitsOnScreen, false, false);
}
else if (key == Game.Settings.Keys.SelectUnitsByTypeKey)
else if (key == Game.Settings.Keys.SelectUnitsByTypeKey && !World.IsGameOver)
{
// Get all the selected actors' selection classes
var selectedClasses = World.Selection.Actors

View File

@@ -52,12 +52,12 @@ namespace OpenRA
public Player LocalPlayer { get; private set; }
public event Action GameOver = () => { };
bool gameOver;
public bool IsGameOver { get; private set; }
public void EndGame()
{
if (!gameOver)
if (!IsGameOver)
{
gameOver = true;
IsGameOver = true;
foreach (var t in WorldActor.TraitsImplementing<IGameOver>())
t.GameOver(this);
@@ -66,11 +66,10 @@ namespace OpenRA
}
}
public bool ObserveAfterWinOrLose;
Player renderPlayer;
public Player RenderPlayer
{
get { return renderPlayer == null || (ObserveAfterWinOrLose && renderPlayer.WinState != WinState.Undefined) ? null : renderPlayer; }
get { return renderPlayer == null || renderPlayer.WinState != WinState.Undefined ? null : renderPlayer; }
set { renderPlayer = value; }
}

View File

@@ -586,7 +586,6 @@
<Compile Include="Widgets\Logic\Ingame\IngamePowerCounterLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngameSiloBarLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngameRadarDisplayLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\LeaveMapLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\LoadIngamePlayerOrObserverUILogic.cs" />
<Compile Include="Widgets\Logic\Ingame\LoadMapEditorLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\ObserverShroudSelectorLogic.cs" />

View File

@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
public class MissionObjectives : INotifyObjectivesUpdated, ISync, IResolveOrder
{
readonly MissionObjectivesInfo info;
public readonly MissionObjectivesInfo Info;
readonly List<MissionObjective> objectives = new List<MissionObjective>();
public ReadOnlyList<MissionObjective> Objectives;
@@ -64,12 +64,10 @@ namespace OpenRA.Mods.Common.Traits
// The player's WinState is only updated when his allies have all completed their objective as well.
public WinState WinStateCooperative { get; private set; }
public MissionObjectives(World world, MissionObjectivesInfo moInfo)
public MissionObjectives(World world, MissionObjectivesInfo info)
{
info = moInfo;
Info = info;
Objectives = new ReadOnlyList<MissionObjective>(objectives);
world.ObserveAfterWinOrLose = !info.EarlyGameOver;
}
public int Add(Player player, string description, ObjectiveType type = ObjectiveType.Primary, bool inhibitAnnouncement = false)
@@ -141,7 +139,7 @@ namespace OpenRA.Mods.Common.Traits
var gameOver = players.All(p => p.WinState != WinState.Undefined || !p.HasObjectives);
if (gameOver)
Game.RunAfterDelay(info.GameOverDelay, () =>
Game.RunAfterDelay(Info.GameOverDelay, () =>
{
player.World.EndGame();
player.World.SetPauseState(true);
@@ -154,7 +152,7 @@ namespace OpenRA.Mods.Common.Traits
var players = player.World.Players.Where(p => !p.NonCombatant);
var enemies = players.Where(p => !p.IsAlliedWith(player));
if (info.Cooperative)
if (Info.Cooperative)
{
WinStateCooperative = WinState.Won;
var allies = players.Where(p => p.IsAlliedWith(player));
@@ -167,7 +165,7 @@ namespace OpenRA.Mods.Common.Traits
p.World.OnPlayerWinStateChanged(p);
}
if (info.EarlyGameOver)
if (Info.EarlyGameOver)
foreach (var p in enemies)
p.PlayerActor.Trait<MissionObjectives>().ForceDefeat(p);
}
@@ -177,7 +175,7 @@ namespace OpenRA.Mods.Common.Traits
player.WinState = WinState.Won;
player.World.OnPlayerWinStateChanged(player);
if (info.EarlyGameOver)
if (Info.EarlyGameOver)
foreach (var p in enemies)
p.PlayerActor.Trait<MissionObjectives>().ForceDefeat(p);
}
@@ -190,7 +188,7 @@ namespace OpenRA.Mods.Common.Traits
var players = player.World.Players.Where(p => !p.NonCombatant);
var enemies = players.Where(p => !p.IsAlliedWith(player));
if (info.Cooperative)
if (Info.Cooperative)
{
WinStateCooperative = WinState.Lost;
var allies = players.Where(p => p.IsAlliedWith(player));
@@ -203,7 +201,7 @@ namespace OpenRA.Mods.Common.Traits
p.World.OnPlayerWinStateChanged(p);
}
if (info.EarlyGameOver)
if (Info.EarlyGameOver)
foreach (var p in enemies)
p.PlayerActor.Trait<MissionObjectives>().ForceDefeat(p);
}
@@ -213,7 +211,7 @@ namespace OpenRA.Mods.Common.Traits
player.WinState = WinState.Lost;
player.World.OnPlayerWinStateChanged(player);
if (info.EarlyGameOver)
if (Info.EarlyGameOver)
foreach (var p in enemies)
{
p.WinState = WinState.Won;

View File

@@ -10,6 +10,7 @@
using System;
using System.Linq;
using OpenRA.Mods.Common.Scripting;
using OpenRA.Traits;
using OpenRA.Widgets;
@@ -28,8 +29,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
widget.IsVisible = () => activePanel != IngameInfoPanel.AutoSelect;
// Objectives/Stats tab
var scriptContext = world.WorldActor.TraitOrDefault<LuaScript>();
var hasError = scriptContext != null && scriptContext.FatalErrorOccurred;
var iop = world.WorldActor.TraitsImplementing<IObjectivesPanel>().FirstOrDefault();
if (lp != null && iop != null && iop.PanelName != null)
var hasObjectives = hasError || (lp != null && iop != null && iop.PanelName != null);
if (hasObjectives)
{
numTabs++;
var objectivesTabButton = widget.Get<ButtonWidget>(string.Concat("BUTTON", numTabs.ToString()));
@@ -38,10 +43,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
objectivesTabButton.OnClick = () => activePanel = IngameInfoPanel.Objectives;
objectivesTabButton.IsHighlighted = () => activePanel == IngameInfoPanel.Objectives;
var panel = hasError ? "SCRIPT_ERROR_PANEL" : iop.PanelName;
var objectivesPanel = widget.Get<ContainerWidget>("OBJECTIVES_PANEL");
objectivesPanel.IsVisible = () => activePanel == IngameInfoPanel.Objectives;
Game.LoadWidget(world, iop.PanelName, objectivesPanel, new WidgetArgs());
Game.LoadWidget(world, panel, objectivesPanel, new WidgetArgs());
if (activePanel == IngameInfoPanel.AutoSelect)
activePanel = IngameInfoPanel.Objectives;
@@ -73,6 +79,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var debugTabButton = widget.Get<ButtonWidget>(string.Concat("BUTTON", numTabs.ToString()));
debugTabButton.Text = "Debug";
debugTabButton.IsVisible = () => lp != null && world.LobbyInfo.GlobalSettings.AllowCheats && numTabs > 1;
debugTabButton.IsDisabled = () => world.IsGameOver;
debugTabButton.OnClick = () => activePanel = IngameInfoPanel.Debug;
debugTabButton.IsHighlighted = () => activePanel == IngameInfoPanel.Debug;

View File

@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
[ObjectCreator.UseCtor]
public IngameMenuLogic(Widget widget, World world, Action onExit, WorldRenderer worldRenderer, IngameInfoPanel activePanel)
{
var resumeDisabled = false;
var leaving = false;
menu = widget.Get("INGAME_MENU");
var mpe = world.WorldActor.TraitOrDefault<MenuPaletteEffect>();
if (mpe != null)
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (world.Type == WorldType.Regular)
Sound.PlayNotification(world.Map.Rules, null, "Speech", "Leave", world.LocalPlayer == null ? null : world.LocalPlayer.Faction.InternalName);
resumeDisabled = true;
leaving = true;
var iop = world.WorldActor.TraitsImplementing<IObjectivesPanel>().FirstOrDefault();
var exitDelay = iop != null ? iop.ExitDelay : 0;
@@ -71,8 +71,18 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var abortMissionButton = menu.Get<ButtonWidget>("ABORT_MISSION");
abortMissionButton.IsVisible = () => world.Type == WorldType.Regular;
abortMissionButton.IsDisabled = () => leaving;
if (world.IsGameOver)
abortMissionButton.GetText = () => "Leave";
abortMissionButton.OnClick = () =>
{
if (world.IsGameOver)
{
onQuit();
return;
}
hideMenu = true;
ConfirmationDialogs.PromptConfirmAction("Abort Mission", "Leave this game and return to the menu?", onQuit, showMenu);
};
@@ -116,7 +126,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
});
};
menu.Get<ButtonWidget>("MUSIC").OnClick = () =>
var musicButton = menu.Get<ButtonWidget>("MUSIC");
musicButton.IsDisabled = () => leaving;
musicButton.OnClick = () =>
{
hideMenu = true;
Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs()
@@ -127,6 +139,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
};
var settingsButton = widget.Get<ButtonWidget>("SETTINGS");
settingsButton.IsDisabled = () => leaving;
settingsButton.OnClick = () =>
{
hideMenu = true;
@@ -139,7 +152,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
};
var resumeButton = menu.Get<ButtonWidget>("RESUME");
resumeButton.IsDisabled = () => resumeDisabled;
resumeButton.IsDisabled = () => leaving;
if (world.IsGameOver)
resumeButton.GetText = () => "Return to map";
resumeButton.OnClick = closeMenu;
var panelRoot = widget.GetOrNull("PANEL_ROOT");

View File

@@ -1,158 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 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.Drawing;
using System.Linq;
using OpenRA.Mods.Common.Scripting;
using OpenRA.Mods.Common.Traits;
using OpenRA.Network;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets
{
class LeaveMapLogic
{
readonly OrderManager orderManager;
enum Tab { Objectives, Chat }
Tab currentTab;
bool newChatMessage;
[ObjectCreator.UseCtor]
public LeaveMapLogic(Widget widget, World world, OrderManager orderManager)
{
this.orderManager = orderManager;
var mpe = world.WorldActor.TraitOrDefault<MenuPaletteEffect>();
if (mpe != null)
mpe.Fade(mpe.Info.MenuEffect);
widget.Get<LabelWidget>("VERSION_LABEL").Text = Game.ModData.Manifest.Mod.Version;
var showStats = false;
var scriptContext = world.WorldActor.TraitOrDefault<LuaScript>();
var iop = world.WorldActor.TraitsImplementing<IObjectivesPanel>().FirstOrDefault();
var isMultiplayer = !world.LobbyInfo.IsSinglePlayer && !world.IsReplay;
var hasError = scriptContext != null && scriptContext.FatalErrorOccurred;
var hasObjectives = hasError || (iop != null && iop.PanelName != null && world.LocalPlayer != null);
var showTabs = hasObjectives && isMultiplayer;
currentTab = hasObjectives ? Tab.Objectives : Tab.Chat;
var panelName = hasObjectives || isMultiplayer ? "LEAVE_MAP_FULL" : "LEAVE_MAP_SIMPLE";
var dialog = widget.Get<ContainerWidget>(panelName);
dialog.IsVisible = () => !showStats;
widget.IsVisible = () => Ui.CurrentWindow() == null;
if (hasObjectives || isMultiplayer)
{
var titleText = dialog.Get<LabelWidget>("GAME_ENDED_LABEL");
var titleTextNoTabs = dialog.GetOrNull<LabelWidget>("GAME_ENDED_LABEL_NO_TABS");
titleText.IsVisible = () => showTabs || (!showTabs && titleTextNoTabs == null);
if (titleTextNoTabs != null)
titleTextNoTabs.IsVisible = () => !showTabs;
var bg = dialog.Get<BackgroundWidget>("LEAVE_MAP_BG");
var bgNoTabs = dialog.GetOrNull<BackgroundWidget>("LEAVE_MAP_BG_NO_TABS");
bg.IsVisible = () => showTabs || (!showTabs && bgNoTabs == null);
if (bgNoTabs != null)
bgNoTabs.IsVisible = () => !showTabs;
var objButton = dialog.Get<ButtonWidget>("OBJECTIVES_BUTTON");
objButton.IsVisible = () => showTabs;
objButton.OnClick = () => currentTab = Tab.Objectives;
objButton.IsHighlighted = () => currentTab == Tab.Objectives;
var chatButton = dialog.Get<ButtonWidget>("CHAT_BUTTON");
chatButton.IsVisible = () => showTabs;
chatButton.OnClick = () =>
{
currentTab = Tab.Chat;
newChatMessage = false;
};
chatButton.IsHighlighted = () => currentTab == Tab.Chat || (newChatMessage && Game.LocalTick % 50 < 25);
Game.BeforeGameStart += UnregisterChatNotification;
orderManager.AddChatLine += NotifyNewChatMessage;
}
var statsButton = dialog.Get<ButtonWidget>("STATS_BUTTON");
statsButton.IsVisible = () => !world.Map.Visibility.HasFlag(MapVisibility.MissionSelector) || world.IsReplay;
statsButton.OnClick = () =>
{
showStats = true;
Game.LoadWidget(world, "INGAME_OBSERVERSTATS_BG", Ui.Root, new WidgetArgs()
{
{ "onExit", () => showStats = false }
});
};
var leaveButton = dialog.Get<ButtonWidget>("LEAVE_BUTTON");
leaveButton.OnClick = () =>
{
leaveButton.Disabled = true;
if (world.Type == WorldType.Regular)
Sound.PlayNotification(world.Map.Rules, null, "Speech", "Leave",
world.LocalPlayer == null ? null : world.LocalPlayer.Faction.InternalName);
var exitDelay = iop != null ? iop.ExitDelay : 0;
if (mpe != null)
{
Game.RunAfterDelay(exitDelay, () => mpe.Fade(MenuPaletteEffect.EffectType.Black));
exitDelay += 40 * mpe.Info.FadeLength;
}
Game.RunAfterDelay(exitDelay, () =>
{
Game.Disconnect();
Ui.ResetAll();
Game.LoadShellMap();
});
};
if (hasObjectives)
{
var panel = hasError ? "SCRIPT_ERROR_PANEL" : iop.PanelName;
var objectivesContainer = dialog.Get<ContainerWidget>("OBJECTIVES_PANEL");
Game.LoadWidget(world, panel, objectivesContainer, new WidgetArgs());
objectivesContainer.IsVisible = () => currentTab == Tab.Objectives;
string video = null;
if (world.LocalPlayer.WinState != WinState.Undefined)
video = world.LocalPlayer.WinState == WinState.Won ? world.Map.Videos.GameWon : world.Map.Videos.GameLost;
if (!string.IsNullOrEmpty(video))
Media.PlayFMVFullscreen(world, video, () => { });
}
if (isMultiplayer)
{
var chatContainer = dialog.Get<ContainerWidget>("DIALOG_CHAT_PANEL");
chatContainer.IsVisible = () => currentTab == Tab.Chat;
}
}
void NotifyNewChatMessage(Color c, string s1, string s2)
{
if (currentTab != Tab.Chat)
newChatMessage = true;
}
void UnregisterChatNotification()
{
orderManager.AddChatLine -= NotifyNewChatMessage;
Game.BeforeGameStart -= UnregisterChatNotification;
}
}
}

View File

@@ -8,6 +8,8 @@
*/
#endregion
using OpenRA.Mods.Common.Scripting;
using OpenRA.Mods.Common.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
@@ -28,12 +30,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
var playerWidgets = Game.LoadWidget(world, "PLAYER_WIDGETS", playerRoot, new WidgetArgs());
var sidebarTicker = playerWidgets.Get<LogicTickerWidget>("SIDEBAR_TICKER");
var objectives = world.LocalPlayer.PlayerActor.TraitOrDefault<MissionObjectives>();
sidebarTicker.OnTick = () =>
{
// Switch to observer mode after win/loss
if (world.ObserveAfterWinOrLose && world.LocalPlayer.WinState != WinState.Undefined)
Game.RunAfterTick(() =>
if (world.LocalPlayer.WinState != WinState.Undefined)
Game.RunAfterDelay(objectives != null ? objectives.Info.GameOverDelay : 0, () =>
{
world.LocalPlayer.Spectating = true;
playerRoot.RemoveChildren();
@@ -46,9 +49,21 @@ namespace OpenRA.Mods.Common.Widgets.Logic
world.GameOver += () =>
{
worldRoot.RemoveChildren();
Ui.CloseWindow();
menuRoot.RemoveChildren();
Game.LoadWidget(world, "LEAVE_MAP_WIDGET", menuRoot, new WidgetArgs());
if (world.LocalPlayer != null)
{
var scriptContext = world.WorldActor.TraitOrDefault<LuaScript>();
var video = world.LocalPlayer.WinState == WinState.Won ? world.Map.Videos.GameWon : world.Map.Videos.GameLost;
if (!string.IsNullOrEmpty(video) && !(scriptContext != null && scriptContext.FatalErrorOccurred))
Media.PlayFMVFullscreen(world, video, () => { });
}
var optionsButton = playerRoot.GetOrNull<MenuButtonWidget>("OPTIONS_BUTTON");
if (optionsButton != null)
optionsButton.OnClick();
};
}
}

View File

@@ -33,9 +33,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
worldRoot = Ui.Root.Get("WORLD_ROOT");
menuRoot = Ui.Root.Get("MENU_ROOT");
Action removeCurrentWidget = () => menuRoot.RemoveChild(currentWidget);
world.GameOver += removeCurrentWidget;
// System buttons
var options = widget.GetOrNull<MenuButtonWidget>("OPTIONS_BUTTON");
if (options != null)

View File

@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Widgets
return ToSelection();
// Put all functions that aren't unit-specific before this line!
if (!world.Selection.Actors.Any())
if (!world.Selection.Actors.Any() || world.IsGameOver)
return false;
if (key == ks.AttackMoveKey)

View File

@@ -50,6 +50,7 @@ Container@GAME_INFO_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Container@OBJECTIVES_PANEL:
Width: PARENT_RIGHT
Container@DEBUG_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM

View File

@@ -1,167 +0,0 @@
Container@LEAVE_MAP_WIDGET:
Logic: LeaveMapLogic
Children:
Image@EVA:
X: WINDOW_RIGHT-128-43
Y: 43
Width: 128
Height: 64
ImageCollection: logos
ImageName: eva
Label@VERSION_LABEL:
X: WINDOW_RIGHT-128-43
Y: 115
Width: 128
Align: Center
Contrast: true
Background@BORDER:
Width: WINDOW_RIGHT
Height: WINDOW_BOTTOM
Background: shellmapborder
Container@LEAVE_MAP_SIMPLE:
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 370
Height: 125
Visible: False
Children:
Background@LEAVE_MAP_SIMPLE_BG:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM - 35
Background: panel-black
Children:
Label@GAME_ENDED_LABEL:
X: 0
Y: 0 - 25
Width: PARENT_RIGHT
Font: BigBold
Align: Center
Text: The game has ended
Contrast: True
Label@BLURB:
X: 15
Y: (PARENT_BOTTOM - HEIGHT) / 2
Width: PARENT_RIGHT - 30
Text: Press 'Leave' to return to the main menu.
Align: Center
Button@LEAVE_BUTTON:
X: 0
Y: PARENT_BOTTOM - 1
Width: 140
Height: 35
Font: Bold
Text: Leave
Button@STATS_BUTTON:
X: PARENT_RIGHT - WIDTH
Y: PARENT_BOTTOM - 1
Width: 140
Height: 35
Font: Bold
Text: Statistics
Container@LEAVE_MAP_FULL:
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 512
Height: 410
Visible: False
Children:
Background@LEAVE_MAP_BG:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM - 35
Background: panel-black
Label@GAME_ENDED_LABEL:
X: 0
Y: 0 - 60
Width: PARENT_RIGHT
Font: BigBold
Align: Center
Text: The game has ended
Contrast: True
Label@GAME_ENDED_LABEL_NO_TABS:
X: 0
Y: 0 - 25
Width: PARENT_RIGHT
Font: BigBold
Align: Center
Text: The game has ended
Contrast: True
Container@TAB_CONTAINER:
Width: 290
Children:
Button@OBJECTIVES_BUTTON:
Y: 1 - HEIGHT
Width: 140
Height: 35
Font: Bold
Text: Objectives
Button@CHAT_BUTTON:
X: 150
Y: 1 - HEIGHT
Width: 140
Height: 35
Font: Bold
Text: Chat
Button@LEAVE_BUTTON:
X: 0
Y: PARENT_BOTTOM - 36
Width: 140
Height: 35
Font: Bold
Text: Leave
Button@STATS_BUTTON:
X: 150
Y: PARENT_BOTTOM - 36
Width: 140
Height: 35
Font: Bold
Text: Statistics
Container@OBJECTIVES_PANEL:
Width: PARENT_RIGHT
Height: 365
Container@DIALOG_CHAT_PANEL:
X: 15
Y: 15
Width: PARENT_RIGHT - 30
Height: 365
Logic: IngameChatLogic
Visible: False
Children:
Container@CHAT_CHROME:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Button@CHAT_MODE:
Y: PARENT_BOTTOM - HEIGHT - 20
Width: 50
Height: 25
Text: Team
Font: Bold
TextField@CHAT_TEXTFIELD:
X: 55
Y: PARENT_BOTTOM - HEIGHT - 20
Width: 427
Height: 25
ScrollPanel@CHAT_SCROLLPANEL:
Y: PARENT_BOTTOM - HEIGHT - 50
Width: 482
Height: 315
ItemSpacing: 4
Align: Bottom
Children:
Container@CHAT_TEMPLATE:
X: 2
Width: PARENT_RIGHT-27
Height: 16
Children:
Label@NAME:
X: 3
Width: 50
Height: 15
VAlign: Top
Label@TEXT:
X: 12
Width: PARENT_RIGHT - 17
Height: 15
WordWrap: true
VAlign: Top

View File

@@ -111,7 +111,6 @@ ChromeLayout:
./mods/cnc/chrome/ingame-infoscripterror.yaml
./mods/cnc/chrome/ingame-infoobjectives.yaml
./mods/cnc/chrome/ingame-infostats.yaml
./mods/cnc/chrome/ingame-leavemap.yaml
./mods/cnc/chrome/ingame-observerstats.yaml
./mods/cnc/chrome/music.yaml
./mods/cnc/chrome/settings.yaml

View File

@@ -1,168 +0,0 @@
Container@LEAVE_MAP_WIDGET:
Logic: LeaveMapLogic
Children:
Background@BORDER:
X: 0 - 15
Y: 0 - 15
Width: WINDOW_RIGHT + 30
Height: WINDOW_BOTTOM + 30
Background: mainmenu-border
Label@VERSION_LABEL:
X: WINDOW_RIGHT - 10
Y: WINDOW_BOTTOM - 20
Align: Right
Font: Regular
Contrast: True
Container@LEAVE_MAP_SIMPLE:
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 370
Height: 175
Visible: False
Children:
Background@LEAVE_MAP_SIMPLE_BG:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@GAME_ENDED_LABEL:
Y: 20
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: The game has ended
Label@BLURB:
X: 15
Y: 50
Width: PARENT_RIGHT - 30
Height: 65
Text: Press 'Leave' to return to the main menu.
Align: Center
Button@STATS_BUTTON:
X: 20
Y: PARENT_BOTTOM - 45
Width: 140
Height: 25
Font: Bold
Text: Statistics
Button@LEAVE_BUTTON:
X: PARENT_RIGHT - WIDTH - 20
Y: PARENT_BOTTOM - 45
Width: 140
Height: 25
Font: Bold
Text: Leave
Container@LEAVE_MAP_FULL:
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 522
Height: 495
Visible: False
Children:
Background@LEAVE_MAP_BG:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Visible: False
Background@LEAVE_MAP_BG_NO_TABS:
Y: 25
Width: PARENT_RIGHT
Height: PARENT_BOTTOM - 25
Visible: False
Label@GAME_ENDED_LABEL:
X: 20
Y: 20
Width: PARENT_RIGHT - 40
Height: 25
Font: Bold
Align: Center
Text: The game has ended
Label@GAME_ENDED_LABEL_NO_TABS:
X: 20
Y: 45
Width: PARENT_RIGHT - 40
Height: 25
Font: Bold
Align: Center
Text: The game has ended
Container@TAB_CONTAINER:
X: (PARENT_RIGHT - WIDTH) / 2
Width: 240
Height: 25
Children:
Button@OBJECTIVES_BUTTON:
X: 0
Y: 50
Width: 120
Height: 25
Font: Bold
Text: Objectives
Button@CHAT_BUTTON:
X: 120
Y: 50
Width: 120
Height: 25
Font: Bold
Text: Chat
Button@STATS_BUTTON:
X: PARENT_RIGHT - 2 * (WIDTH + 20)
Y: PARENT_BOTTOM - 45
Width: 120
Height: 25
Font: Bold
Text: Statistics
Button@LEAVE_BUTTON:
X: PARENT_RIGHT - WIDTH - 20
Y: PARENT_BOTTOM - 45
Width: 120
Height: 25
Font: Bold
Text: Leave
Container@OBJECTIVES_PANEL:
Y: 65
Width: PARENT_RIGHT
Container@DIALOG_CHAT_PANEL:
X: 20
Y: 65
Width: PARENT_RIGHT - 40
Height: 370
Logic: IngameChatLogic
Visible: False
Children:
Container@CHAT_CHROME:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Button@CHAT_MODE:
Y: PARENT_BOTTOM - HEIGHT
Width: 50
Height: 25
Text: Team
Font: Bold
TextField@CHAT_TEXTFIELD:
X: 55
Y: PARENT_BOTTOM - HEIGHT
Width: 427
Height: 25
ScrollPanel@CHAT_SCROLLPANEL:
Y: PARENT_BOTTOM - HEIGHT - 30
Width: 482
Height: 315
ItemSpacing: 4
Align: Bottom
Children:
Container@CHAT_TEMPLATE:
X: 2
Width: PARENT_RIGHT-27
Height: 16
Children:
Label@NAME:
X: 3
Width: 50
Height: 15
VAlign: Top
Label@TEXT:
X: 12
Width: PARENT_RIGHT - 17
Height: 15
WordWrap: true
VAlign: Top

View File

@@ -81,7 +81,6 @@ ChromeLayout:
./mods/d2k/chrome/ingame-player.yaml
./mods/ra/chrome/ingame-perf.yaml
./mods/ra/chrome/ingame-debug.yaml
./mods/d2k/chrome/ingame-leavemap.yaml
./mods/d2k/chrome/mainmenu.yaml
./mods/ra/chrome/settings.yaml
./mods/ra/chrome/credits.yaml

View File

@@ -58,6 +58,7 @@ Container@GAME_INFO_PANEL:
Height: PARENT_BOTTOM
Container@OBJECTIVES_PANEL:
Y: 65
Width: PARENT_RIGHT
Container@DEBUG_PANEL:
Y: 65
Width: PARENT_RIGHT

View File

@@ -1,175 +0,0 @@
Container@LEAVE_MAP_WIDGET:
Logic: LeaveMapLogic
Children:
Background@BORDER:
X: 0 - 15
Y: 0 - 15
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
Align: Center
Font: Regular
Contrast: True
Container@LEAVE_MAP_SIMPLE:
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 370
Height: 175
Visible: False
Children:
Background@LEAVE_MAP_SIMPLE_BG:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@GAME_ENDED_LABEL:
Y: 20
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: The game has ended
Label@BLURB:
X: 15
Y: 50
Width: PARENT_RIGHT - 30
Height: 65
Text: Press 'Leave' to return to the main menu.
Align: Center
Button@STATS_BUTTON:
X: 20
Y: PARENT_BOTTOM - 45
Width: 140
Height: 25
Font: Bold
Text: Statistics
Button@LEAVE_BUTTON:
X: PARENT_RIGHT - WIDTH - 20
Y: PARENT_BOTTOM - 45
Width: 140
Height: 25
Font: Bold
Text: Leave
Container@LEAVE_MAP_FULL:
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 522
Height: 510
Visible: False
Children:
Background@LEAVE_MAP_BG:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Visible: False
Background@LEAVE_MAP_BG_NO_TABS:
Y: 25
Width: PARENT_RIGHT
Height: PARENT_BOTTOM - 25
Visible: False
Label@GAME_ENDED_LABEL:
X: 20
Y: 20
Width: PARENT_RIGHT - 40
Height: 25
Font: Bold
Align: Center
Text: The game has ended
Label@GAME_ENDED_LABEL_NO_TABS:
X: 20
Y: 45
Width: PARENT_RIGHT - 40
Height: 25
Font: Bold
Align: Center
Text: The game has ended
Container@TAB_CONTAINER:
X: (PARENT_RIGHT - WIDTH) / 2
Width: 240
Height: 25
Children:
Button@OBJECTIVES_BUTTON:
X: 0
Y: 50
Width: 120
Height: 25
Font: Bold
Text: Objectives
Button@CHAT_BUTTON:
X: 120
Y: 50
Width: 120
Height: 25
Font: Bold
Text: Chat
Button@STATS_BUTTON:
X: PARENT_RIGHT - 2 * (WIDTH + 20)
Y: PARENT_BOTTOM - 45
Width: 120
Height: 25
Font: Bold
Text: Statistics
Button@LEAVE_BUTTON:
X: PARENT_RIGHT - WIDTH - 20
Y: PARENT_BOTTOM - 45
Width: 120
Height: 25
Font: Bold
Text: Leave
Container@OBJECTIVES_PANEL:
Y: 65
Width: PARENT_RIGHT
Container@DIALOG_CHAT_PANEL:
X: 20
Y: 65
Width: PARENT_RIGHT - 40
Height: 370
Logic: IngameChatLogic
Visible: False
Children:
Container@CHAT_CHROME:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Button@CHAT_MODE:
Y: PARENT_BOTTOM - HEIGHT
Width: 50
Height: 25
Text: Team
Font: Bold
TextField@CHAT_TEXTFIELD:
X: 55
Y: PARENT_BOTTOM - HEIGHT
Width: 427
Height: 25
ScrollPanel@CHAT_SCROLLPANEL:
Y: PARENT_BOTTOM - HEIGHT - 30
Width: 482
Height: 315
ItemSpacing: 4
Align: Bottom
Children:
Container@CHAT_TEMPLATE:
X: 2
Width: PARENT_RIGHT-27
Height: 16
Children:
Label@NAME:
X: 3
Width: 50
Height: 15
VAlign: Top
Label@TEXT:
X: 12
Width: PARENT_RIGHT - 17
Height: 15
WordWrap: true
VAlign: Top

View File

@@ -87,7 +87,6 @@ ChromeLayout:
./mods/ra/chrome/ingame-infobriefing.yaml
./mods/ra/chrome/ingame-infoobjectives.yaml
./mods/ra/chrome/ingame-infostats.yaml
./mods/ra/chrome/ingame-leavemap.yaml
./mods/ra/chrome/ingame-menu.yaml
./mods/ra/chrome/ingame-observer.yaml
./mods/ra/chrome/ingame-observerstats.yaml

View File

@@ -148,7 +148,6 @@ ChromeLayout:
./mods/ts/chrome/ingame-player.yaml
./mods/ra/chrome/ingame-perf.yaml
./mods/ra/chrome/ingame-debug.yaml
./mods/ra/chrome/ingame-leavemap.yaml
./mods/ra/chrome/mainmenu.yaml
./mods/ra/chrome/settings.yaml
./mods/ra/chrome/credits.yaml