Scrap Mechanic Wiki
(this should prevent the bars from wrapping)
(EXPERIMENTAL. May break.)
 
Line 1: Line 1:
  +
<div class="bar-display"><!--
<span style="white-space:nowrap">{{#switch: {{{1}}}
 
  +
--><div {{#ifexpr: {{{1|0}}} > 0 |class="filled"}}></div><!--
| #default = [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]]
 
  +
--><div {{#ifexpr: {{{1|0}}} > 1 |class="filled"}}></div><!--
| 1 = [[File:BarFull.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]]
 
  +
--><div {{#ifexpr: {{{1|0}}} > 2 |class="filled"}}></div><!--
| 2 = [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]]
 
  +
--><div {{#ifexpr: {{{1|0}}} > 3 |class="filled"}}></div><!--
| 3 = [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]]
 
  +
--><div {{#ifexpr: {{{1|0}}} > 4 |class="filled"}}></div><!--
| 4 = [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]]
 
  +
| 5 = [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]]
 
  +
--><div {{#ifexpr: {{{1|0}}} > 5 |class="filled"}}></div><!--
| 6 = [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]]
 
  +
--><div {{#ifexpr: {{{1|0}}} > 6 |class="filled"}}></div><!--
| 7 = [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]]
 
  +
--><div {{#ifexpr: {{{1|0}}} > 7 |class="filled"}}></div><!--
| 8 = [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarEmpty.png|14x14px]] [[File:BarEmpty.png|14x14px]]
 
  +
--><div {{#ifexpr: {{{1|0}}} > 8 |class="filled"}}></div><!--
| 9 = [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarEmpty.png|14x14px]]
 
  +
--><div {{#ifexpr: {{{1|0}}} > 9 |class="filled"}}></div><!--
| 10 = [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]] [[File:BarFull.png|14x14px]]
 
}}</span>
+
--></div>

Latest revision as of 19:47, 23 May 2020