summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-05-03 11:08:16 +0200
committernsensfel <SpamShield0@noot-noot.org>2019-05-03 11:08:16 +0200
commit8bcf0d47a363ef0c45b7fbcbc95fb770aecc20c0 (patch)
tree26fbe4efffb479056607e2d2e6eea4e9e3e1e699 /src/battle
parent6b6e1a9d6e1ed475d108a75a618d4a60544482e5 (diff)
Adds some help for stats & attributes.
Diffstat (limited to 'src/battle')
-rw-r--r--src/battle/src/View/Controlled/CharacterCard.elm36
-rw-r--r--src/battle/src/View/MessageBoard/Help.elm10
2 files changed, 43 insertions, 3 deletions
diff --git a/src/battle/src/View/Controlled/CharacterCard.elm b/src/battle/src/View/Controlled/CharacterCard.elm
index 19155f3..2416323 100644
--- a/src/battle/src/View/Controlled/CharacterCard.elm
+++ b/src/battle/src/View/Controlled/CharacterCard.elm
@@ -75,7 +75,17 @@ get_health_bar char =
(Battle.View.Gauge.get_html
("HP: " ++ (String.fromInt current) ++ "/" ++ (String.fromInt max))
(100.0 * ((toFloat current)/(toFloat max)))
- [(Html.Attributes.class "character-card-health")]
+ [
+ (Html.Attributes.class "character-card-health"),
+ (Html.Attributes.class "clickable"),
+ (Html.Events.onClick
+ (Struct.Event.RequestedHelp
+ (Struct.HelpRequest.Statistic
+ Battle.Struct.Statistics.MaxHealth
+ )
+ )
+ )
+ ]
[]
[]
)
@@ -145,7 +155,17 @@ get_active_movement_bar maybe_navigator char =
(Battle.View.Gauge.get_html
("MP: " ++ (String.fromInt current) ++ "/" ++ (String.fromInt max))
(100.0 * ((toFloat current)/(toFloat max)))
- [(Html.Attributes.class "character-card-movement")]
+ [
+ (Html.Attributes.class "character-card-movement"),
+ (Html.Attributes.class "clickable"),
+ (Html.Events.onClick
+ (Struct.Event.RequestedHelp
+ (Struct.HelpRequest.Statistic
+ Battle.Struct.Statistics.MovementPoints
+ )
+ )
+ )
+ ]
[]
[]
)
@@ -166,7 +186,17 @@ get_inactive_movement_bar char =
(Battle.View.Gauge.get_html
( "MP: " ++ (String.fromInt max))
100.0
- [(Html.Attributes.class "character-card-movement")]
+ [
+ (Html.Attributes.class "character-card-movement"),
+ (Html.Attributes.class "clickable"),
+ (Html.Events.onClick
+ (Struct.Event.RequestedHelp
+ (Struct.HelpRequest.Statistic
+ Battle.Struct.Statistics.MovementPoints
+ )
+ )
+ )
+ ]
[]
[]
)
diff --git a/src/battle/src/View/MessageBoard/Help.elm b/src/battle/src/View/MessageBoard/Help.elm
index 68d6136..9511f96 100644
--- a/src/battle/src/View/MessageBoard/Help.elm
+++ b/src/battle/src/View/MessageBoard/Help.elm
@@ -4,6 +4,10 @@ module View.MessageBoard.Help exposing (get_html)
import Html
import Html.Attributes
+-- Battle ----------------------------------------------------------------------
+import Battle.View.Help.Attribute
+import Battle.View.Help.Statistic
+
-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.HelpRequest
@@ -34,6 +38,12 @@ get_html model =
(Struct.HelpRequest.Rank rank) ->
(View.MessageBoard.Help.Rank.get_html_contents rank)
+ (Struct.HelpRequest.Attribute att_cat) ->
+ (Battle.View.Help.Attribute.get_html_contents att_cat)
+
+ (Struct.HelpRequest.Statistic stat_cat) ->
+ (Battle.View.Help.Statistic.get_html_contents stat_cat)
+
_ -> [(Html.text "Help is not available for this, yet.")]
)
)