| summaryrefslogtreecommitdiff | 
diff options
5 files changed, 55 insertions, 23 deletions
| diff --git a/src/battlemap/src/Update/HandleServerReply.elm b/src/battlemap/src/Update/HandleServerReply.elm index 85a3cc8..8b3ae27 100644 --- a/src/battlemap/src/Update/HandleServerReply.elm +++ b/src/battlemap/src/Update/HandleServerReply.elm @@ -75,8 +75,8 @@ add_to_timeline turn_results current_state =                 {model |                    timeline =                       (Array.append -                        model.timeline                          (Array.fromList turn_results) +                        model.timeline                       ),                    ui =                       (Struct.UI.set_displayed_tab diff --git a/src/battlemap/src/View/SideBar/TabMenu/Timeline/Attack.elm b/src/battlemap/src/View/SideBar/TabMenu/Timeline/Attack.elm index fd95281..82c9d57 100644 --- a/src/battlemap/src/View/SideBar/TabMenu/Timeline/Attack.elm +++ b/src/battlemap/src/View/SideBar/TabMenu/Timeline/Attack.elm @@ -41,20 +41,12 @@ get_title_html attacker defender =  get_portrait_html : (        Struct.Character.Type -> -      Bool ->        (Html.Html Struct.Event.Type)     ) -get_portrait_html char float_left = +get_portrait_html char =     (Html.div        [           (Html.Attributes.class "battlemap-timeline-portrait"), -         ( -            if (float_left) -            then -               (Html.Attributes.class "battlemap-float-left") -            else -               (Html.Attributes.class "battlemap-float-right") -         ),           (Html.Attributes.class              (                 "asset-character-portrait-" @@ -71,9 +63,9 @@ get_effect_text attack =     (        (           case attack.precision of -            Struct.Attack.Hit -> " hits for " -            Struct.Attack.Graze -> " grazes for " -            Struct.Attack.Miss -> " misses." +            Struct.Attack.Hit -> " hit for " +            Struct.Attack.Graze -> " grazed for " +            Struct.Attack.Miss -> " missed."        )        ++        ( @@ -86,7 +78,7 @@ get_effect_text attack =                 ++                 (                    if (attack.critical) -                  then " (Critical)." +                  then " (Critical Hit)."                    else "."                 )              ) @@ -113,25 +105,25 @@ get_attack_html attacker defender attack =                    (Struct.Attack.Counter, True) ->                       (                          defender_name -                        ++ " attempts to strike back, but " +                        ++ " attempted to strike back, but "                          ++ attacker_name -                        ++ " parries, and " +                        ++ " parried, and "                          ++ (get_effect_text attack)                       )                    (Struct.Attack.Counter, _) ->                       (                          defender_name -                        ++ " strikes back, and " +                        ++ " striked back, and "                          ++ (get_effect_text attack)                       )                    (_, True) ->                       (                          attacker_name -                        ++ " attempts a hit, but " +                        ++ " attempted a hit, but "                          ++ defender_name -                        ++ " parries, and " +                        ++ " parried, and "                          ++ (get_effect_text attack)                       ) @@ -165,8 +157,8 @@ get_html model attack =              ]              (                 [ -                  (get_portrait_html atkchar True), -                  (get_portrait_html defchar False), +                  (get_portrait_html atkchar), +                  (get_portrait_html defchar),                    (get_title_html atkchar defchar)                 ]                 ++ diff --git a/src/battlemap/src/View/SideBar/TabMenu/Timeline/Movement.elm b/src/battlemap/src/View/SideBar/TabMenu/Timeline/Movement.elm index 56560b6..d8db541 100644 --- a/src/battlemap/src/View/SideBar/TabMenu/Timeline/Movement.elm +++ b/src/battlemap/src/View/SideBar/TabMenu/Timeline/Movement.elm @@ -16,6 +16,24 @@ import Struct.Model  --------------------------------------------------------------------------------  -- LOCAL -----------------------------------------------------------------------  -------------------------------------------------------------------------------- +get_portrait_html : ( +      Struct.Character.Type -> +      (Html.Html Struct.Event.Type) +   ) +get_portrait_html char = +   (Html.div +      [ +         (Html.Attributes.class "battlemap-timeline-portrait"), +         (Html.Attributes.class +            ( +               "asset-character-portrait-" +               ++ (Struct.Character.get_portrait_id char) +            ) +         ) +      ] +      [ +      ] +   )  --------------------------------------------------------------------------------  -- EXPORTED -------------------------------------------------------------------- @@ -34,6 +52,7 @@ get_html model movement =                 (Html.Attributes.class "battlemap-timeline-movement")              ]              [ +               (get_portrait_html char),                 (Html.text                    (                       (Struct.Character.get_name char) diff --git a/src/battlemap/src/View/SideBar/TabMenu/Timeline/WeaponSwitch.elm b/src/battlemap/src/View/SideBar/TabMenu/Timeline/WeaponSwitch.elm index ef7e757..0216540 100644 --- a/src/battlemap/src/View/SideBar/TabMenu/Timeline/WeaponSwitch.elm +++ b/src/battlemap/src/View/SideBar/TabMenu/Timeline/WeaponSwitch.elm @@ -16,6 +16,24 @@ import Struct.Model  --------------------------------------------------------------------------------  -- LOCAL -----------------------------------------------------------------------  -------------------------------------------------------------------------------- +get_portrait_html : ( +      Struct.Character.Type -> +      (Html.Html Struct.Event.Type) +   ) +get_portrait_html char = +   (Html.div +      [ +         (Html.Attributes.class "battlemap-timeline-portrait"), +         (Html.Attributes.class +            ( +               "asset-character-portrait-" +               ++ (Struct.Character.get_portrait_id char) +            ) +         ) +      ] +      [ +      ] +   )  --------------------------------------------------------------------------------  -- EXPORTED -------------------------------------------------------------------- @@ -34,6 +52,7 @@ get_html model weapon_switch =                 (Html.Attributes.class "battlemap-timeline-weapon-switch")              ]              [ +               (get_portrait_html char),                 (Html.text                    (                       (Struct.Character.get_name char) diff --git a/src/battlemap/www/style.css b/src/battlemap/www/style.css index 08ec900..2911501 100644 --- a/src/battlemap/www/style.css +++ b/src/battlemap/www/style.css @@ -161,8 +161,10 @@  .battlemap-timeline-portrait  { -   width: 64px; -   height: 64px; +   display: inline-block; +   vertical-align: middle; +   width: 36px; +   height: 36px;  }  /******************************************************************************/  /** Main View Elements ********************************************************/ | 


