Hooked up new HUD icons.
This commit is contained in:
parent
3ea4439fc1
commit
4556536df4
8 changed files with 29 additions and 8 deletions
app
assets/images/level
styles/play/level
templates/play/level
views/play/level
Binary file not shown.
Before ![]() (image error) Size: 646 B |
Binary file not shown.
Before ![]() (image error) Size: 513 B |
Binary file not shown.
Before ![]() (image error) Size: 571 B |
Binary file not shown.
Before ![]() (image error) Size: 576 B |
Binary file not shown.
Before ![]() (image error) Size: 581 B |
|
@ -95,14 +95,35 @@
|
||||||
height: 100px
|
height: 100px
|
||||||
@include user-select(text)
|
@include user-select(text)
|
||||||
|
|
||||||
.prop
|
|
||||||
img
|
|
||||||
margin-right: 5px
|
|
||||||
width: 16px
|
|
||||||
height: 16px
|
|
||||||
|
|
||||||
.text-prop
|
.text-prop
|
||||||
width: 50%
|
width: 50%
|
||||||
|
|
||||||
|
.prop-label-icon
|
||||||
|
$iconSize: 16px
|
||||||
|
display: inline-block
|
||||||
|
width: $iconSize
|
||||||
|
height: $iconSize
|
||||||
|
margin-right: 5px
|
||||||
|
background: transparent url(/images/level/hud_info_icons.png) no-repeat
|
||||||
|
background-size: auto $iconSize
|
||||||
|
float: left
|
||||||
|
|
||||||
|
&.prop-label-icon-pos
|
||||||
|
background-position-x: -1 * $iconSize
|
||||||
|
&.prop-label-icon-target
|
||||||
|
background-position-x: -2 * $iconSize
|
||||||
|
&.prop-label-icon-inventory
|
||||||
|
background-position-x: -3 * $iconSize
|
||||||
|
&.prop-label-icon-visualRange
|
||||||
|
background-position-x: -4 * $iconSize
|
||||||
|
&.prop-label-icon-attackDamage
|
||||||
|
background-position-x: -5 * $iconSize
|
||||||
|
&.prop-label-icon-attackRange
|
||||||
|
background-position-x: -6 * $iconSize
|
||||||
|
&.prop-label-icon-maxSpeed
|
||||||
|
background-position-x: -7 * $iconSize
|
||||||
|
&.prop-label-icon-gold
|
||||||
|
background-position-x: -8 * $iconSize
|
||||||
|
|
||||||
.prop-value.bar-prop
|
.prop-value.bar-prop
|
||||||
width: 100px
|
width: 100px
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.prop(name="#{prop}")
|
.prop(name="#{prop}")
|
||||||
if hasIcon
|
if hasIcon
|
||||||
img.prop-label(src="/images/level/prop_#{prop}.png", alt="#{prop}")
|
span(class="prop-label prop-label-icon prop-label-icon-#{prop}")
|
||||||
else
|
else
|
||||||
span.prop-label #{prop}:
|
span.prop-label #{prop}:
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,7 @@ module.exports = class HUDView extends View
|
||||||
return null # included in the bar
|
return null # included in the bar
|
||||||
context =
|
context =
|
||||||
prop: prop
|
prop: prop
|
||||||
hasIcon: prop in ["health", "pos", "target", "inventory", "gold"]
|
hasIcon: prop in ["health", "pos", "target", "inventory", "gold", "visualRange", "attackDamage", "attackRange", "maxSpeed"]
|
||||||
hasBar: prop in ["health"]
|
hasBar: prop in ["health"]
|
||||||
$(prop_template(context))
|
$(prop_template(context))
|
||||||
|
|
||||||
|
|
Reference in a new issue