Separate component style for item UIs + option to select the style in the item config files, removed a bunch of hard-coded UI element color changes

This commit is contained in:
Regalis
2017-04-10 18:11:23 +03:00
parent 34f0ae39b6
commit dc6ed7daf1
21 changed files with 98 additions and 84 deletions

View File

@@ -14,6 +14,6 @@
</Holdable>
<Label canbeselected = "true">
<GuiFrame rect="0,0,0.4,0.4" alignment="Center" color="0.0,0.0,0.0,0.8"/>
<GuiFrame rect="0,0,0.4,0.4" alignment="Center" style="ItemUI"/>
</Label>
</Item>

View File

@@ -17,7 +17,7 @@
<PowerTransfer canbeselected = "true">
<StatusEffect type="InWater" target="This" condition="-0.5"/>
<GuiFrame rect="0,0,350,160" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,350,160" alignment="Center" style="ItemUI"/>
</PowerTransfer>
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
@@ -46,7 +46,7 @@
<Sprite texture ="battery.png" depth="0.8"/>
<PowerContainer capacity="2000.0" maxrechargespeed="500.0" maxoutput="1000.0" canbeselected = "true">
<GuiFrame rect="0,-100,350,160" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,-100,350,160" alignment="Center" style="ItemUI"/>
<StatusEffect type="OnActive" target="Contained" targetnames="loadable" Condition="2.0"/>
</PowerContainer>
@@ -74,7 +74,7 @@
<Sprite texture ="supercapacitor.png" depth="0.8"/>
<PowerContainer capacity="20.0" maxrechargespeed="20.0" maxoutput="2000000.0" canbeselected = "true">
<GuiFrame rect="0,0,0.3,0.3" alignment="Center" color="0.0,0.0,0.0,0.8"/>
<GuiFrame rect="0,0,0.3,0.3" alignment="Center" style="ItemUI"/>
</PowerContainer>
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">

View File

@@ -224,7 +224,7 @@
<Sprite texture="signalcomp.png" depth="0.8" sourcerect="48,16,16,16"/>
<RelayComponent canbeselected = "true">
<GuiFrame rect="0,0,200,160" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,200,160" alignment="Center" style="ItemUI"/>
</RelayComponent>
<fixrequirement name="Reset fuse">

View File

@@ -18,7 +18,7 @@
<Engine minvoltage="0.5" powerconsumption="2000.0" maxforce="2000" canbeselected = "true">
<StatusEffect type="InWater" target="This" condition="-2.0"/>
<GuiFrame rect="0,0,350,160" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,350,160" alignment="Center" style="ItemUI"/>
<sound file="engine.ogg" type="OnActive" range="3000.0" volume="CurrentVolume" loop="true"/>
</Engine>
@@ -45,7 +45,7 @@
</fixrequirement>
<Engine minvoltage="0.5" powerconsumption="500.0" maxforce="300" canbeselected = "true">
<GuiFrame rect="0,0,350,160" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,350,160" alignment="Center" style="ItemUI"/>
<sound file="engine.ogg" type="OnActive" range="3000.0" volume="CurrentVolume" loop="true"/>
</Engine>
@@ -72,12 +72,12 @@
<Steering minvoltage="0.5" canbeselected = "true" powerconsumption="10">
<StatusEffect type="InWater" target="This" condition="-1.0"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" style="ItemUI"/>
</Steering>
<Radar canbeselected = "true" powerconsumption="100">
<sound file="radarPing.ogg" type="OnUse" range="4000.0"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" color="0.0,0.0,0.0,0.0"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" style="ItemUI" color="0.0,0.0,0.0,0.0"/>
<PingCircle texture="Content/Items/Engine/pingCircle.png" origin="0.5,0.5"/>
<ScreenOverlay texture="Content/Items/Engine/radarOverlay.png" origin="0.5,0.5"/>
</Radar>
@@ -107,7 +107,7 @@
<Radar canbeselected = "true" powerconsumption="100">
<StatusEffect type="InWater" target="This" condition="-1.0"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" style="ItemUI"/>
<PingCircle texture="Content/Items/Engine/pingCircle.png" origin="0.5,0.5"/>
<ScreenOverlay texture="Content/Items/Engine/radarOverlay.png" origin="0.5,0.5"/>
</Radar>

View File

@@ -11,7 +11,7 @@
<Fabricator canbeselected = "true" powerconsumption="500.0">
<GuiFrame rect="0,0,600,400" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,600,400" alignment="Center" style="ItemUI"/>
<sound file="fabricator.ogg" type="OnActive" range="1000.0" loop="true"/>
@@ -92,7 +92,7 @@
<Fabricator canbeselected = "true" powerconsumption="100.0">
<GuiFrame rect="0,0,600,400" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,600,400" alignment="Center" style="ItemUI"/>
<sound file="fabricator.ogg" type="OnActive" range="1000.0" loop="true"/>
@@ -166,7 +166,7 @@
<Deconstructor canbeselected = "true" powerconsumption="500.0">
<sound file="deconstructor.ogg" type="OnActive" range="1000.0" loop="true"/>
<GuiFrame rect="0,0,300,200" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,300,200" alignment="Center" style="ItemUI"/>
</Deconstructor>
<ConnectionPanel selectkey="Action" canbeselected = "true">

View File

@@ -8,7 +8,7 @@
<Sprite texture="Content/Items/machines.png" depth="0.8" sourcerect="64,0,64,128"/>
<MiniMap MinVoltage="0.5" PowerConsumption="100" canbeselected = "true">
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" color="0.0,0.0,0.0,0.8"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" style="ItemUI"/>
</MiniMap>
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">

View File

@@ -8,7 +8,7 @@
<Sprite texture ="pump.png" depth="0.8"/>
<Pump canbeselected = "true" maxflow="500" PowerConsumption="300.0" MinVoltage="0.3">
<GuiFrame rect="0,0,330,145" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,330,145" alignment="Center" style="ItemUI"/>
<sound file="pump.ogg" type="OnActive" range="800.0" volume="CurrFlow" volumemultiplier="0.01" loop="true"/>
</Pump>
@@ -31,7 +31,7 @@
<Sprite texture ="smallpump.png" depth="0.8" sourcerect="0,0,64,48"/>
<Pump canbeselected = "true" maxflow="100" PowerConsumption="60.0" MinVoltage="0.3">
<GuiFrame rect="0,0,330,145" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,330,145" alignment="Center" style="ItemUI"/>
<sound file="pump.ogg" type="OnActive" range="500.0" volume="CurrFlow" volumemultiplier="0.01" loop="true"/>
</Pump>

View File

@@ -22,7 +22,7 @@
<Sprite texture = "reactor.png" sourcerect="0,0,321,192" depth="0.8"/>
<Reactor canbeselected = "true">
<GuiFrame rect="0,0,760,460" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,760,460" alignment="Center" style="ItemUI"/>
<StatusEffect type="InWater" target="This" Temperature="-500.0"/>
<StatusEffect type="OnActive" target="Contained" targetnames="Fuel Rod, Heat Absorber, Temperature Control Circuit" Condition="-0.1" />
<sound file="reactor.ogg" type="OnActive" range="2000.0" volume="FissionRate" volumemultiplier="0.02" loop="true"/>

View File

@@ -201,7 +201,7 @@
<Radar range="6000.0" powerconsumption="10" drawhudwhenequipped="true" detectsubmarinewalls="true">
<StatusEffect type="OnUse" target="Contained" Condition="-1.0" disabledeltatime="true"/>
<sound file="Content/Items/Engine/radarPing.ogg" type="OnUse" range="1000.0"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" style="ItemUI"/>
<PingCircle texture="Content/Items/Engine/pingCircle.png" origin="0.5,0.5"/>
<ScreenOverlay texture="Content/Items/Engine/radarOverlay.png" origin="0.5,0.5"/>
</Radar>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 KiB

After

Width:  |  Height:  |  Size: 400 KiB

View File

@@ -114,6 +114,17 @@
</GUIFrame>
</GUIListBox>
<ListBoxElement
textcolor="0.5, 0.55, 0.6, 1.0"
color="0.0,0.0,0.0,0.0"
hovercolor="1.0,1.0,1.0,1.0"
selectedcolor="1.0,1.0,1.0,1.0"
padding="5.0, 5.0, 5.0, 5.0">
<Sprite texture="Content/UI/UI_Atlas.png" state="Hover" sourcerect ="474, 544, 266, 52" slice="480, 552, 731, 584"/>
<Sprite texture="Content/UI/UI_Atlas.png" state="Selected" sourcerect ="474, 544, 266, 52" slice="480, 552, 731, 584"/>
</ListBoxElement>
<GUIScrollBar>
<GUIFrame
color="1.0,1.0,1.0,1.0"
@@ -196,7 +207,7 @@
hovercolor="1.0,1.0,1.0,1.0"
selectedcolor="1.0,1.0,1.0,1.0">
<Sprite texture="Content/UI/UI_Atlas.png" sourcerect ="28, 430, 875, 49" slice="43,436,888,472"/>
<Sprite texture="Content/UI/UI_Atlas.png" tile="false" sourcerect ="28, 430, 875, 49"/>
</GUIFrame>
<Slider
@@ -205,8 +216,16 @@
selectedcolor="1.0,1.0,1.0,1.0">
<Sprite texture="Content/UI/UI_Atlas.png" tile="false" sourcerect ="0, 276, 859, 37"/>
</Slider>
</Slider>
</GUIProgressBar>
<ItemUI
padding="40.0,40.0,40.0,40.0"
color="1.0,1.0,1.0,1.0"
hovercolor="1.0,1.0,1.0,1.0"
selectedcolor="1.0,1.0,1.0,1.0">
<Sprite texture="Content/UI/UI_Atlas.png" size="0.0, 0.0" sourcerect ="32, 541, 420, 454" slice="87,576,430,960"/>
</ItemUI>
</style>