| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2020-05-26 23:54:28 +0200 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2020-05-26 23:54:28 +0200 | 
| commit | e625907e5846bba7f9fb66375700f35eb2c6be39 (patch) | |
| tree | 6bea7f6af48c5affcdd474fb38d607b977fa598e /src/shared | |
| parent | 333f924dcf232960d109a5d52ba1ecce9f78fde7 (diff) | |
...
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/battle/Battle/View/Gauge.elm | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/src/shared/battle/Battle/View/Gauge.elm b/src/shared/battle/Battle/View/Gauge.elm index 29a97a0..14bcc18 100644 --- a/src/shared/battle/Battle/View/Gauge.elm +++ b/src/shared/battle/Battle/View/Gauge.elm @@ -37,7 +37,7 @@ get_bar_div percent extra_bar_attr =           [              (Html.Attributes.style                 "width" -               ((String.fromFloat percent) ++ "%") +               ((String.fromFloat (min 100.0 percent)) ++ "%")              ),              (Html.Attributes.class                 "gauge-bar" @@ -65,7 +65,14 @@ get_html : (  get_html text percent extra_div_attr extra_bar_attr extra_txt_attr =     (Html.div        ( -         [(Html.Attributes.class "gauge")] +         [ +            (Html.Attributes.class "gauge"), +            ( +               if (percent > 100.0) +               then (Html.Attributes.class "gauge-overflow") +               else (Html.Attributes.class "") +            ) +         ]           ++ extra_div_attr        )        [ | 


