summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle/src/View/Map/Character.elm')
-rw-r--r--src/battle/src/View/Map/Character.elm55
1 files changed, 28 insertions, 27 deletions
diff --git a/src/battle/src/View/Map/Character.elm b/src/battle/src/View/Map/Character.elm
index 6ced9f0..d7934d3 100644
--- a/src/battle/src/View/Map/Character.elm
+++ b/src/battle/src/View/Map/Character.elm
@@ -82,22 +82,20 @@ get_alliance_class model char =
get_position_style : (
Struct.Character.Type ->
- (Html.Attribute Struct.Event.Type)
+ (List (Html.Attribute Struct.Event.Type))
)
get_position_style char =
let char_loc = (Struct.Character.get_location char) in
- (Html.Attributes.style
- [
- (
- "top",
- ((String.fromInt (char_loc.y * Constants.UI.tile_size)) ++ "px")
- ),
- (
- "left",
- ((String.fromInt (char_loc.x * Constants.UI.tile_size)) ++ "px")
- )
- ]
- )
+ [
+ (Html.Attributes.style
+ "top"
+ ((String.fromInt (char_loc.y * Constants.UI.tile_size)) ++ "px")
+ ),
+ (Html.Attributes.style
+ "left"
+ ((String.fromInt (char_loc.x * Constants.UI.tile_size)) ++ "px")
+ )
+ ]
get_focus_class : (
Struct.Model.Type ->
@@ -186,21 +184,24 @@ get_actual_html : (
)
get_actual_html model char =
(Html.div
- [
- (Html.Attributes.class "tiled"),
- (Html.Attributes.class "character-icon"),
- (get_animation_class model char),
- (get_activation_level_class char),
- (get_alliance_class model char),
- (get_position_style char),
- (get_focus_class model char),
- (Html.Attributes.class "clickable"),
- (Html.Events.onClick
- (Struct.Event.CharacterSelected
- (Struct.Character.get_index char)
+ (
+ [
+ (Html.Attributes.class "tiled"),
+ (Html.Attributes.class "character-icon"),
+ (get_animation_class model char),
+ (get_activation_level_class char),
+ (get_alliance_class model char),
+ (get_focus_class model char),
+ (Html.Attributes.class "clickable"),
+ (Html.Events.onClick
+ (Struct.Event.CharacterSelected
+ (Struct.Character.get_index char)
+ )
)
- )
- ]
+ ]
+ ++
+ (get_position_style char)
+ )
[
(get_body_html char),
(get_head_html char),