summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-06-11 18:25:04 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-06-11 18:25:04 +0200
commit944ce62360fe4c195b80d45ce529586cc78c6341 (patch)
treeab36cc5f38ab6fa15b34e77a79a32a7f845b51a7 /src/battlemap
parentd8519a3ded5576a86ff989f9531e443608d75c0a (diff)
Displayed nav goes away more easily.
Also, I am trying to find nice ways to convey the "attack", "go to", and "can't defend" tiles, so that it look okay when superposing the navigator of the controlled character with the one of the focused character.
Diffstat (limited to 'src/battlemap')
-rw-r--r--src/battlemap/src/Struct/Model.elm5
-rw-r--r--src/battlemap/src/Update/SelectTile.elm36
2 files changed, 25 insertions, 16 deletions
diff --git a/src/battlemap/src/Struct/Model.elm b/src/battlemap/src/Struct/Model.elm
index e49ab1c..b954c68 100644
--- a/src/battlemap/src/Struct/Model.elm
+++ b/src/battlemap/src/Struct/Model.elm
@@ -99,7 +99,10 @@ reset characters model =
{model |
characters = characters,
error = Nothing,
- ui = (Struct.UI.set_previous_action Nothing model.ui),
+ ui =
+ (Struct.UI.reset_displayed_nav
+ (Struct.UI.set_previous_action Nothing model.ui)
+ ),
char_turn = (Struct.CharacterTurn.new)
}
diff --git a/src/battlemap/src/Update/SelectTile.elm b/src/battlemap/src/Update/SelectTile.elm
index fc6db27..7081d16 100644
--- a/src/battlemap/src/Update/SelectTile.elm
+++ b/src/battlemap/src/Update/SelectTile.elm
@@ -64,11 +64,13 @@ go_to_tile model navigator loc_ref =
(
{model |
ui =
- (Struct.UI.set_displayed_tab
- Struct.UI.StatusTab
- (Struct.UI.set_previous_action
- (Just (Struct.UI.SelectedLocation loc_ref))
- model.ui
+ (Struct.UI.reset_displayed_nav
+ (Struct.UI.set_displayed_tab
+ Struct.UI.StatusTab
+ (Struct.UI.set_previous_action
+ (Just (Struct.UI.SelectedLocation loc_ref))
+ model.ui
+ )
)
)
},
@@ -99,11 +101,13 @@ go_to_tile model navigator loc_ref =
model.char_turn
),
ui =
- (Struct.UI.set_displayed_tab
- Struct.UI.StatusTab
- (Struct.UI.set_previous_action
- (Just (Struct.UI.SelectedLocation loc_ref))
- model.ui
+ (Struct.UI.reset_displayed_nav
+ (Struct.UI.set_displayed_tab
+ Struct.UI.StatusTab
+ (Struct.UI.set_previous_action
+ (Just (Struct.UI.SelectedLocation loc_ref))
+ model.ui
+ )
)
)
},
@@ -142,11 +146,13 @@ apply_to model loc_ref =
(
{model |
ui =
- (Struct.UI.set_displayed_tab
- Struct.UI.StatusTab
- (Struct.UI.set_previous_action
- (Just (Struct.UI.SelectedLocation loc_ref))
- model.ui
+ (Struct.UI.reset_displayed_nav
+ (Struct.UI.set_displayed_tab
+ Struct.UI.StatusTab
+ (Struct.UI.set_previous_action
+ (Just (Struct.UI.SelectedLocation loc_ref))
+ model.ui
+ )
)
)
},