diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs index 87ad9b0443..3f2363d5b7 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs @@ -57,6 +57,11 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic button.IsDisabled = () => queueTabs.Groups[group].Tabs.Count == 0; button.OnMouseUp = mi => selectTab(mi.Modifiers.HasModifier(Modifiers.Shift)); button.OnKeyPress = e => selectTab(e.Modifiers.HasModifier(Modifiers.Shift)); + + var chromeName = group.ToLowerInvariant(); + var icon = button.GetWidget("ICON"); + icon.GetImageName = () => button.IsDisabled() ? chromeName+"-disabled" : + queueTabs.Groups[group].Alert ? chromeName+"-alert" : chromeName; } [ObjectCreator.UseCtor] diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs index be4d4ba069..eeef4dcba7 100755 --- a/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs @@ -30,6 +30,7 @@ namespace OpenRA.Mods.Cnc.Widgets public List Tabs = new List(); public string Group; public int CumulativeCount; + public bool Alert { get { return Tabs.Any(t => t.Queue.CurrentDone); } } public void Update(IEnumerable allQueues) { diff --git a/artsrc/cnc/chrome.svg b/artsrc/cnc/chrome.svg index 3059c4ee32..0382b66811 100644 --- a/artsrc/cnc/chrome.svg +++ b/artsrc/cnc/chrome.svg @@ -54,9 +54,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="11.313708" - inkscape:cx="331.88915" - inkscape:cy="473.8204" + inkscape:zoom="4" + inkscape:cx="431.04393" + inkscape:cy="489.08146" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" @@ -69,7 +69,7 @@ inkscape:guide-bbox="true"> + + @@ -780,5 +788,362 @@ id="path3952" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mods/cnc/chrome.yaml b/mods/cnc/chrome.yaml index dd84710d78..9a86fbb323 100644 --- a/mods/cnc/chrome.yaml +++ b/mods/cnc/chrome.yaml @@ -372,3 +372,23 @@ strategic: strategic.png sidebar-bits: chrome.png left-indicator: 320,40,11,8 right-indicator: 325,40,11,8 + +production-icons: chrome.png + building: 384,0,16,16 + building-disabled: 400,0,16,16 + building-alert: 416,0,16,16 + defense: 384,16,16,16 + defense-disabled: 400,16,16,16 + defense-alert: 416,16,16,16 + infantry: 384,32,16,16 + infantry-disabled: 400,32,16,16 + infantry-alert: 416,32,16,16 + vehicle: 384,48,16,16 + vehicle-disabled: 400,48,16,16 + vehicle-alert: 416,48,16,16 + aircraft: 432,0,16,16 + aircraft-disabled: 448,0,16,16 + aircraft-alert: 464,0,16,16 + support: 432,16,16,16 + support-disabled: 448,16,16,16 + support-alert: 462,16,16,16 \ No newline at end of file diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index afd631cd47..cf071e32c3 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -192,46 +192,71 @@ Container@INGAME_ROOT: Id:BUILDING Width:30 Height:30 - Text: B Key: y TooltipText: Buildings TooltipContainer:TOOLTIP_CONTAINER + Children: + Image: + Id:ICON + X:7 + Y:7 + ImageCollection:production-icons TooltipButton@DEFENSE: Id:DEFENSE X:35 Width:30 Height:30 - Text: D Key: u TooltipText: Defense TooltipContainer:TOOLTIP_CONTAINER + Children: + Image: + Id:ICON + X:7 + Y:7 + ImageCollection:production-icons TooltipButton@INFANTRY: Id:INFANTRY X:70 Width:30 Height:30 - Text: I Key: i TooltipText: Infantry TooltipContainer:TOOLTIP_CONTAINER + Children: + Image: + Id:ICON + X:7 + Y:7 + ImageCollection:production-icons TooltipButton@VEHICLE: Id:VEHICLE X:105 Width:30 Height:30 - Text: V Key: o TooltipText: Vehicles TooltipContainer:TOOLTIP_CONTAINER + Children: + Image: + Id:ICON + X:7 + Y:7 + ImageCollection:production-icons TooltipButton@AIRCRAFT: Id:AIRCRAFT X:140 Width:30 Height:30 - Text: H Key: p TooltipText: Aircraft TooltipContainer:TOOLTIP_CONTAINER + Children: + Image: + Id:ICON + X:7 + Y:7 + ImageCollection:production-icons ProductionTabs: Id:PRODUCTION_TABS PaletteWidget:PRODUCTION_PALETTE diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index a00b0aa15a..84d7d10b9f 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -74,7 +74,7 @@ RearmBuildings: LandWhenIdle: false Buildable: - Queue: Plane + Queue: Aircraft HiddenUnderFog: GainsExperience: GivesExperience: diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index f33d660fae..709afc4be1 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -412,13 +412,13 @@ HPAD: Exit@1: SpawnOffset: 0,-6 Production: - Produces: Plane + Produces: Aircraft BelowUnits: Reservable: RepairsUnits: RallyPoint: ProductionQueue: - Type: Plane + Type: Aircraft Group: Aircraft BuildSpeed: .4 LowPowerSlowdown: 3 diff --git a/mods/cnc/uibits/chrome.png b/mods/cnc/uibits/chrome.png index 5ec58b3405..568d6f9822 100644 Binary files a/mods/cnc/uibits/chrome.png and b/mods/cnc/uibits/chrome.png differ