diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs index 3f2363d5b7..25cc5f34b7 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs @@ -85,13 +85,16 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic var sidebarRoot = playerWidgets.GetWidget("SIDEBAR_BACKGROUND"); var sellButton = sidebarRoot.GetWidget("SELL_BUTTON"); - sellButton.IsDisabled = () => world.OrderGenerator is SellOrderGenerator; sellButton.OnClick = () => world.ToggleInputMode(); + var sellIcon = sellButton.GetWidget("ICON"); + sellIcon.GetImageName = () => world.OrderGenerator is SellOrderGenerator ? "sell-active" : "sell"; var repairButton = sidebarRoot.GetWidget("REPAIR_BUTTON"); - repairButton.IsDisabled = () => world.OrderGenerator is RepairOrderGenerator - || !RepairOrderGenerator.PlayerIsAllowedToRepair( world ); + repairButton.IsDisabled = () => !RepairOrderGenerator.PlayerIsAllowedToRepair( world ); repairButton.OnClick = () => world.ToggleInputMode(); + var repairIcon = repairButton.GetWidget("ICON"); + repairIcon.GetImageName = () => repairButton.IsDisabled() ? "repair-disabled" : + world.OrderGenerator is RepairOrderGenerator ? "repair-active" : "repair"; var playerResources = world.LocalPlayer.PlayerActor.Trait(); sidebarRoot.GetWidget("CASH_DISPLAY").GetText = () => diff --git a/artsrc/cnc/chrome.svg b/artsrc/cnc/chrome.svg index 0382b66811..6e46d4797e 100644 --- a/artsrc/cnc/chrome.svg +++ b/artsrc/cnc/chrome.svg @@ -20,6 +20,13 @@ inkscape:export-ydpi="90"> + + + + + position="496,496" + id="guide4004" /> + + + + + + + + + @@ -803,7 +858,7 @@ style="fill:#ffffff;fill-opacity:1;stroke:none" /> @@ -815,14 +870,14 @@ sodipodi:cy="34.393562" sodipodi:rx="1.7235727" sodipodi:ry="1.7235727" - d="m 394.38879,34.393818 a 1.7235727,1.7235727 0 1 1 0,-2.56e-4" - transform="matrix(1.1603804,0,0,1.1603804,-63.641028,534.45258)" + d="m 394.38879,34.393818 c -1.4e-4,0.951903 -0.77192,1.723458 -1.72382,1.723317 -0.95191,-1.41e-4 -1.72346,-0.771925 -1.72332,-1.723828 1.4e-4,-0.951903 0.77192,-1.723458 1.72383,-1.723317 0.9518,1.41e-4 1.72331,0.771769 1.72331,1.723572" + transform="matrix(1.1603804,0,0,1.1603804,-31.641028,502.45258)" sodipodi:start="0.00014815468" sodipodi:end="6.2831853" sodipodi:open="true" /> + x="427" + y="544.36218" /> + x="420" + y="560.36218" /> + x="387" + y="580.36218" /> @@ -945,35 +1000,35 @@ sodipodi:nodetypes="ccccccc" inkscape:connector-curvature="0" id="path4144" - d="m 399,591.90765 0,11.45455 -4,0 0,-1.27273 c 3.16404,-2.23876 3.18646,-7.18306 0,-8.90909 l 0,-1.27273 z" + d="m 447,543.90765 0,11.45455 -4,0 0,-1.27273 c 3.16404,-2.23876 3.18646,-7.18306 0,-8.90909 l 0,-1.27273 z" style="fill:#ffffff;fill-opacity:1;stroke:none" /> @@ -981,7 +1036,7 @@ sodipodi:nodetypes="ccccccc" inkscape:connector-curvature="0" id="path4172" - d="m 431,591.90765 0,11.45455 -4,0 0,-1.27273 c 3.16404,-2.23876 3.18646,-7.18306 0,-8.90909 l 0,-1.27273 z" + d="m 447,575.90765 0,11.45455 -4,0 0,-1.27273 c 3.16404,-2.23876 3.18646,-7.18306 0,-8.90909 l 0,-1.27273 z" style="fill:#ffc000;fill-opacity:1;stroke:none" /> - @@ -1028,33 +1070,20 @@ sodipodi:cy="27.125" sodipodi:rx="4.9375" sodipodi:ry="6.625" - d="m 448.875,27.125982 a 4.9375,6.625 0 1 1 0,-9.82e-4" - transform="matrix(0.20253165,0,0,-0.1509434,349.08861,568.54292)" + d="m 448.875,27.125982 c -4e-4,3.658886 -2.21133,6.62456 -4.93823,6.624018 -2.72691,-5.42e-4 -4.93717,-2.967095 -4.93677,-6.625982 4e-4,-3.658886 2.21133,-6.62456 4.93823,-6.624018 2.72662,5.42e-4 4.93677,2.966497 4.93677,6.625" + transform="matrix(0.20253165,0,0,-0.1509434,382.08861,552.54292)" sodipodi:start="0.00014815468" sodipodi:end="6.2831853" sodipodi:open="true" /> - @@ -1062,14 +1091,14 @@ sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path4292" - d="m 458.50028,570.48535 c -2.09468,1.20821 -4.75526,1.29589 -7.00028,1.6e-4 l 2.5118,-4.33693 c 0.63778,0.36809 1.39157,0.34625 1.98848,0.007 z" + d="m 475.50028,570.48535 c -2.09468,1.20821 -4.75526,1.29589 -7.00028,1.6e-4 l 2.5118,-4.33693 c 0.63778,0.36809 1.39157,0.34625 1.98848,0.007 z" style="fill:#808080;fill-opacity:1;stroke:none" /> - @@ -1116,20 +1132,20 @@ sodipodi:cy="27.125" sodipodi:rx="4.9375" sodipodi:ry="6.625" - d="m 448.875,27.125982 a 4.9375,6.625 0 1 1 0,-9.82e-4" - transform="matrix(0.20253165,0,0,-0.1509434,381.08861,568.54292)" + d="m 448.875,27.125982 c -4e-4,3.658886 -2.21133,6.62456 -4.93823,6.624018 -2.72691,-5.42e-4 -4.93717,-2.967095 -4.93677,-6.625982 4e-4,-3.658886 2.21133,-6.62456 4.93823,-6.624018 2.72662,5.42e-4 4.93677,2.966497 4.93677,6.625" + transform="matrix(0.20253165,0,0,-0.1509434,382.08861,584.54292)" sodipodi:start="0.00014815468" sodipodi:end="6.2831853" sodipodi:open="true" /> @@ -1137,13 +1153,62 @@ sodipodi:nodetypes="ccccccccccccccccccc" inkscape:connector-curvature="0" id="path4338" - d="m 448,540.3622 0,2 2.70833,2.70833 -1.25,11.29167 1.45833,0 3.70833,-7.37499 4.25,4.25 -0.20833,3.12499 0.66668,0 1.33332,-3.33334 3.33334,-1.33332 0,-0.66668 -3.33334,0 -4.04167,-4.04165 7.37501,-3.70835 0,-1.45833 -11.29167,1.25 L 450,540.3622 z" + d="m 448,556.3622 0,2 2.70833,2.70833 -1.25,11.29167 1.45833,0 3.70833,-7.37499 4.25,4.25 -0.20833,3.12499 0.66668,0 1.33332,-3.33334 3.33334,-1.33332 0,-0.66668 -3.33334,0 -4.04167,-4.04165 7.37501,-3.70835 0,-1.45833 -11.29167,1.25 L 450,556.3622 z" style="fill:#808080;fill-opacity:1;stroke:none" /> + + + + + + + + + + diff --git a/mods/cnc/chrome.yaml b/mods/cnc/chrome.yaml index 9a86fbb323..b794916121 100644 --- a/mods/cnc/chrome.yaml +++ b/mods/cnc/chrome.yaml @@ -375,20 +375,31 @@ sidebar-bits: chrome.png 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 + 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: 416,16,16,16 - infantry: 384,32,16,16 - infantry-disabled: 400,32,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: 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 + vehicle: 432,0,16,16 + vehicle-disabled: 432,16,16,16 + vehicle-alert: 432,32,16,16 + aircraft: 448,0,16,16 + aircraft-disabled: 448,16,16,16 + aircraft-alert: 448,32,16,16 + support: 464,0,16,16 + support-disabled: 464,16,16,16 + support-alert: 464,32,16,16 + +order-icons: chrome.png + options: 480,0,16,16 + options-disabled: 480,16,16,16 + options-active: 480,32,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 \ No newline at end of file diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index cf071e32c3..0f309f2a03 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -94,36 +94,52 @@ Container@INGAME_ROOT: TooltipButton@OPTIONS_BUTTON: Id:OPTIONS_BUTTON Key:escape - X:40 - Y:0-24 - Width:35 - Height:25 - Text:Opt + X:42 + Y:0-29 + Width:30 + Height:30 Font:Bold TooltipText: Menu TooltipContainer:TOOLTIP_CONTAINER + Children: + Image: + Id:ICON + X:7 + Y:7 + ImageCollection:order-icons + ImageName:options TooltipButton@SELL_BUTTON: Id:SELL_BUTTON Key: [ - X:80 - Y:0-24 - Width:35 - Height:25 - Text:$ + X:82 + Y:0-29 + Width:30 + Height:30 Font:Bold TooltipText: Sell TooltipContainer:TOOLTIP_CONTAINER + Children: + Image: + Id:ICON + X:7 + Y:7 + ImageCollection:order-icons TooltipButton@REPAIR_BUTTON: Id:REPAIR_BUTTON Key: ] - X:120 - Y:0-24 - Width:35 - Height:25 - Text:R + X:122 + Y:0-29 + Width:30 + Height:30 Font:Bold TooltipText: Repair TooltipContainer:TOOLTIP_CONTAINER + Children: + Image: + Id:ICON + X:7 + Y:7 + ImageCollection:order-icons Background@RADAR: X:13 Y:5 diff --git a/mods/cnc/uibits/chrome.png b/mods/cnc/uibits/chrome.png index 568d6f9822..b741c443e5 100644 Binary files a/mods/cnc/uibits/chrome.png and b/mods/cnc/uibits/chrome.png differ