aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-12-28 18:48:18 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-12-28 18:48:18 +0100
commit3e338edd3d3a5bde1ea738f197762360c125261c (patch)
tree639bef4b66eb689e88d0df3206442984d0bd238c
parent7e38eda602e083a4f9d978fcc5ad93a3b17c6a1b (diff)
downloadtacticians-client-3e338edd3d3a5bde1ea738f197762360c125261c.zip
tacticians-client-3e338edd3d3a5bde1ea738f197762360c125261c.tar.bz2
Improves the footer's text.
-rw-r--r--src/battlemap/src/View/Footer.elm57
1 files changed, 49 insertions, 8 deletions
diff --git a/src/battlemap/src/View/Footer.elm b/src/battlemap/src/View/Footer.elm
index 35c1be3..a607b14 100644
--- a/src/battlemap/src/View/Footer.elm
+++ b/src/battlemap/src/View/Footer.elm
@@ -28,6 +28,26 @@ end_turn_button =
[ (Html.text "End Turn") ]
)
+get_navigator_info : (
+ Struct.Model.Type ->
+ Struct.Character.Type->
+ String
+ )
+get_navigator_info model char =
+ case
+ (Struct.CharacterTurn.try_getting_navigator model.char_turn)
+ of
+ (Just nav) ->
+ (
+ (toString (Struct.Navigator.get_remaining_points nav))
+ ++ "/"
+ ++ (toString (Struct.Character.get_movement_points char))
+ ++ " movement points remaining"
+ )
+
+ _ ->
+ "[Error: Unknown character selected.]"
+
get_curr_char_info_htmls : (
Struct.Model.Type ->
Struct.Character.Ref ->
@@ -36,21 +56,42 @@ get_curr_char_info_htmls : (
get_curr_char_info_htmls model char_ref =
case
(
- (Dict.get char_ref model.characters),
- (Struct.CharacterTurn.try_getting_navigator model.char_turn)
+ (Struct.CharacterTurn.get_state model.char_turn),
+ (Dict.get char_ref model.characters)
)
of
- ((Just char), (Just nav)) ->
+ (Struct.CharacterTurn.SelectedCharacter, (Just char)) ->
+ [
+ (Html.text
+ (
+ "Controlling "
+ ++ char.name
+ ++ ". Moving ("
+ ++ (get_navigator_info model char)
+ ++ ")."
+ )
+ )
+ ]
+
+ (Struct.CharacterTurn.MovedCharacter, (Just char)) ->
+ [
+ (Html.text
+ (
+ "Controlling "
+ ++ char.name
+ ++ ". Moved. Select targets or "
+ )
+ ),
+ (end_turn_button)
+ ]
+
+ (Struct.CharacterTurn.ChoseTarget, (Just char)) ->
[
(Html.text
(
"Controlling "
++ char.name
- ++ ": "
- ++ (toString (Struct.Navigator.get_remaining_points nav))
- ++ "/"
- ++ (toString (Struct.Character.get_movement_points char))
- ++ " movement points remaining."
+ ++ ". Moved. Chose target(s). Select additional targets or "
)
),
(end_turn_button)