| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/shared/battle')
| -rw-r--r-- | src/shared/battle/Battle/View/Attribute.elm | 90 | ||||
| -rw-r--r-- | src/shared/battle/Battle/View/DamageType.elm | 68 | 
2 files changed, 105 insertions, 53 deletions
| diff --git a/src/shared/battle/Battle/View/Attribute.elm b/src/shared/battle/Battle/View/Attribute.elm index 5c53b4c..9b2a8c7 100644 --- a/src/shared/battle/Battle/View/Attribute.elm +++ b/src/shared/battle/Battle/View/Attribute.elm @@ -41,13 +41,6 @@ get_html attribute value =                 (Struct.HelpRequest.Attribute attribute)              )           ), -         (Html.Attributes.class "omnimod-icon"), -         (Html.Attributes.class -            ( -               "omnimod-icon-" -               ++ (Battle.Struct.Attributes.encode_category attribute) -            ) -         ),           (Html.Attributes.class              (                 if (value < 0) @@ -60,12 +53,32 @@ get_html attribute value =           )        ]        [ -         (Html.text -            ( -               if (Battle.Struct.Attributes.is_percent attribute) -               then ((String.fromInt value) ++ "%") -               else (String.fromInt value) -            ) +         (Html.div +            [ +               (Html.Attributes.class "omnimod-icon"), +               (Html.Attributes.class +                  ( +                     "omnimod-icon-" +                     ++ (Battle.Struct.Attributes.encode_category attribute) +                  ) +               ) +            ] +            [ +            ] +         ), +         (Html.div +            [ +               (Html.Attributes.class "omnimod-value") +            ] +            [ +               (Html.text +                  ( +                     if (Battle.Struct.Attributes.is_percent attribute) +                     then ((String.fromInt value) ++ "%") +                     else (String.fromInt value) +                  ) +               ) +            ]           )        ]     ) @@ -83,13 +96,6 @@ get_signed_html attribute value =              then (Html.Attributes.class "omnimod-negative")              else (Html.Attributes.class "omnimod-positive")           ), -         (Html.Attributes.class "omnimod-icon"), -         (Html.Attributes.class -            ( -               "omnimod-icon-" -               ++ (Battle.Struct.Attributes.encode_category attribute) -            ) -         ),           (Html.Events.onClick              (Struct.Event.RequestedHelp                 (Struct.HelpRequest.Attribute attribute) @@ -97,20 +103,40 @@ get_signed_html attribute value =           )        ]        [ -         (Html.text -            ( -               ( -                  if (value > 0) -                  then ("+" ++ (String.fromInt value)) -                  else (String.fromInt value) +         (Html.div +            [ +               (Html.Attributes.class "omnimod-icon"), +               (Html.Attributes.class +                  ( +                     "omnimod-icon-" +                     ++ (Battle.Struct.Attributes.encode_category attribute) +                  )                 ) -               ++ -               ( -                  if (Battle.Struct.Attributes.is_percent attribute) -                  then "%" -                  else "" +            ] +            [ +            ] +         ), +         (Html.div +            [ +               (Html.Attributes.class "omnimod-value") +            ] +            [ +               (Html.text +                  ( +                     ( +                        if (value > 0) +                        then ("+" ++ (String.fromInt value)) +                        else (String.fromInt value) +                     ) +                     ++ +                     ( +                        if (Battle.Struct.Attributes.is_percent attribute) +                        then "%" +                        else "" +                     ) +                  )                 ) -            ) +            ]           )        ]     ) diff --git a/src/shared/battle/Battle/View/DamageType.elm b/src/shared/battle/Battle/View/DamageType.elm index 4f74133..eee2838 100644 --- a/src/shared/battle/Battle/View/DamageType.elm +++ b/src/shared/battle/Battle/View/DamageType.elm @@ -33,13 +33,6 @@ get_html : (  get_html damage_type value =     (Html.div        [ -         (Html.Attributes.class "omnimod-icon"), -         (Html.Attributes.class -            ( -               "omnimod-icon-" -               ++ (Battle.Struct.DamageType.encode damage_type) -            ) -         ),           (Html.Events.onClick              (Struct.Event.RequestedHelp                 (Struct.HelpRequest.DamageType damage_type) @@ -47,7 +40,27 @@ get_html damage_type value =           )        ]        [ -         (Html.text (String.fromInt value)) +         (Html.div +            [ +               (Html.Attributes.class "omnimod-icon"), +               (Html.Attributes.class +                  ( +                     "omnimod-icon-" +                     ++ (Battle.Struct.DamageType.encode damage_type) +                  ) +               ) +            ] +            [ +            ] +         ), +         (Html.div +            [ +               (Html.Attributes.class "omnimod-value") +            ] +            [ +               (Html.text (String.fromInt value)) +            ] +         )        ]     ) @@ -64,13 +77,6 @@ get_signed_html damage_type value =              then (Html.Attributes.class "omnimod-negative")              else (Html.Attributes.class "omnimod-positive")           ), -         (Html.Attributes.class "omnimod-icon"), -         (Html.Attributes.class -            ( -               "omnimod-icon-" -               ++ (Battle.Struct.DamageType.encode damage_type) -            ) -         ),           (Html.Events.onClick              (Struct.Event.RequestedHelp                 (Struct.HelpRequest.DamageType damage_type) @@ -78,12 +84,32 @@ get_signed_html damage_type value =           )        ]        [ -         (Html.text -            ( -               if (value > 0) -               then ("+" ++ (String.fromInt value)) -               else (String.fromInt value) -            ) +         (Html.div +            [ +               (Html.Attributes.class "omnimod-icon"), +               (Html.Attributes.class +                  ( +                     "omnimod-icon-" +                     ++ (Battle.Struct.DamageType.encode damage_type) +                  ) +               ) +            ] +            [ +            ] +         ), +         (Html.div +            [ +               (Html.Attributes.class "omnimod-value") +            ] +            [ +               (Html.text +                  ( +                     if (value > 0) +                     then ("+" ++ (String.fromInt value)) +                     else (String.fromInt value) +                  ) +               ) +            ]           )        ]     ) | 


