summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-01-17 16:11:59 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-01-17 16:11:59 +0100
commit376929d6cd7c237faae1c9746733366e8d6f455a (patch)
tree7cd5efe0322b91b3d8ef2989d69b5ed6be648e2d /src/battle/src/View/Map/Character.elm
parentc1066323a777d14de4070b0bb8de2c248711285f (diff)
Remaining: time/delay, list encoding, http
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),