summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-04-10 18:36:35 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-04-10 18:36:35 +0200
commit3827717765a0ff4b73c954183b3c5b9ed7145712 (patch)
treef53f0014967c53be693e6205faf794938418b3c9 /src/battlemap
parente2b2d82e6b5e1cb7295ea8df609450ed983ad87b (diff)
Puts path below markers when it is locked.
Still not happy with the head of the path arrow though.
Diffstat (limited to 'src/battlemap')
-rw-r--r--src/battlemap/src/Struct/Navigator.elm6
-rw-r--r--src/battlemap/src/View/Battlemap/Navigator.elm15
-rw-r--r--src/battlemap/www/style.css7
3 files changed, 21 insertions, 7 deletions
diff --git a/src/battlemap/src/Struct/Navigator.elm b/src/battlemap/src/Struct/Navigator.elm
index 18bf9e3..a0640e0 100644
--- a/src/battlemap/src/Struct/Navigator.elm
+++ b/src/battlemap/src/Struct/Navigator.elm
@@ -47,7 +47,8 @@ type alias Summary =
{
starting_location: Struct.Location.Type,
path: (List Struct.Direction.Type),
- markers: (List (Struct.Location.Ref, Struct.Marker.Type))
+ markers: (List (Struct.Location.Ref, Struct.Marker.Type)),
+ locked_path: Bool
}
--------------------------------------------------------------------------------
@@ -124,7 +125,8 @@ get_summary navigator =
(Dict.toList
navigator.range_indicators
)
- )
+ ),
+ locked_path = navigator.locked_path
}
clear_path : Type -> Type
diff --git a/src/battlemap/src/View/Battlemap/Navigator.elm b/src/battlemap/src/View/Battlemap/Navigator.elm
index 18bcb38..d400659 100644
--- a/src/battlemap/src/View/Battlemap/Navigator.elm
+++ b/src/battlemap/src/View/Battlemap/Navigator.elm
@@ -81,6 +81,7 @@ marker_get_html is_interactive (loc_ref, marker) =
)
path_node_get_html : (
+ Bool ->
Struct.Direction.Type ->
(
Struct.Location.Type,
@@ -93,7 +94,7 @@ path_node_get_html : (
(List (Html.Html Struct.Event.Type))
)
)
-path_node_get_html next_dir (curr_loc, curr_dir, curr_nodes) =
+path_node_get_html is_below_markers next_dir (curr_loc, curr_dir, curr_nodes) =
(
(Struct.Location.neighbor curr_loc next_dir),
next_dir,
@@ -101,6 +102,15 @@ path_node_get_html next_dir (curr_loc, curr_dir, curr_nodes) =
(Html.div
[
(Html.Attributes.class "battlemap-path-icon"),
+ (Html.Attributes.class
+ (
+ if (is_below_markers)
+ then
+ "battlemap-path-icon-below-markers"
+ else
+ "battlemap-path-icon-above-markers"
+ )
+ ),
(Html.Attributes.class "battlemap-tiled"),
(Html.Attributes.class
(
@@ -154,6 +164,7 @@ mark_the_spot loc origin_dir =
(Html.div
[
(Html.Attributes.class "battlemap-path-icon"),
+ (Html.Attributes.class "battlemap-path-icon-above-markers"),
(Html.Attributes.class "battlemap-tiled"),
(Html.Attributes.class
(
@@ -200,7 +211,7 @@ get_html nav_summary is_interactive =
let
(final_loc, final_dir, path_node_htmls) =
(List.foldr
- (path_node_get_html)
+ (path_node_get_html nav_summary.locked_path)
(nav_summary.starting_location, Struct.Direction.None, [])
nav_summary.path
)
diff --git a/src/battlemap/www/style.css b/src/battlemap/www/style.css
index a719e51..6d30f80 100644
--- a/src/battlemap/www/style.css
+++ b/src/battlemap/www/style.css
@@ -206,9 +206,10 @@
.battlemap-tile-variant-8 {background-position: 64px 64px;}
.battlemap-tile-icon {z-index: 0; position: absolute; background-size: 96px 96px;}
-.battlemap-marker-icon {z-index: 1;}
-.battlemap-path-icon {z-index: 2;}
-.battlemap-character-icon {z-index: 3;}
+.battlemap-path-icon-below-markers {z-index: 1;}
+.battlemap-marker-icon {z-index: 2;}
+.battlemap-path-icon-above-markers {z-index: 3;}
+.battlemap-character-icon {z-index: 4;}
.battlemap-marker-icon,
.battlemap-character-icon,