summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/battle/Battle/View/Attribute.elm')
-rw-r--r--src/shared/battle/Battle/View/Attribute.elm90
1 files changed, 32 insertions, 58 deletions
diff --git a/src/shared/battle/Battle/View/Attribute.elm b/src/shared/battle/Battle/View/Attribute.elm
index 9b2a8c7..5c53b4c 100644
--- a/src/shared/battle/Battle/View/Attribute.elm
+++ b/src/shared/battle/Battle/View/Attribute.elm
@@ -41,6 +41,13 @@ 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)
@@ -53,32 +60,12 @@ get_html attribute 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)
- )
- )
- ]
+ (Html.text
+ (
+ if (Battle.Struct.Attributes.is_percent attribute)
+ then ((String.fromInt value) ++ "%")
+ else (String.fromInt value)
+ )
)
]
)
@@ -96,6 +83,13 @@ 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)
@@ -103,40 +97,20 @@ get_signed_html attribute value =
)
]
[
- (Html.div
- [
- (Html.Attributes.class "omnimod-icon"),
- (Html.Attributes.class
- (
- "omnimod-icon-"
- ++ (Battle.Struct.Attributes.encode_category attribute)
- )
+ (Html.text
+ (
+ (
+ if (value > 0)
+ then ("+" ++ (String.fromInt value))
+ else (String.fromInt value)
)
- ]
- [
- ]
- ),
- (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 ""
- )
- )
+ ++
+ (
+ if (Battle.Struct.Attributes.is_percent attribute)
+ then "%"
+ else ""
)
- ]
+ )
)
]
)