diff --git a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
index da83a159d9..e60412c267 100644
--- a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
+++ b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
@@ -85,7 +85,6 @@
-
@@ -94,14 +93,9 @@
-
-
-
-
-
diff --git a/OpenRA.Mods.D2k/Traits/World/ChooseBuildTabOnSelect.cs b/OpenRA.Mods.D2k/Traits/World/ChooseBuildTabOnSelect.cs
deleted file mode 100644
index 1cce0d7465..0000000000
--- a/OpenRA.Mods.D2k/Traits/World/ChooseBuildTabOnSelect.cs
+++ /dev/null
@@ -1,69 +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.Linq;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.D2k.Widgets;
-using OpenRA.Mods.RA.Traits;
-using OpenRA.Traits;
-using OpenRA.Widgets;
-
-namespace OpenRA.Mods.D2k.Traits
-{
- [Desc("If the BuildPaletteWidget is used, this trait needs to be added to world actor",
- "to make the build palette open automatically when a production facility is deployed.")]
- class ChooseBuildTabOnSelectInfo : ITraitInfo
- {
- public readonly string BuildPaletteWidgetName = "INGAME_BUILD_PALETTE";
-
- public object Create(ActorInitializer init) { return new ChooseBuildTabOnSelect(init, this); }
- }
-
- class ChooseBuildTabOnSelect : INotifySelection
- {
- readonly World world;
- readonly ChooseBuildTabOnSelectInfo info;
-
- public ChooseBuildTabOnSelect(ActorInitializer init, ChooseBuildTabOnSelectInfo info)
- {
- world = init.World;
- this.info = info;
- }
-
- public void SelectionChanged()
- {
- var palette = Ui.Root.GetOrNull(info.BuildPaletteWidgetName);
- if (palette == null)
- return;
-
- // Queue-per-structure
- var perqueue = world.Selection.Actors.FirstOrDefault(a => a.IsInWorld && a.World.LocalPlayer == a.Owner
- && a.TraitsImplementing().Any(q => q.Enabled));
-
- if (perqueue != null)
- {
- palette.SetCurrentTab(perqueue.TraitsImplementing().First(q => q.Enabled));
- return;
- }
-
- // Queue-per-player
- var types = world.Selection.Actors.Where(a => a.IsInWorld && (a.World.LocalPlayer == a.Owner))
- .SelectMany(a => a.TraitsImplementing())
- .SelectMany(t => t.Info.Produces)
- .ToHashSet();
-
- if (types.Count == 0)
- return;
-
- palette.SetCurrentTab(world.LocalPlayer.PlayerActor.TraitsImplementing()
- .FirstOrDefault(q => q.Enabled && types.Contains(q.Info.Type)));
- }
- }
-}
diff --git a/OpenRA.Mods.D2k/Widgets/BuildPaletteWidget.cs b/OpenRA.Mods.D2k/Widgets/BuildPaletteWidget.cs
deleted file mode 100644
index 08df66cc1e..0000000000
--- a/OpenRA.Mods.D2k/Widgets/BuildPaletteWidget.cs
+++ /dev/null
@@ -1,578 +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.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using OpenRA.Graphics;
-using OpenRA.Mods.Common.Orders;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Network;
-using OpenRA.Primitives;
-using OpenRA.Traits;
-using OpenRA.Widgets;
-
-namespace OpenRA.Mods.D2k.Widgets
-{
- [Desc("Classic BuildPaletteWidget. Needs ChooseBuildTabOnSelect trait to be added to world actor",
- "in order to make the build palette open automatically when a production facility is deployed.")]
- class BuildPaletteWidget : Widget
- {
- public enum ReadyTextStyleOptions { Solid, AlternatingColor, Blinking }
- public readonly ReadyTextStyleOptions ReadyTextStyle = ReadyTextStyleOptions.AlternatingColor;
- public readonly Color ReadyTextAltColor = Color.Gold;
- public int Columns = 3;
- public int Rows = 5;
-
- [Translate] public string ReadyText = "";
- [Translate] public string HoldText = "";
- [Translate] public string RequiresText = "";
-
- public int IconWidth = 64;
- public int IconHeight = 48;
-
- readonly WorldRenderer worldRenderer;
- readonly World world;
- readonly OrderManager orderManager;
-
- ProductionQueue currentQueue;
- List visibleQueues;
-
- bool paletteOpen = false;
-
- float2 paletteOpenOrigin;
- float2 paletteClosedOrigin;
- float2 paletteOrigin;
-
- int paletteAnimationLength = 7;
- int paletteAnimationFrame = 0;
- bool paletteAnimating = false;
-
- List>> buttons = new List>>();
- List>> tabs = new List>>();
- Animation cantBuild;
- Animation clock;
-
- [ObjectCreator.UseCtor]
- public BuildPaletteWidget(OrderManager orderManager, World world, WorldRenderer worldRenderer)
- {
- this.orderManager = orderManager;
- this.world = world;
- this.worldRenderer = worldRenderer;
-
- cantBuild = new Animation(world, "clock");
- cantBuild.PlayFetchIndex("idle", () => 0);
- clock = new Animation(world, "clock");
- visibleQueues = new List();
- currentQueue = null;
- }
-
- public override void Initialize(WidgetArgs args)
- {
- paletteOpenOrigin = new float2(Game.Renderer.Resolution.Width - Columns * IconWidth - 23, 280);
- paletteClosedOrigin = new float2(Game.Renderer.Resolution.Width - 16, 280);
- paletteOrigin = paletteClosedOrigin;
- base.Initialize(args);
- }
-
- public override Rectangle EventBounds
- {
- get { return new Rectangle((int)paletteOrigin.X - 24, (int)paletteOrigin.Y, 239, Math.Max(IconHeight * numActualRows, 40 * tabs.Count + 9)); }
- }
-
- public override void Tick()
- {
- visibleQueues.Clear();
-
- var queues = world.ActorsWithTrait()
- .Where(p => p.Actor.Owner == world.LocalPlayer)
- .Select(p => p.Trait);
-
- if (currentQueue != null && currentQueue.Actor.Destroyed)
- currentQueue = null;
-
- foreach (var queue in queues)
- {
- if (queue.AllItems().Any())
- visibleQueues.Add(queue);
- else if (currentQueue == queue)
- currentQueue = null;
- }
-
- if (currentQueue == null)
- currentQueue = visibleQueues.FirstOrDefault();
-
- TickPaletteAnimation(world);
- }
-
- void TickPaletteAnimation(World world)
- {
- if (!paletteAnimating)
- return;
-
- // Increment frame
- if (paletteOpen)
- paletteAnimationFrame++;
- else
- paletteAnimationFrame--;
-
- // Calculate palette position
- if (paletteAnimationFrame <= paletteAnimationLength)
- paletteOrigin = float2.Lerp(paletteClosedOrigin, paletteOpenOrigin, paletteAnimationFrame * 1.0f / paletteAnimationLength);
-
- // Play palette-open sound at the start of the activate anim (open)
- if (paletteAnimationFrame == 1 && paletteOpen)
- Sound.PlayNotification(world.Map.Rules, null, "Sounds", "BuildPaletteOpen", null);
-
- // Play palette-close sound at the start of the activate anim (close)
- if (paletteAnimationFrame == paletteAnimationLength + -1 && !paletteOpen)
- Sound.PlayNotification(world.Map.Rules, null, "Sounds", "BuildPaletteClose", null);
-
- // Animation is complete
- if ((paletteAnimationFrame == 0 && !paletteOpen)
- || (paletteAnimationFrame == paletteAnimationLength && paletteOpen))
- paletteAnimating = false;
- }
-
- public void SetCurrentTab(ProductionQueue queue)
- {
- if (!paletteOpen)
- paletteAnimating = true;
-
- paletteOpen = true;
- currentQueue = queue;
- }
-
- public override bool HandleKeyPress(KeyInput e)
- {
- if (e.Event == KeyInputEvent.Up)
- return false;
-
- var hotkey = Hotkey.FromKeyInput(e);
-
- if (hotkey == Game.Settings.Keys.NextProductionTabKey)
- return ChangeTab(false);
- else if (hotkey == Game.Settings.Keys.PreviousProductionTabKey)
- return ChangeTab(true);
-
- return DoBuildingHotkey(e, world);
- }
-
- public override bool HandleMouseInput(MouseInput mi)
- {
- if (mi.Event != MouseInputEvent.Scroll && mi.Event != MouseInputEvent.Down)
- return true;
-
- if (mi.Event == MouseInputEvent.Scroll && mi.ScrollDelta < 0)
- return ChangeTab(false);
-
- if (mi.Event == MouseInputEvent.Scroll && mi.ScrollDelta > 0)
- return ChangeTab(true);
-
- var action = tabs.Where(a => a.First.Contains(mi.Location))
- .Select(a => a.Second).FirstOrDefault();
- if (action == null && paletteOpen)
- action = buttons.Where(a => a.First.Contains(mi.Location))
- .Select(a => a.Second).FirstOrDefault();
-
- if (action == null)
- return false;
-
- action(mi);
- return true;
- }
-
- public override void Draw()
- {
- if (!IsVisible())
- return;
-
- // TODO: fix
- DrawPalette(currentQueue);
- DrawBuildTabs(world);
- }
-
- int numActualRows = 5;
- int DrawPalette(ProductionQueue queue)
- {
- buttons.Clear();
-
- var paletteCollection = "palette-" + world.LocalPlayer.Country.Race;
- var origin = new float2(paletteOrigin.X + 9, paletteOrigin.Y + 9);
- var iconOffset = 0.5f * new float2(IconWidth, IconHeight);
- var x = 0;
- var y = 0;
-
- if (queue != null)
- {
- var buildableItems = queue.BuildableItems().ToList();
- var allBuildables = queue.AllItems().OrderBy(a => a.Traits.Get().BuildPaletteOrder).ToList();
-
- var overlayBits = new List>();
- var textBits = new List>();
- numActualRows = Math.Max((allBuildables.Count + Columns - 1) / Columns, Rows);
-
- // Palette Background
- WidgetUtils.DrawRGBA(ChromeProvider.GetImage(paletteCollection, "top"), new float2(origin.X - 9, origin.Y - 9));
- for (var w = 0; w < numActualRows; w++)
- WidgetUtils.DrawRGBA(
- ChromeProvider.GetImage(paletteCollection, "bg-" + (w % 4)),
- new float2(origin.X - 9, origin.Y + IconHeight * w));
- WidgetUtils.DrawRGBA(ChromeProvider.GetImage(paletteCollection, "bottom"),
- new float2(origin.X - 9, origin.Y - 1 + IconHeight * numActualRows));
-
- // Icons
- string tooltipItem = null;
- var tooltipHotkey = Hotkey.Invalid;
- var i = 0;
- foreach (var item in allBuildables)
- {
- var rect = new RectangleF(origin.X + x * IconWidth, origin.Y + IconHeight * y, IconWidth, IconHeight);
- var drawPos = new float2(rect.Location);
- var icon = new Animation(world, RenderSimple.GetImage(item));
- icon.Play(item.Traits.Get().Icon);
- WidgetUtils.DrawSHPCentered(icon.Image, drawPos + iconOffset, worldRenderer);
-
- var firstOfThis = queue.AllQueued().FirstOrDefault(a => a.Item == item.Name);
-
- if (rect.Contains(Viewport.LastMousePos))
- {
- tooltipItem = item.Name;
- tooltipHotkey = Game.Settings.Keys.GetProductionHotkey(i);
- }
-
- var overlayPos = drawPos + new float2(32, 16);
-
- if (firstOfThis != null)
- {
- clock.PlayFetchIndex("idle",
- () => (firstOfThis.TotalTime - firstOfThis.RemainingTime)
- * (clock.CurrentSequence.Length - 1) / firstOfThis.TotalTime);
- clock.Tick();
- WidgetUtils.DrawSHPCentered(clock.Image, drawPos + iconOffset, worldRenderer);
-
- if (queue.CurrentItem() == firstOfThis)
- textBits.Add(Pair.New(overlayPos, GetOverlayForItem(firstOfThis)));
-
- var repeats = queue.AllQueued().Count(a => a.Item == item.Name);
- if (repeats > 1 || queue.CurrentItem() != firstOfThis)
- textBits.Add(Pair.New(overlayPos + new float2(-24, -14), repeats.ToString()));
- }
- else
- if (buildableItems.All(a => a.Name != item.Name))
- overlayBits.Add(Pair.New(cantBuild.Image, drawPos));
-
- var closureName = buildableItems.Any(a => a.Name == item.Name) ? item.Name : null;
- buttons.Add(Pair.New(new Rectangle((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height), HandleClick(closureName, world)));
-
- if (++x == Columns) { x = 0; y++; }
- i++;
- }
-
- if (x != 0)
- y++;
-
- foreach (var ob in overlayBits)
- WidgetUtils.DrawSHPCentered(ob.First, ob.Second + iconOffset, worldRenderer);
-
- var font = Game.Renderer.Fonts["TinyBold"];
- foreach (var tb in textBits)
- {
- var size = font.Measure(tb.Second);
- if (ReadyTextStyle == ReadyTextStyleOptions.Solid || orderManager.LocalFrameNumber / 9 % 2 == 0 || tb.Second != ReadyText)
- font.DrawTextWithContrast(tb.Second, tb.First - new float2(size.X / 2, 0),
- Color.White, Color.Black, 1);
- else if (ReadyTextStyle == ReadyTextStyleOptions.AlternatingColor)
- font.DrawTextWithContrast(tb.Second, tb.First - new float2(size.X / 2, 0),
- ReadyTextAltColor, Color.Black, 1);
- }
-
- // Tooltip
- if (tooltipItem != null && !paletteAnimating && paletteOpen)
- DrawProductionTooltip(world, tooltipItem, tooltipHotkey,
- new float2(Game.Renderer.Resolution.Width, origin.Y + numActualRows * IconHeight + 9).ToInt2());
- }
-
- // Palette Dock
- WidgetUtils.DrawRGBA(ChromeProvider.GetImage(paletteCollection, "dock-top"),
- new float2(Game.Renderer.Resolution.Width - 14, origin.Y - 23));
-
- for (var i = 0; i < numActualRows; i++)
- WidgetUtils.DrawRGBA(ChromeProvider.GetImage(paletteCollection, "dock-" + (i % 4)),
- new float2(Game.Renderer.Resolution.Width - 14, origin.Y + IconHeight * i));
-
- WidgetUtils.DrawRGBA(ChromeProvider.GetImage(paletteCollection, "dock-bottom"),
- new float2(Game.Renderer.Resolution.Width - 14, origin.Y - 1 + IconHeight * numActualRows));
-
- return IconHeight * y + 9;
- }
-
- string GetOverlayForItem(ProductionItem item)
- {
- if (item.Paused)
- return HoldText;
-
- if (item.Done)
- return ReadyText;
-
- return WidgetUtils.FormatTime(item.RemainingTimeActual);
- }
-
- Action HandleClick(string name, World world)
- {
- return mi =>
- {
- Sound.PlayNotification(world.Map.Rules, null, "Sounds", "TabClick", null);
-
- if (name != null)
- HandleBuildPalette(world, name, mi.Button == MouseButton.Left);
- };
- }
-
- Action HandleTabClick(ProductionQueue queue, World world)
- {
- return mi =>
- {
- if (mi.Button != MouseButton.Left)
- return;
-
- Sound.PlayNotification(world.Map.Rules, null, "Sounds", "TabClick", null);
- var wasOpen = paletteOpen;
- paletteOpen = currentQueue != queue || !wasOpen;
- currentQueue = queue;
- if (wasOpen != paletteOpen)
- paletteAnimating = true;
- };
- }
-
- static string Description(Ruleset rules, string a)
- {
- ActorInfo ai;
- rules.Actors.TryGetValue(a.ToLowerInvariant(), out ai);
- if (ai != null && ai.Traits.Contains())
- return ai.Traits.Get().Name;
-
- return a;
- }
-
- void HandleBuildPalette(World world, string item, bool isLmb)
- {
- var unit = world.Map.Rules.Actors[item];
- var producing = currentQueue.AllQueued().FirstOrDefault(a => a.Item == item);
-
- if (isLmb)
- {
- if (producing != null && producing == currentQueue.CurrentItem())
- {
- if (producing.Done)
- {
- if (unit.Traits.Contains())
- world.OrderGenerator = new PlaceBuildingOrderGenerator(currentQueue, item);
- else
- StartProduction(world, item);
- return;
- }
-
- if (producing.Paused)
- {
- world.IssueOrder(Order.PauseProduction(currentQueue.Actor, item, false));
- return;
- }
- }
- else
- {
- // Check if the item's build-limit has already been reached
- var queued = currentQueue.AllQueued().Count(a => a.Item == unit.Name);
- var inWorld = world.ActorsWithTrait().Count(a => a.Actor.Info.Name == unit.Name && a.Actor.Owner == world.LocalPlayer);
- var buildLimit = unit.Traits.Get().BuildLimit;
-
- if (!((buildLimit != 0) && (inWorld + queued >= buildLimit)))
- Sound.PlayNotification(world.Map.Rules, world.LocalPlayer, "Speech", currentQueue.Info.QueuedAudio, world.LocalPlayer.Country.Race);
- else
- Sound.PlayNotification(world.Map.Rules, world.LocalPlayer, "Speech", currentQueue.Info.BlockedAudio, world.LocalPlayer.Country.Race);
- }
-
- StartProduction(world, item);
- }
- else
- {
- if (producing != null)
- {
- // instant cancel of things we havent really started yet, and things that are finished
- if (producing.Paused || producing.Done || producing.TotalCost == producing.RemainingCost)
- {
- Sound.PlayNotification(world.Map.Rules, world.LocalPlayer, "Speech", currentQueue.Info.CancelledAudio, world.LocalPlayer.Country.Race);
- var numberToCancel = Game.GetModifierKeys().HasModifier(Modifiers.Shift) ? 5 : 1;
-
- world.IssueOrder(Order.CancelProduction(currentQueue.Actor, item, numberToCancel));
- }
- else
- {
- Sound.PlayNotification(world.Map.Rules, world.LocalPlayer, "Speech", currentQueue.Info.OnHoldAudio, world.LocalPlayer.Country.Race);
- world.IssueOrder(Order.PauseProduction(currentQueue.Actor, item, true));
- }
- }
- }
- }
-
- void StartProduction(World world, string item)
- {
- world.IssueOrder(Order.StartProduction(currentQueue.Actor, item,
- Game.GetModifierKeys().HasModifier(Modifiers.Shift) ? 5 : 1));
- }
-
- void DrawBuildTabs(World world)
- {
- const int TabWidth = 24;
- const int TabHeight = 40;
- var x = paletteOrigin.X - TabWidth;
- var y = paletteOrigin.Y + 9;
-
- tabs.Clear();
-
- foreach (var queue in visibleQueues)
- {
- string[] tabKeys = { "normal", "ready", "selected" };
- var producing = queue.CurrentItem();
- var index = queue == currentQueue ? 2 : (producing != null && producing.Done) ? 1 : 0;
-
- var race = world.LocalPlayer.Country.Race;
- WidgetUtils.DrawRGBA(ChromeProvider.GetImage("tabs-" + tabKeys[index], race + "-" + queue.Info.Type), new float2(x, y));
-
- var rect = new Rectangle((int)x, (int)y, TabWidth, TabHeight);
- tabs.Add(Pair.New(rect, HandleTabClick(queue, world)));
-
- if (rect.Contains(Viewport.LastMousePos))
- {
- var text = queue.Info.Type;
- var font = Game.Renderer.Fonts["Bold"];
- var sz = font.Measure(text);
- WidgetUtils.DrawPanelPartial("dialog4",
- Rectangle.FromLTRB(rect.Left - sz.X - 30, rect.Top, rect.Left - 5, rect.Bottom),
- PanelSides.All);
-
- font.DrawText(text, new float2(rect.Left - sz.X - 20, rect.Top + 12), Color.White);
- }
-
- y += TabHeight;
- }
- }
-
- static void DrawRightAligned(string text, int2 pos, Color c)
- {
- var font = Game.Renderer.Fonts["Bold"];
- font.DrawText(text, pos - new int2(font.Measure(text).X, 0), c);
- }
-
- void DrawProductionTooltip(World world, string unit, Hotkey hotkey, int2 pos)
- {
- pos.Y += 15;
-
- var pl = world.LocalPlayer;
- var p = pos.ToFloat2() - new float2(297, -3);
-
- var info = world.Map.Rules.Actors[unit];
- var tooltip = info.Traits.Get();
- var buildable = info.Traits.Get();
- var cost = info.Traits.Get().Cost;
- var canBuildThis = currentQueue.CanBuild(info);
-
- var longDescSize = Game.Renderer.Fonts["Regular"].Measure(tooltip.Description.Replace("\\n", "\n")).Y;
- if (!canBuildThis) longDescSize += 8;
-
- WidgetUtils.DrawPanel("dialog4", new Rectangle(Game.Renderer.Resolution.Width - 300, pos.Y, 300, longDescSize + 65));
-
- Game.Renderer.Fonts["Bold"].DrawText(
- tooltip.Name + (hotkey.IsValid() ? " ({0})".F(hotkey.DisplayString()) : ""),
- p.ToInt2() + new int2(5, 5), Color.White);
-
- var resources = pl.PlayerActor.Trait();
- var power = pl.PlayerActor.Trait();
-
- DrawRightAligned("${0}".F(cost), pos + new int2(-5, 5),
- resources.DisplayCash + resources.DisplayResources >= cost ? Color.White : Color.Red);
-
- var lowpower = power.PowerState != PowerState.Normal;
- var time = currentQueue.GetBuildTime(info.Name)
- * (lowpower ? currentQueue.Info.LowPowerSlowdown : 1);
- DrawRightAligned(WidgetUtils.FormatTime(time), pos + new int2(-5, 35), lowpower ? Color.Red : Color.White);
-
- var pis = info.Traits.WithInterface().Where(i => i.UpgradeMinEnabledLevel < 1);
- var amount = pis.Sum(i => i.Amount);
- if (pis != null)
- DrawRightAligned("{1}{0}".F(amount, amount > 0 ? "+" : ""), pos + new int2(-5, 20),
- ((power.PowerProvided - power.PowerDrained) >= -amount || amount > 0) ? Color.White : Color.Red);
-
- p += new int2(5, 35);
- if (!canBuildThis)
- {
- var prereqs = buildable.Prerequisites.Select(s => Description(world.Map.Rules, s)).Where(s => !s.StartsWith("~"));
- if (prereqs.Any())
- {
- Game.Renderer.Fonts["Regular"].DrawText(RequiresText.F(prereqs.JoinWith(", ")), p.ToInt2(), Color.White);
-
- p += new int2(0, 8);
- }
- }
-
- p += new int2(0, 15);
- Game.Renderer.Fonts["Regular"].DrawText(tooltip.Description.Replace("\\n", "\n"),
- p.ToInt2(), Color.White);
- }
-
- bool DoBuildingHotkey(KeyInput e, World world)
- {
- if (!paletteOpen) return false;
- if (currentQueue == null) return false;
-
- var key = Hotkey.FromKeyInput(e);
- var ks = Game.Settings.Keys;
- var slot = -1;
- for (var i = 0; i < 24; i++)
- {
- if (ks.GetProductionHotkey(i) == key)
- {
- slot = i;
- break;
- }
- }
-
- var allBuildables = currentQueue.AllItems().OrderBy(a => a.Traits.Get().BuildPaletteOrder).ToArray();
- var toBuild = allBuildables.ElementAtOrDefault(slot);
- if (toBuild != null)
- {
- Sound.PlayNotification(world.Map.Rules, null, "Sounds", "TabClick", null);
- HandleBuildPalette(world, toBuild.Name, true);
- return true;
- }
-
- return false;
- }
-
- // NOTE: Always return true here to prevent mouse events from passing through the sidebar and interacting with the world behind it.
- bool ChangeTab(bool reverse)
- {
- Sound.PlayNotification(world.Map.Rules, null, "Sounds", "TabClick", null);
- var queues = visibleQueues.Concat(visibleQueues);
- if (reverse)
- queues = queues.Reverse();
- var nextQueue = queues.SkipWhile(q => q != currentQueue)
- .ElementAtOrDefault(1);
- if (nextQueue != null)
- {
- SetCurrentTab(nextQueue);
- return true;
- }
-
- return true;
- }
- }
-}
diff --git a/OpenRA.Mods.D2k/Widgets/Logic/SlidingRadarBinLogic.cs b/OpenRA.Mods.D2k/Widgets/Logic/SlidingRadarBinLogic.cs
deleted file mode 100644
index 44449c709a..0000000000
--- a/OpenRA.Mods.D2k/Widgets/Logic/SlidingRadarBinLogic.cs
+++ /dev/null
@@ -1,60 +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.Traits;
-using OpenRA.Mods.Common.Widgets;
-using OpenRA.Mods.D2k.Widgets;
-using OpenRA.Mods.RA;
-using OpenRA.Mods.RA.Widgets;
-using OpenRA.Mods.RA.Widgets.Logic;
-using OpenRA.Traits;
-using OpenRA.Widgets;
-
-namespace OpenRA.Mods.D2k.Widgets.Logic
-{
- public class SlidingRadarBinLogic
- {
- enum RadarBinState { Closed, BinAnimating, RadarAnimating, Open }
-
- [ObjectCreator.UseCtor]
- public SlidingRadarBinLogic(Widget widget, World world)
- {
- var radarActive = false;
- var binState = RadarBinState.Closed;
- var radarBin = widget.Get("INGAME_RADAR_BIN");
- radarBin.IsOpen = () => radarActive || binState > RadarBinState.BinAnimating;
- radarBin.AfterOpen = () => binState = RadarBinState.RadarAnimating;
- radarBin.AfterClose = () => binState = RadarBinState.Closed;
-
- var radarMap = radarBin.Get("RADAR_MINIMAP");
- radarMap.IsEnabled = () => radarActive && binState >= RadarBinState.RadarAnimating;
- radarMap.AfterOpen = () => binState = RadarBinState.Open;
- radarMap.AfterClose = () => binState = RadarBinState.BinAnimating;
-
- radarBin.Get("RADAR_BIN_BG").GetImageCollection = () => "chrome-" + world.LocalPlayer.Country.Race;
-
- var cachedRadarActive = false;
- var radarTicker = widget.Get("RADAR_TICKER");
- radarTicker.OnTick = () =>
- {
- // Update radar bin
- radarActive = world.ActorsWithTrait()
- .Any(a => a.Actor.Owner == world.LocalPlayer && a.Trait.IsActive);
-
- if (radarActive != cachedRadarActive)
- Sound.PlayNotification(world.Map.Rules, null, "Sounds", radarActive ? "RadarUp" : "RadarDown", null);
- cachedRadarActive = radarActive;
- };
- }
- }
-}
diff --git a/OpenRA.Mods.D2k/Widgets/MoneyBinWidget.cs b/OpenRA.Mods.D2k/Widgets/MoneyBinWidget.cs
deleted file mode 100644
index 1d08e73bf5..0000000000
--- a/OpenRA.Mods.D2k/Widgets/MoneyBinWidget.cs
+++ /dev/null
@@ -1,61 +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.Linq;
-using OpenRA.Graphics;
-using OpenRA.Traits;
-using OpenRA.Widgets;
-
-namespace OpenRA.Mods.D2k.Widgets
-{
- class MoneyBinWidget : Widget
- {
- readonly World world;
- readonly PlayerResources playerResources;
-
- [ObjectCreator.UseCtor]
- public MoneyBinWidget(World world)
- {
- this.world = world;
- playerResources = world.LocalPlayer.PlayerActor.Trait();
- }
-
- public override void Draw()
- {
- if (world.LocalPlayer == null)
- return;
-
- if (world.LocalPlayer.WinState != WinState.Undefined)
- return;
-
- var digitCollection = "digits-" + world.LocalPlayer.Country.Race;
- var chromeCollection = "chrome-" + world.LocalPlayer.Country.Race;
-
- var spriteMoneyBin = ChromeProvider.GetImage(chromeCollection, "moneybin");
-
- if (spriteMoneyBin != null)
- Game.Renderer.RgbaSpriteRenderer.DrawSprite(spriteMoneyBin, new float2(Bounds.Left, 0));
-
- // Cash
- var cashDigits = (playerResources.DisplayCash + playerResources.DisplayResources).ToString();
- var x = Bounds.Right - 65;
-
- foreach (var d in cashDigits.Reverse())
- {
- var spriteDigit = ChromeProvider.GetImage(digitCollection, (d - '0').ToString());
-
- if (spriteDigit != null)
- Game.Renderer.RgbaSpriteRenderer.DrawSprite(spriteDigit, new float2(x, 6));
-
- x -= 14;
- }
- }
- }
-}
diff --git a/OpenRA.Mods.D2k/Widgets/SlidingContainerWidget.cs b/OpenRA.Mods.D2k/Widgets/SlidingContainerWidget.cs
deleted file mode 100644
index 9c59747bde..0000000000
--- a/OpenRA.Mods.D2k/Widgets/SlidingContainerWidget.cs
+++ /dev/null
@@ -1,62 +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 OpenRA.Widgets;
-
-namespace OpenRA.Mods.D2k.Widgets
-{
- public class SlidingContainerWidget : Widget
- {
- public int2 OpenOffset = int2.Zero;
- public int2 ClosedOffset = int2.Zero;
- public int AnimationLength = 0;
- public Func IsOpen = () => false;
- public Action AfterOpen = () => { };
- public Action AfterClose = () => { };
-
- int2 offset;
- int frame;
-
- public override void Initialize(WidgetArgs args)
- {
- base.Initialize(args);
-
- // Start in the closed position
- offset = ClosedOffset;
- }
-
- public override void Tick()
- {
- var open = IsOpen();
-
- var targetFrame = open ? AnimationLength : 0;
- if (frame == targetFrame)
- return;
-
- // Update child origin
- frame += open ? 1 : -1;
- offset = int2.Lerp(ClosedOffset, OpenOffset, frame, AnimationLength);
-
- // Animation is complete
- if (frame == targetFrame)
- {
- if (open)
- AfterOpen();
- else
- AfterClose();
- }
- }
-
- public override Rectangle EventBounds { get { return Rectangle.Empty; } }
- public override int2 ChildOrigin { get { return RenderOrigin + offset; } }
- }
-}
diff --git a/OpenRA.Mods.D2k/Widgets/SupportPowerBinWidget.cs b/OpenRA.Mods.D2k/Widgets/SupportPowerBinWidget.cs
deleted file mode 100644
index d94454db27..0000000000
--- a/OpenRA.Mods.D2k/Widgets/SupportPowerBinWidget.cs
+++ /dev/null
@@ -1,184 +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.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using OpenRA.Graphics;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Primitives;
-using OpenRA.Widgets;
-
-namespace OpenRA.Mods.D2k.Widgets
-{
- class SupportPowerBinWidget : Widget
- {
- [Translate] public string ReadyText = "";
- [Translate] public string HoldText = "";
-
- public int IconWidth = 64;
- public int IconHeight = 48;
-
- readonly List>> buttons = new List>>();
-
- readonly World world;
- readonly WorldRenderer worldRenderer;
-
- Animation icon;
- Animation clock;
-
- [ObjectCreator.UseCtor]
- public SupportPowerBinWidget(World world, WorldRenderer worldRenderer)
- {
- this.world = world;
- this.worldRenderer = worldRenderer;
- }
-
- public override void Initialize(WidgetArgs args)
- {
- base.Initialize(args);
-
- icon = new Animation(world, "icon");
- clock = new Animation(world, "clock");
- }
-
- public override Rectangle EventBounds
- {
- get { return buttons.Any() ? buttons.Select(b => b.First).Aggregate(Rectangle.Union) : Bounds; }
- }
-
- public override bool HandleMouseInput(MouseInput mi)
- {
- if (mi.Event == MouseInputEvent.Down)
- {
- var action = buttons.Where(a => a.First.Contains(mi.Location))
- .Select(a => a.Second).FirstOrDefault();
- if (action == null)
- return false;
-
- action(mi);
- return true;
- }
-
- return false;
- }
-
- public override void Draw()
- {
- buttons.Clear();
-
- if (world.LocalPlayer == null)
- return;
-
- var manager = world.LocalPlayer.PlayerActor.Trait();
- var powers = manager.Powers.Where(p => !p.Value.Disabled);
- var numPowers = powers.Count();
- if (numPowers == 0) return;
-
- var rectBounds = RenderBounds;
- WidgetUtils.DrawRGBA(WidgetUtils.GetChromeImage(world, "specialbin-top"), new float2(rectBounds.X, rectBounds.Y));
- for (var i = 1; i < numPowers; i++)
- WidgetUtils.DrawRGBA(WidgetUtils.GetChromeImage(world, "specialbin-middle"), new float2(rectBounds.X, rectBounds.Y + i * 51));
- WidgetUtils.DrawRGBA(WidgetUtils.GetChromeImage(world, "specialbin-bottom"), new float2(rectBounds.X, rectBounds.Y + numPowers * 51));
-
- // HACK: Hack Hack Hack
- rectBounds.Width = IconWidth + 5;
- rectBounds.Height = 31 + numPowers * (IconHeight + 3);
-
- var y = rectBounds.Y + 10;
- var iconSize = new float2(IconWidth, IconHeight);
- foreach (var kv in powers)
- {
- var sp = kv.Value;
- icon.Play(sp.Info.Icon);
-
- var drawPos = new float2(rectBounds.X + 5, y);
- var rect = new Rectangle(rectBounds.X + 5, y, 64, 48);
-
- if (rect.Contains(Viewport.LastMousePos))
- {
- var pos = drawPos.ToInt2();
- var tl = new int2(pos.X - 3, pos.Y - 3);
- var m = new int2(pos.X + 64 + 3, pos.Y + 48 + 3);
- var br = tl + new int2(64 + 3 + 20, 40);
-
- if (sp.TotalTime > 0)
- br += new int2(0, 20);
-
- if (sp.Info.LongDesc != null)
- br += Game.Renderer.Fonts["Regular"].Measure(sp.Info.LongDesc.Replace("\\n", "\n"));
- else
- br += new int2(300, 0);
-
- var border = WidgetUtils.GetBorderSizes("dialog4");
-
- WidgetUtils.DrawPanelPartial("dialog4", Rectangle.FromLTRB(tl.X, tl.Y, m.X + border[3], m.Y),
- PanelSides.Left | PanelSides.Top | PanelSides.Bottom | PanelSides.Center);
- WidgetUtils.DrawPanelPartial("dialog4", Rectangle.FromLTRB(m.X - border[2], tl.Y, br.X, m.Y + border[1]),
- PanelSides.Top | PanelSides.Right | PanelSides.Center);
- WidgetUtils.DrawPanelPartial("dialog4", Rectangle.FromLTRB(m.X, m.Y - border[1], br.X, br.Y),
- PanelSides.Left | PanelSides.Right | PanelSides.Bottom | PanelSides.Center);
-
- pos += new int2(77, 5);
- Game.Renderer.Fonts["Bold"].DrawText(sp.Info.Description, pos, Color.White);
-
- if (sp.TotalTime > 0)
- {
- pos += new int2(0, 20);
- Game.Renderer.Fonts["Bold"].DrawText(WidgetUtils.FormatTime(sp.RemainingTime), pos, Color.White);
- Game.Renderer.Fonts["Bold"].DrawText("/ {0}".F(WidgetUtils.FormatTime(sp.TotalTime)), pos + new int2(45, 0), Color.White);
- }
-
- if (sp.Info.LongDesc != null)
- {
- pos += new int2(0, 20);
- Game.Renderer.Fonts["Regular"].DrawText(sp.Info.LongDesc.Replace("\\n", "\n"), pos, Color.White);
- }
- }
-
- WidgetUtils.DrawSHPCentered(icon.Image, drawPos + 0.5f * iconSize, worldRenderer);
-
- clock.PlayFetchIndex("idle",
- () => sp.TotalTime == 0 ? clock.CurrentSequence.Length - 1 : (sp.TotalTime - sp.RemainingTime)
- * (clock.CurrentSequence.Length - 1) / sp.TotalTime);
- clock.Tick();
-
- WidgetUtils.DrawSHPCentered(clock.Image, drawPos + 0.5f * iconSize, worldRenderer);
-
- var overlay = sp.Ready ? ReadyText : sp.Active ? null : HoldText;
- var font = Game.Renderer.Fonts["TinyBold"];
- if (overlay != null)
- {
- var size = font.Measure(overlay);
- var overlayPos = drawPos + new float2(32, 16);
- font.DrawTextWithContrast(overlay, overlayPos - new float2(size.X / 2, 0), Color.White, Color.Black, 1);
- }
-
- buttons.Add(Pair.New(rect, HandleSupportPower(kv.Key, manager)));
-
- y += 51;
- }
- }
-
- static Action HandleSupportPower(string key, SupportPowerManager manager)
- {
- return mi =>
- {
- if (mi.Button == MouseButton.Left)
- {
- if (!manager.Powers[key].Active)
- Sound.PlayToPlayer(manager.Self.Owner, manager.Powers[key].Info.InsufficientPowerSound);
- manager.Target(key);
- }
- };
- }
- }
-}
\ No newline at end of file
diff --git a/mods/ts/chrome.yaml b/mods/ts/chrome.yaml
index 90e8d08e2c..4f08919a6a 100644
--- a/mods/ts/chrome.yaml
+++ b/mods/ts/chrome.yaml
@@ -1,115 +1,393 @@
-chrome-gdi: chrome-gdi.png
- specialbin-top: 0,0,30,51
- specialbin-middle: 0,51,30,51
- specialbin-bottom: 0,153,30,39
- moneybin: 192,0,320,32
- tooltip-bg: 0,288,272,136
- radar: 297,31,210,222
+sidebar-gdi: chrome.png
+ background-top: 0,167,238,290
+ background-iconrow: 0,457,238,47
+ background-bottom: 0,504,238,8
+ background-supportoverlay: 184,118,64,48
-sidebar-bits: chrome-gdi.png
- power-indicator: 187,4,4,7
+sidebar-button-gdi: chrome.png
+ background: 59,31,22,22
+ border-r: 81,31,3,22
+ border-l: 56,31,3,22
+ border-b: 59,53,22,3
+ border-t: 59,28,22,3
+ corner-tl: 56,28,3,3
+ corner-tr: 81,28,3,3
+ corner-bl: 56,53,3,3
+ corner-br: 81,53,3,3
+sidebar-button-gdi-hover: chrome.png
+ background: 59,3,22,22
+ border-r: 81,3,3,22
+ border-l: 56,3,3,22
+ border-b: 59,25,22,3
+ border-t: 59,0,22,3
+ corner-tl: 56,0,3,3
+ corner-tr: 81,0,3,3
+ corner-bl: 56,25,3,3
+ corner-br: 81,25,3,3
+sidebar-button-gdi-pressed: chrome.png
+ background: 59,31,22,22
+ border-r: 81,31,3,22
+ border-l: 56,31,3,22
+ border-b: 59,53,22,3
+ border-t: 59,28,22,3
+ corner-tl: 56,28,3,3
+ corner-tr: 81,28,3,3
+ corner-bl: 56,53,3,3
+ corner-br: 81,53,3,3
+sidebar-button-gdi-highlighted: chrome.png
+ background: 87,31,22,22
+ border-r: 109,31,3,22
+ border-l: 84,31,3,22
+ border-b: 87,53,22,3
+ border-t: 87,28,22,3
+ corner-tl: 84,28,3,3
+ corner-tr: 109,28,3,3
+ corner-bl: 84,53,3,3
+ corner-br: 109,53,3,3
+sidebar-button-gdi-highlighted-hover: chrome.png
+ background: 87,3,22,22
+ border-r: 109,3,3,22
+ border-l: 84,3,3,22
+ border-b: 87,25,22,3
+ border-t: 87,0,22,3
+ corner-tl: 84,0,3,3
+ corner-tr: 109,0,3,3
+ corner-bl: 84,25,3,3
+ corner-br: 109,25,3,3
+sidebar-button-gdi-highlighted-pressed: chrome.png
+ background: 87,31,22,22
+ border-r: 109,31,3,22
+ border-l: 84,31,3,22
+ border-b: 87,53,22,3
+ border-t: 87,28,22,3
+ corner-tl: 84,28,3,3
+ corner-tr: 109,28,3,3
+ corner-bl: 84,53,3,3
+ corner-br: 109,53,3,3
+sidebar-button-gdi-disabled: chrome.png
+ background: 171,3,22,22
+ border-r: 193,3,3,22
+ border-l: 168,3,3,22
+ border-b: 171,25,22,3
+ border-t: 171,0,22,3
+ corner-tl: 168,0,3,3
+ corner-tr: 193,0,3,3
+ corner-bl: 168,25,3,3
+ corner-br: 193,25,3,3
+sidebar-button-gdi-highlighted-disabled: chrome.png
+ background: 171,3,22,22
+ border-r: 193,3,3,22
+ border-l: 168,3,3,22
+ border-b: 171,25,22,3
+ border-t: 171,0,22,3
+ corner-tl: 168,0,3,3
+ corner-tr: 193,0,3,3
+ corner-bl: 168,25,3,3
+ corner-br: 193,25,3,3
-palette-gdi: chrome-gdi.png
- top: 297,288,201,9
- dock-top: 498,274,14,23
- bottom: 297,489,201,9
- dock-bottom: 498,489,14,23
- bg-0: 297,297,201,48
- dock-0: 498,297,14,48
- bg-1: 297,345,201,48
- dock-1: 498,345,14,48
- bg-2: 297,393,201,48
- dock-2: 498,393,14,48
- bg-3: 297,441,201,48
- dock-3: 498,441,14,48
+sidebar-nod: chrome.png
+ background-top: 274,167,238,290
+ background-iconrow: 274,457,238,47
+ background-bottom: 274,504,238,8
+ background-supportoverlay: 249,118,64,48
-digits-gdi: chrome-gdi.png
- 0: 32,0,13,17
- 1: 45,0,13,17
- 2: 58,0,13,17
- 3: 71,0,13,17
- 4: 84,0,13,17
- 5: 97,0,13,17
- 6: 110,0,13,17
- 7: 123,0,13,17
- 8: 136,0,13,17
- 9: 149,0,13,17
+sidebar-button-nod: chrome.png
+ background: 3,31,22,22
+ border-r: 25,31,3,22
+ border-l: 0,31,3,22
+ border-b: 3,53,22,3
+ border-t: 3,28,22,3
+ corner-tl: 0,28,3,3
+ corner-tr: 25,28,3,3
+ corner-bl: 0,53,3,3
+ corner-br: 25,53,3,3
+sidebar-button-nod-hover: chrome.png
+ background: 3,3,22,22
+ border-r: 25,3,3,22
+ border-l: 0,3,3,22
+ border-b: 3,25,22,3
+ border-t: 3,0,22,3
+ corner-tl: 0,0,3,3
+ corner-tr: 25,0,3,3
+ corner-bl: 0,25,3,3
+ corner-br: 25,25,3,3
+sidebar-button-nod-pressed: chrome.png
+ background: 3,31,22,22
+ border-r: 25,31,3,22
+ border-l: 0,31,3,22
+ border-b: 3,53,22,3
+ border-t: 3,28,22,3
+ corner-tl: 0,28,3,3
+ corner-tr: 25,28,3,3
+ corner-bl: 0,53,3,3
+ corner-br: 25,53,3,3
+sidebar-button-nod-highlighted: chrome.png
+ background: 31,31,22,22
+ border-r: 53,31,3,22
+ border-l: 28,31,3,22
+ border-b: 31,53,22,3
+ border-t: 31,28,22,3
+ corner-tl: 28,28,3,3
+ corner-tr: 53,28,3,3
+ corner-bl: 28,53,3,3
+ corner-br: 53,53,3,3
+sidebar-button-nod-highlighted-hover: chrome.png
+ background: 31,3,22,22
+ border-r: 53,3,3,22
+ border-l: 28,3,3,22
+ border-b: 31,25,22,3
+ border-t: 31,0,22,3
+ corner-tl: 28,0,3,3
+ corner-tr: 53,0,3,3
+ corner-bl: 28,25,3,3
+ corner-br: 53,25,3,3
+sidebar-button-nod-highlighted-pressed: chrome.png
+ background: 31,31,22,22
+ border-r: 53,31,3,22
+ border-l: 28,31,3,22
+ border-b: 31,53,22,3
+ border-t: 31,28,22,3
+ corner-tl: 28,28,3,3
+ corner-tr: 53,28,3,3
+ corner-bl: 28,53,3,3
+ corner-br: 53,53,3,3
+sidebar-button-nod-disabled: chrome.png
+ background: 171,3,22,22
+ border-r: 193,3,3,22
+ border-l: 168,3,3,22
+ border-b: 171,25,22,3
+ border-t: 171,0,22,3
+ corner-tl: 168,0,3,3
+ corner-tr: 193,0,3,3
+ corner-bl: 168,25,3,3
+ corner-br: 193,25,3,3
+sidebar-button-nod-highlighted-disabled: chrome.png
+ background: 171,3,22,22
+ border-r: 193,3,3,22
+ border-l: 168,3,3,22
+ border-b: 171,25,22,3
+ border-t: 171,0,22,3
+ corner-tl: 168,0,3,3
+ corner-tr: 193,0,3,3
+ corner-bl: 168,25,3,3
+ corner-br: 193,25,3,3
-chrome-nod: chrome-nod.png
- specialbin-top: 0,0,30,51
- specialbin-middle: 0,51,30,51
- specialbin-bottom: 0,153,30,39
- moneybin: 192,0,320,32
- tooltip-bg: 0,288,272,136
- radar: 297,31,210,222
+sidebar-bits: chrome.png
+ production-tooltip-time: 416, 80, 16, 16
+ production-tooltip-power: 432, 80, 16, 16
+ production-tooltip-cost: 448, 80, 16, 16
+ production-iconoverlay: 314,118,238,48
-palette-nod: chrome-nod.png
- top: 297,288,201,9
- dock-top: 498,274,14,23
- bottom: 297,489,201,9
- dock-bottom: 498,489,14,23
- bg-0: 297,297,201,48
- dock-0: 498,297,14,48
- bg-1: 297,345,201,48
- dock-1: 498,345,14,48
- bg-2: 297,393,201,48
- dock-2: 498,393,14,48
- bg-3: 297,441,201,48
- dock-3: 498,441,14,48
+power-icons: chrome.png
+ power-normal: 350,0,12,18
+ power-critical: 363,0,12,18
-digits-nod: chrome-nod.png
- 0: 32,0,13,17
- 1: 45,0,13,17
- 2: 58,0,13,17
- 3: 71,0,13,17
- 4: 84,0,13,17
- 5: 97,0,13,17
- 6: 110,0,13,17
- 7: 123,0,13,17
- 8: 136,0,13,17
- 9: 149,0,13,17
+production-icons: chrome.png
+ building: 384,0,16,16
+ building-disabled: 384,16,16,16
+ building-alert: 384,32,16,16
+ defense: 400,0,16,16
+ defense-disabled: 400,16,16,16
+ defense-alert: 400,32,16,16
+ infantry: 416,0,16,16
+ infantry-disabled: 416,16,16,16
+ infantry-alert: 416,32,16,16
+ vehicle: 432,0,16,16
+ vehicle-disabled: 432,16,16,16
+ vehicle-alert: 432,32,16,16
+ air: 448,0,16,16
+ air-disabled: 448,16,16,16
+ air-alert: 448,32,16,16
-tabs-selected: tabs.png
- gdi-Building: 0,0,27,41
- gdi-Defense: 0,40,27,41
- gdi-Infantry: 0,80,27,41
- gdi-Vehicle: 0,120,27,41
- gdi-Air: 0,160,27,41
- gdi-Ship: 0,200,27,41
- nod-Building: 80,0,27,41
- nod-Defense: 80,40,27,41
- nod-Infantry: 80,80,27,41
- nod-Vehicle: 80,120,27,41
- nod-Air: 80,160,27,41
- nod-Ship: 80,200,27,41
+order-icons: chrome.png
+ options: 480,0,16,16
+ options-disabled: 480,16,16,16
+ options-active: 480,32,16,16
+ diplomacy: 464,48,16,16
+ diplomacy-disabled: 464,64,16,16
+ diplomacy-active: 464,80,16,16
+ sell: 496,0,16,16
+ sell-disabled: 496,16,16,16
+ sell-active: 496,32,16,16
+ repair: 384,48,16,16
+ repair-disabled: 384,64,16,16
+ repair-active: 384,80,16,16
+ beacon: 400,48,16,16
+ beacon-disabled: 400,64,16,16
+ beacon-active: 400,80,16,16
+ power: 480,48,16,16
+ power-disabled: 480,64,16,16
+ power-active: 480,80,16,16
+ stats: 368,48,16,16
+ stats-disabled: 368,64,16,16
+ stats-active: 368,80,16,16
-tabs-ready: tabs.png
- gdi-Building: 27,0,27,41
- gdi-Defense: 27,40,27,41
- gdi-Infantry: 27,80,27,41
- gdi-Vehicle: 27,120,27,41
- gdi-Air: 27,160,27,41
- gdi-Ship: 27,200,27,41
- nod-Building: 107,0,27,41
- nod-Defense: 107,40,27,41
- nod-Infantry: 107,80,27,41
- nod-Vehicle: 107,120,27,41
- nod-Air: 107,160,27,41
- nod-Ship: 107,200,27,41
+sidebar-observer: chrome.png
+ background: 512,167,238,287
+ replay-bottom: 512,454,238,40
+ observer-bottom: 512,495,238,8
-tabs-normal: tabs.png
- gdi-Building: 54,0,27,41
- gdi-Defense: 54,40,27,41
- gdi-Infantry: 54,80,27,41
- gdi-Vehicle: 54,120,27,41
- gdi-Air: 54,160,27,41
- gdi-Ship: 54,200,27,41
- nod-Building: 134,0,27,41
- nod-Defense: 134,40,27,41
- nod-Infantry: 134,80,27,41
- nod-Vehicle: 134,120,27,41
- nod-Air: 134,160,27,41
- nod-Ship: 134,200,27,41
+sidebar-button-observershroud: chrome.png
+sidebar-button-observershroud-pressed: chrome.png
+sidebar-button-observershroud-hover: chrome.png
+
+sidebar-button-observer: chrome.png
+ background: 117,33,18,18
+ border-r: 135,33,5,18
+ border-l: 112,33,5,18
+ border-b: 117,51,18,5
+ border-t: 117,28,18,5
+ corner-tl: 112,28,5,5
+ corner-tr: 135,28,5,5
+ corner-bl: 112,51,5,5
+ corner-br: 135,51,5,5
+sidebar-button-observer-hover: chrome.png
+ background: 117,5,18,18
+ border-r: 135,5,5,18
+ border-l: 112,5,5,18
+ border-b: 117,23,18,5
+ border-t: 117,0,18,5
+ corner-tl: 112,0,5,5
+ corner-tr: 135,0,5,5
+ corner-bl: 112,23,5,5
+ corner-br: 135,23,5,5
+sidebar-button-observer-pressed: chrome.png
+ background: 117,33,18,18
+ border-r: 135,33,5,18
+ border-l: 112,33,5,18
+ border-b: 117,51,18,5
+ border-t: 117,28,18,5
+ corner-tl: 112,28,5,5
+ corner-tr: 135,28,5,5
+ corner-bl: 112,51,5,5
+ corner-br: 135,51,5,5
+sidebar-button-observer-highlighted: chrome.png
+ background: 145,33,18,18
+ border-r: 163,33,5,18
+ border-l: 140,33,5,18
+ border-b: 145,51,18,5
+ border-t: 145,28,18,5
+ corner-tl: 140,28,5,5
+ corner-tr: 163,28,5,5
+ corner-bl: 140,51,5,5
+ corner-br: 163,51,5,5
+sidebar-button-observer-highlighted-hover: chrome.png
+ background: 145,5,18,18
+ border-r: 163,5,5,18
+ border-l: 140,5,5,18
+ border-b: 145,23,18,5
+ border-t: 145,0,18,5
+ corner-tl: 140,0,5,5
+ corner-tr: 163,0,5,5
+ corner-bl: 140,23,5,5
+ corner-br: 163,23,5,5
+sidebar-button-observer-highlighted-pressed: chrome.png
+ background: 33,33,18,18
+ border-r: 51,33,5,18
+ border-l: 28,33,5,18
+ border-b: 33,51,18,5
+ border-t: 33,28,18,5
+ corner-tl: 28,28,5,5
+ corner-tr: 51,28,5,5
+ corner-bl: 28,51,5,5
+ corner-br: 51,51,5,5
+sidebar-button-observer-disabled: chrome.png
+ background: 173,5,18,18
+ border-r: 191,5,5,18
+ border-l: 168,5,5,18
+ border-b: 173,23,18,5
+ border-t: 173,0,18,5
+ corner-tl: 168,0,5,5
+ corner-tr: 191,0,5,5
+ corner-bl: 168,23,5,5
+ corner-br: 191,23,5,5
+sidebar-button-observer-highlighted-disabled: chrome.png
+ background: 173,5,18,18
+ border-r: 191,5,5,18
+ border-l: 168,5,5,18
+ border-b: 173,23,18,5
+ border-t: 173,0,18,5
+ corner-tl: 168,0,5,5
+ corner-tr: 191,0,5,5
+ corner-bl: 168,23,5,5
+ corner-br: 191,23,5,5
+
+observer-scrollpanel-button: dialog.png
+ background: 769,257,126,126
+ border-r: 895,257,1,126
+ border-l: 768,257,1,126
+ border-b: 769,383,126,1
+ border-t: 769,256,126,1
+ corner-tl: 768,256,1,1
+ corner-tr: 895,256,1,1
+ corner-bl: 768,383,1,1
+ corner-br: 895,383,1,1
+
+observer-scrollpanel-button-hover: dialog.png
+ background: 769,257,126,126
+ border-r: 895,257,1,126
+ border-l: 768,257,1,126
+ border-b: 769,383,126,1
+ border-t: 769,256,126,1
+ corner-tl: 768,256,1,1
+ corner-tr: 895,256,1,1
+ corner-bl: 768,383,1,1
+ corner-br: 895,383,1,1
+
+observer-scrollpanel-button-pressed: dialog.png
+ background: 897,257,126,126
+ border-r: 1023,257,1,126
+ border-l: 896,257,1,126
+ border-b: 897,383,126,1
+ border-t: 897,256,126,1
+ corner-tl: 896,256,1,1
+ corner-tr: 1023,256,1,1
+ corner-bl: 896,383,1,1
+ corner-br: 1023,383,1,1
+
+observer-scrollpanel-button-disabled: dialog.png
+ background: 769,385,126,126
+ border-r: 895,385,1,126
+ border-l: 768,385,1,126
+ border-b: 769,511,126,1
+ border-t: 769,384,126,1
+ corner-tl: 768,384,1,1
+ corner-tr: 895,384,1,1
+ corner-bl: 768,511,1,1
+ corner-br: 895,511,1,1
+
+observer-scrollheader-selected: dialog.png
+ background: 769,385,126,126
+ border-r: 895,385,1,126
+ border-l: 768,385,1,126
+ border-b: 769,511,126,1
+ border-t: 769,384,126,1
+ corner-tl: 768,384,1,1
+ corner-tr: 895,384,1,1
+ corner-bl: 768,511,1,1
+ corner-br: 895,511,1,1
+
+observer-scrollitem-selected: dialog.png
+ background: 897,257,126,126
+ border-r: 1023,257,1,126
+ border-l: 896,257,1,126
+ border-b: 897,383,126,1
+ border-t: 897,256,126,1
+ corner-tl: 896,256,1,1
+ corner-tr: 1023,256,1,1
+ corner-bl: 896,383,1,1
+ corner-br: 1023,383,1,1
+
+observer-scrollitem-hover: dialog.png
+ background: 769,257,126,126
+ border-r: 895,257,1,126
+ border-l: 768,257,1,126
+ border-b: 769,383,126,1
+ border-t: 769,256,126,1
+ corner-tl: 768,256,1,1
+ corner-tr: 895,256,1,1
+ corner-bl: 768,383,1,1
+ corner-br: 895,383,1,1
# Used for the menu
dialog: dialog.png
@@ -172,20 +450,6 @@ strategic: strategic.png
enemy_owned: 32,32,32,32
player_owned: 96,0,32,32
-order-icons: buttons.png
- sell: 0,0,34,28
- sell-disabled: 68,0,34,28
- sell-active: 34,0,34,28
- repair: 0,28,34,28
- repair-disabled: 68,28,34,28
- repair-active: 34,28,34,28
- power: 0,56,34,28
- power-disabled: 68,56,34,28
- power-active: 34,56,34,28
- beacon: 0,84,34,28
- beacon-disabled: 68,84,34,28
- beacon-active: 34,84,34,28
-
flags: buttons.png
gdi: 30,112,30,15
nod: 0,112,30,15
diff --git a/mods/ts/chrome/ingame-observer.yaml b/mods/ts/chrome/ingame-observer.yaml
deleted file mode 100644
index ec3d644771..0000000000
--- a/mods/ts/chrome/ingame-observer.yaml
+++ /dev/null
@@ -1,130 +0,0 @@
-Container@OBSERVER_WIDGETS:
- Children:
- MenuButton@OBSERVER_STATS_BUTTON:
- Logic: OrderButtonsChromeLogic
- MenuContainer: INGAME_OBSERVERSTATS_BG
- HideIngameUI: False
- Pause: False
- X: 162
- Y: 0
- Width: 160
- Height: 25
- Text: Statistics (F1)
- Font: Bold
- Key: f1
- Background@RADAR_BG:
- X: WINDOW_RIGHT-255
- Y: 5
- Width: 250
- Height: 250
- Children:
- Radar@INGAME_RADAR:
- X: 10
- Y: 10
- Width: PARENT_RIGHT-19
- Height: PARENT_BOTTOM-19
- WorldInteractionController: INTERACTION_CONTROLLER
- Background@OBSERVER_CONTROL_BG:
- X: WINDOW_RIGHT-255
- Y: 260
- Width: 250
- Height: 55
- Children:
- DropDownButton@SHROUD_SELECTOR:
- Logic: ObserverShroudSelectorLogic
- X: 15
- Y: 15
- Width: 220
- Height: 25
- Font: Bold
- Children:
- LogicKeyListener@SHROUD_KEYHANDLER:
- Image@FLAG:
- X: 4
- Y: 4
- Width: 32
- Height: 16
- Label@LABEL:
- X: 40
- Width: 60
- Height: 25
- Label@NOFLAG_LABEL:
- X: 5
- Width: PARENT_RIGHT
- Height: 25
- Container@REPLAY_PLAYER:
- Logic: ReplayControlBarLogic
- Y: 39
- Width: 160
- Height: 35
- Visible: false
- Children:
- Button@BUTTON_PAUSE:
- X: 15
- Y: 10
- Width: 26
- Height: 26
- IgnoreChildMouseOver: true
- Children:
- Image@IMAGE_PAUSE:
- Y: 1
- Width: 25
- Height: 25
- ImageCollection: music
- ImageName: pause
- Button@BUTTON_PLAY:
- X: 15
- Y: 10
- Width: 26
- Height: 26
- IgnoreChildMouseOver: true
- Children:
- Image@IMAGE_PLAY:
- Width: 25
- Height: 25
- ImageCollection: music
- ImageName: play
- Button@BUTTON_SLOW:
- X: 55
- Y: 13
- Width: 36
- Height: 20
- BaseLine: 1
- TooltipText: Slow speed
- TooltipContainer: TOOLTIP_CONTAINER
- VisualHeight: 0
- Text: 50%
- Font: TinyBold
- Button@BUTTON_REGULAR:
- X: 55 + 45
- Y: 13
- Width: 38
- Height: 20
- BaseLine: 1
- TooltipText: Regular speed
- TooltipContainer: TOOLTIP_CONTAINER
- VisualHeight: 0
- Text: 100%
- Font: TinyBold
- Button@BUTTON_FAST:
- X: 55 + 45*2
- Y: 13
- Width: 38
- Height: 20
- BaseLine: 1
- TooltipText: Fast speed
- TooltipContainer: TOOLTIP_CONTAINER
- VisualHeight: 0
- Text: 200%
- Font: TinyBold
- Button@BUTTON_MAXIMUM:
- X: 55 + 45*3
- Y: 13
- Width: 38
- Height: 20
- BaseLine: 1
- TooltipText: Maximum speed
- TooltipContainer: TOOLTIP_CONTAINER
- VisualHeight: 0
- Text: MAX
- Font: TinyBold
\ No newline at end of file
diff --git a/mods/ts/chrome/ingame-player.yaml b/mods/ts/chrome/ingame-player.yaml
index 256637f409..8a31fdb1ec 100644
--- a/mods/ts/chrome/ingame-player.yaml
+++ b/mods/ts/chrome/ingame-player.yaml
@@ -3,127 +3,355 @@ Container@PLAYER_WIDGETS:
LogicKeyListener@CONTROLGROUP_KEYHANDLER:
Logic: ControlGroupLogic
LogicTicker@SIDEBAR_TICKER:
- MenuButton@OPTIONS_BUTTON:
- Logic: OrderButtonsChromeLogic
- MenuContainer: INGAME_MENU
- X: 0
- Y: 0
- Width: 160
- Height: 25
- Text: Options (Esc)
- Font: Bold
- Key: escape
- MenuButton@DIPLOMACY_BUTTON:
- Logic: OrderButtonsChromeLogic
- MenuContainer: INGAME_DIPLOMACY_BG
- HideIngameUI: False
- X: 162
- Y: 0
- Width: 160
- Height: 25
- Text: Diplomacy (P)
- Font: Bold
- Key: p
- MenuButton@DEBUG_BUTTON:
- Logic: OrderButtonsChromeLogic
- MenuContainer: INGAME_MENU
- X: 324
- Y: 0
- Width: 160
- Height: 25
- Text: Debug (Shift + Esc)
- Visible: false
- Font: Bold
- Key: escape Shift
- SlidingContainer@INGAME_RADAR_BIN:
- Logic: SlidingRadarBinLogic
- X: WINDOW_RIGHT-215
- Y: 0
- OpenOffset: 0,29
- ClosedOffset: 0,-166
- AnimationLength: 15
+ Container@SUPPORT_POWERS:
+ Logic: SupportPowerBinLogic
+ X: 10
+ Y: 10
Children:
- LogicTicker@RADAR_TICKER:
- Image@RADAR_BIN_BG:
- ImageName: radar
- Radar@RADAR_MINIMAP:
- WorldInteractionController: INTERACTION_CONTROLLER
+ SupportPowers@SUPPORT_PALETTE:
+ IconSize: 62, 46
+ IconSpriteOffset: -1, -1
+ TooltipContainer: TOOLTIP_CONTAINER
+ ReadyText: READY
+ HoldText: ON HOLD
+ Container@PALETTE_FOREGROUND:
+ Children:
+ Image@ICON_TEMPLATE:
+ Logic: AddRaceSuffixLogic
+ X:0-2
+ Y:0-2
+ Width: 62
+ Height: 46
+ IgnoreMouseOver: true
+ ImageCollection: sidebar
+ ImageName: background-supportoverlay
+ Image@SIDEBAR_BACKGROUND_TOP:
+ Logic: AddRaceSuffixLogic
+ X: WINDOW_RIGHT - 250
+ Y: 10
+ Width: 238
+ Height: 291
+ ImageCollection: sidebar
+ ImageName: background-top
+ ClickThrough: false
+ Children:
+ Container@TOP_BUTTONS:
+ Logic: OrderButtonsChromeLogic
X: 9
- Width: 192
- Height: 192
- VqaPlayer@PLAYER:
- X: 9
- Width: 192
- Height: 192
- Skippable: false
- ResourceBar@POWERBAR:
- Logic: IngamePowerBarLogic
- X: 42
- Y: 205
- Width: 138
- Height: 5
+ Y: 7
+ Children:
+ Button@BEACON_BUTTON:
+ Logic: AddRaceSuffixLogic
+ Width: 28
+ Height: 28
+ Background: sidebar-button
+ TooltipText: Place Beacon
+ TooltipContainer: TOOLTIP_CONTAINER
+ VisualHeight: 0
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: order-icons
+ Button@SELL_BUTTON:
+ Logic: AddRaceSuffixLogic
+ X: 32
+ Width: 28
+ Height: 28
+ Background: sidebar-button
+ TooltipText: Sell
+ TooltipContainer: TOOLTIP_CONTAINER
+ VisualHeight: 0
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: order-icons
+ Button@POWER_BUTTON:
+ Logic: AddRaceSuffixLogic
+ X: 64
+ Width: 28
+ Height: 28
+ Background: sidebar-button
+ TooltipText: Power Down
+ TooltipContainer: TOOLTIP_CONTAINER
+ VisualHeight: 0
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: order-icons
+ Button@REPAIR_BUTTON:
+ Logic: AddRaceSuffixLogic
+ X: 96
+ Width: 28
+ Height: 28
+ Background: sidebar-button
+ TooltipText: Repair
+ TooltipContainer: TOOLTIP_CONTAINER
+ VisualHeight: 0
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: order-icons
+ MenuButton@DEBUG_BUTTON:
+ Logic: AddRaceSuffixLogic
+ Key: escape Shift
+ X: 128
+ Width: 28
+ Height: 28
+ Background: sidebar-button
+ TooltipText: Debug Menu
+ TooltipContainer: TOOLTIP_CONTAINER
+ VisualHeight: 0
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: order-icons
+ ImageName: options
+ MenuButton@DIPLOMACY_BUTTON:
+ Logic: AddRaceSuffixLogic
+ MenuContainer: INGAME_DIPLOMACY_BG
+ HideIngameUI: false
+ Pause: false
+ Key: P
+ X: 160
+ Width: 28
+ Height: 28
+ Background: sidebar-button
+ TooltipText: Diplomacy
+ TooltipContainer: TOOLTIP_CONTAINER
+ VisualHeight: 0
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: order-icons
+ ImageName: diplomacy
+ MenuButton@OPTIONS_BUTTON:
+ Logic: AddRaceSuffixLogic
+ Key: escape
+ X: 192
+ Width: 28
+ Height: 28
+ Background: sidebar-button
+ TooltipText: Options
+ TooltipContainer: TOOLTIP_CONTAINER
+ VisualHeight: 0
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: order-icons
+ ImageName: options
+ Container@RADAR:
+ Logic: IngameRadarDisplayLogic
+ Children:
+ LogicTicker@RADAR_TICKER:
+ ColorBlock@RADAR_FADETOBLACK:
+ X: 8
+ Y: 40
+ Width: 222
+ Height: 222
+ Radar@RADAR_MINIMAP:
+ WorldInteractionController: INTERACTION_CONTROLLER
+ X: 9
+ Y: 41
+ Width: 220
+ Height: 220
+ Children:
+ Label@GAME_TIMER:
+ Logic: GameTimerLogic
+ X: 3
+ Y: 263
+ Width: PARENT_RIGHT
+ Height: 22
+ Align: Center
+ Font: TinyBold
+ LabelWithTooltip@CASH:
+ Logic: IngameCashCounterLogic
+ X: 35
+ Y: 262
+ Width: 50
+ Height: 22
+ Font: Bold
+ Text: {0}
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
- IndicatorImage: power-indicator
- Orientation: Horizontal
- Style: Bevelled
- MoneyBin@INGAME_MONEY_BIN:
- Logic: OrderButtonsChromeLogic
- X: WINDOW_RIGHT - WIDTH
- Width: 320
- Height: 32
- Children:
- Button@BEACON_BUTTON:
- X: 3-36
- Width: 34
- Height: 28
- TooltipText: Place Beacon
+ LabelWithTooltip@POWER:
+ Logic: IngamePowerCounterLogic
+ X: PARENT_RIGHT - WIDTH - 30
+ Y: 262
+ Width: 50
+ Height: 22
+ Align: Right
+ Font: Bold
+ Text: {0}
TooltipContainer: TOOLTIP_CONTAINER
- VisualHeight: 0
+ TooltipTemplate: SIMPLE_TOOLTIP
Children:
- Image@ICON:
- ImageCollection: order-icons
- Button@SELL_BUTTON:
- X: 3
- Width: 34
- Height: 28
- TooltipText: Sell
- TooltipContainer: TOOLTIP_CONTAINER
- VisualHeight: 0
- Children:
- Image@ICON:
- ImageCollection: order-icons
- Button@POWER_BUTTON:
- X: 39
- Width: 34
- Height: 28
- TooltipText: Power Down
- TooltipContainer: TOOLTIP_CONTAINER
- VisualHeight: 0
- Children:
- Image@ICON:
- ImageCollection: order-icons
- Button@REPAIR_BUTTON:
- X: 75
- Width: 34
- Height: 28
- TooltipText: Repair
- TooltipContainer: TOOLTIP_CONTAINER
- VisualHeight: 0
- Children:
- Image@ICON:
- ImageCollection: order-icons
- SupportPowerBin@INGAME_POWERS_BIN:
- X: 0
- Y: 25
- ReadyText: READY
- HoldText: ON HOLD
- BuildPalette@INGAME_BUILD_PALETTE:
+ Image@POWER_ICON:
+ X: PARENT_RIGHT + 4
+ Y: 5
+ ImageCollection: power-icons
+ ImageName: power-normal
+ Container@SIDEBAR_PRODUCTION:
+ Logic: ClassicProductionLogic
X: WINDOW_RIGHT - 250
- Y: 280
- Width: 250
- Height: 500
- ReadyText: READY
- HoldText: ON HOLD
- RequiresText: Requires {0}
-
+ Y: 300
+ Width: 238
+ Height: 250
+ Children:
+ Container@PALETTE_BACKGROUND:
+ Children:
+ Image@ROW_TEMPLATE:
+ Logic: AddRaceSuffixLogic
+ Width: 238
+ Height: 47
+ ClickThrough: false
+ ImageCollection: sidebar
+ ImageName: background-iconrow
+ Image@BOTTOM_CAP:
+ Logic: AddRaceSuffixLogic
+ Width: 238
+ Height: 8
+ ClickThrough: false
+ ImageCollection: sidebar
+ ImageName: background-bottom
+ LogicTicker@PRODUCTION_TICKER:
+ ProductionPalette@PRODUCTION_PALETTE:
+ X: 42
+ Y: 1
+ TooltipContainer: TOOLTIP_CONTAINER
+ ReadyText: READY
+ HoldText: ON HOLD
+ IconSize: 62, 46
+ IconMargin: 1, 1
+ IconSpriteOffset: -1, -1
+ Container@PALETTE_FOREGROUND:
+ X: 40
+ Y: 0-1
+ Children:
+ Image@ROW_TEMPLATE:
+ Width: 238
+ Height: 47
+ IgnoreMouseOver: true
+ ImageCollection: sidebar-bits
+ ImageName: production-iconoverlay
+ Container@PRODUCTION_TYPES:
+ X: 7
+ Y: 2
+ Width: 29
+ Height: 240
+ Children:
+ ProductionTypeButton@BUILDING:
+ Logic: AddRaceSuffixLogic
+ Width: 28
+ Height: 28
+ VisualHeight: 0
+ Background: sidebar-button
+ TooltipText: Buildings
+ TooltipContainer: TOOLTIP_CONTAINER
+ ProductionGroup: Building
+ HotkeyName: ProductionTypeBuildingKey
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: production-icons
+ ProductionTypeButton@DEFENSE:
+ Logic: AddRaceSuffixLogic
+ Y: 31
+ Width: 28
+ Height: 28
+ VisualHeight: 0
+ Background: sidebar-button
+ TooltipText: Defense
+ TooltipContainer: TOOLTIP_CONTAINER
+ ProductionGroup: Defense
+ HotkeyName: ProductionTypeDefenseKey
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: production-icons
+ ProductionTypeButton@INFANTRY:
+ Logic: AddRaceSuffixLogic
+ Y: 62
+ Width: 28
+ Height: 28
+ VisualHeight: 0
+ Background: sidebar-button
+ TooltipText: Infantry
+ TooltipContainer: TOOLTIP_CONTAINER
+ ProductionGroup: Infantry
+ HotkeyName: ProductionTypeInfantryKey
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: production-icons
+ ProductionTypeButton@VEHICLE:
+ Logic: AddRaceSuffixLogic
+ Y: 93
+ Width: 28
+ Height: 28
+ VisualHeight: 0
+ Background: sidebar-button
+ TooltipText: Vehicles
+ TooltipContainer: TOOLTIP_CONTAINER
+ ProductionGroup: Vehicle
+ HotkeyName: ProductionTypeVehicleKey
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: production-icons
+ ProductionTypeButton@AIRCRAFT:
+ Logic: AddRaceSuffixLogic
+ Y: 124
+ Width: 28
+ Height: 28
+ VisualHeight: 0
+ Background: sidebar-button
+ TooltipText: Aircraft
+ TooltipContainer: TOOLTIP_CONTAINER
+ ProductionGroup: Air
+ HotkeyName: ProductionTypeAircraftKey
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 6
+ ImageCollection: production-icons
+ Button@SCROLL_UP_BUTTON:
+ Logic: AddRaceSuffixLogic
+ Y: 186
+ Width: 28
+ Height: 22
+ VisualHeight: 0
+ Background: sidebar-button
+ TooltipText: Scroll up
+ TooltipContainer: TOOLTIP_CONTAINER
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 3
+ ImageCollection: scrollbar
+ ImageName: up_arrow
+ Button@SCROLL_DOWN_BUTTON:
+ Logic: AddRaceSuffixLogic
+ Y: 211
+ Width: 28
+ Height: 22
+ VisualHeight: 0
+ Background: sidebar-button
+ TooltipText: Scroll down
+ TooltipContainer: TOOLTIP_CONTAINER
+ Children:
+ Image@ICON:
+ X: 6
+ Y: 3
+ ImageCollection: scrollbar
+ ImageName: down_arrow
\ No newline at end of file
diff --git a/mods/ts/chrome/ingame.yaml b/mods/ts/chrome/ingame.yaml
deleted file mode 100644
index 76899d4801..0000000000
--- a/mods/ts/chrome/ingame.yaml
+++ /dev/null
@@ -1,74 +0,0 @@
-Container@INGAME_ROOT:
- Logic: LoadIngamePlayerOrObserverUILogic
- Children:
- Container@WORLD_ROOT:
- Children:
- LogicTicker@DISCONNECT_WATCHER:
- Logic: DisconnectWatcherLogic
- WorldInteractionController@INTERACTION_CONTROLLER:
- X: 0
- Y: 0
- Width: WINDOW_RIGHT
- Height: WINDOW_BOTTOM
- ViewportController:
- X: 0
- Y: 0
- Width: WINDOW_RIGHT
- Height: WINDOW_BOTTOM
- TooltipContainer: TOOLTIP_CONTAINER
- WorldCommand:
- X: 0
- Y: 0
- Width: WINDOW_RIGHT
- Height: WINDOW_BOTTOM
- StrategicProgress@STRATEGIC_PROGRESS:
- X: WINDOW_RIGHT/2
- Y: 40
- SupportPowerTimer@SUPPORT_POWER_TIMER:
- X: 80
- Y: 34
- Order: Descending
- Container@PLAYER_ROOT:
- Container@PERFORMANCE_INFO:
- Logic: PerfDebugLogic
- Children:
- Label@PERF_TEXT:
- X: WINDOW_RIGHT - 200
- Y: WINDOW_BOTTOM - 70
- Width: 170
- Height: 40
- Contrast: true
- Background@GRAPH_BG:
- ClickThrough: true
- Background: dialog4
- X: 30
- Y: WINDOW_BOTTOM - 240
- Width: 210
- Height: 210
- Children:
- PerfGraph@GRAPH:
- X: 5
- Y: 5
- Width: 200
- Height: 200
- Container@GAME_TIMER_BLOCK:
- Logic: GameTimerLogic
- X: WINDOW_RIGHT/2 - WIDTH
- Width: 100
- Height: 55
- Children:
- Label@GAME_TIMER:
- Width: PARENT_RIGHT
- Height: 15
- Align: Center
- Font: Title
- Contrast: true
- Label@GAME_TIMER_STATUS:
- Y: 35
- Width: PARENT_RIGHT
- Height: 15
- Align: Center
- Font: Bold
- Contrast: true
- Container@MENU_ROOT:
- TooltipContainer@TOOLTIP_CONTAINER:
diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml
index bc9fd0d818..441fd3d07d 100644
--- a/mods/ts/mod.yaml
+++ b/mods/ts/mod.yaml
@@ -102,7 +102,7 @@ Assemblies:
ChromeLayout:
./mods/ts/chrome/install.yaml
- ./mods/ts/chrome/ingame.yaml
+ ./mods/ra/chrome/ingame.yaml
./mods/ra/chrome/ingame-chat.yaml
./mods/ra/chrome/ingame-diplomacy.yaml
./mods/ra/chrome/ingame-fmvplayer.yaml
@@ -112,7 +112,7 @@ ChromeLayout:
./mods/ra/chrome/ingame-infobriefing.yaml
./mods/ra/chrome/ingame-infoobjectives.yaml
./mods/ra/chrome/ingame-infostats.yaml
- ./mods/ts/chrome/ingame-observer.yaml
+ ./mods/ra/chrome/ingame-observer.yaml
./mods/ra/chrome/ingame-observerstats.yaml
./mods/ts/chrome/ingame-player.yaml
./mods/ra/chrome/ingame-debug.yaml
diff --git a/mods/ts/rules/world.yaml b/mods/ts/rules/world.yaml
index 6cadda1463..45eba178c1 100644
--- a/mods/ts/rules/world.yaml
+++ b/mods/ts/rules/world.yaml
@@ -8,7 +8,8 @@ World:
LoadWidgetAtGameStart:
MenuPaletteEffect:
BuildingInfluence:
- ChooseBuildTabOnSelect:
+ ProductionQueueFromSelection:
+ ProductionTabsWidget: PRODUCTION_TABS
PaletteFromFile@player:
Name: player
Filename: unittem.pal
diff --git a/mods/ts/uibits/chrome-gdi.png b/mods/ts/uibits/chrome-gdi.png
deleted file mode 100644
index 39267ded71..0000000000
Binary files a/mods/ts/uibits/chrome-gdi.png and /dev/null differ
diff --git a/mods/ts/uibits/chrome-nod.png b/mods/ts/uibits/chrome-nod.png
deleted file mode 100644
index c910aaf1a3..0000000000
Binary files a/mods/ts/uibits/chrome-nod.png and /dev/null differ
diff --git a/mods/ts/uibits/chrome.png b/mods/ts/uibits/chrome.png
new file mode 100644
index 0000000000..ec0c8d6d3a
Binary files /dev/null and b/mods/ts/uibits/chrome.png differ
diff --git a/mods/ts/uibits/tabs.png b/mods/ts/uibits/tabs.png
deleted file mode 100644
index b16ad92595..0000000000
Binary files a/mods/ts/uibits/tabs.png and /dev/null differ