mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
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
|
||||
@include user-select(text)
|
||||
|
||||
.prop
|
||||
img
|
||||
margin-right: 5px
|
||||
width: 16px
|
||||
height: 16px
|
||||
|
||||
.text-prop
|
||||
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
|
||||
width: 100px
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.prop(name="#{prop}")
|
||||
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
|
||||
span.prop-label #{prop}:
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@ module.exports = class HUDView extends View
|
|||
return null # included in the bar
|
||||
context =
|
||||
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"]
|
||||
$(prop_template(context))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue