From e625907e5846bba7f9fb66375700f35eb2c6be39 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Tue, 26 May 2020 23:54:28 +0200 Subject: ... --- src/shared/battle/Battle/View/Gauge.elm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/shared/battle') 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 ) [ -- cgit v1.2.3-70-g09d2