From 0d5fba42a1597e5a43266c071776e7acf58071e2 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Thu, 21 Sep 2017 16:32:09 +0200 Subject: Adds movement points, indicator for current char. --- client/elm/battlemap/src/View.elm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'client/elm/battlemap/src/View.elm') diff --git a/client/elm/battlemap/src/View.elm b/client/elm/battlemap/src/View.elm index d0cb8c8..50fa563 100644 --- a/client/elm/battlemap/src/View.elm +++ b/client/elm/battlemap/src/View.elm @@ -9,6 +9,7 @@ import Model exposing (Model) import Battlemap.Html as Batmap exposing (view) import Battlemap.Direction exposing (Direction(..)) +import Dict as Dt exposing (get) -- VIEW view : Model -> (Html Msg) @@ -39,6 +40,30 @@ view model = (div [] [(Batmap.view model)] + ), + (div + [] + [ + (text + (case (model.selection, model.navigator) of + (Nothing, _) -> "" + (_, Nothing) -> "" + ((Just char_id), (Just nav)) -> + case (Dt.get char_id model.characters) of + Nothing -> "" + (Just char) -> + ( + "Controlling " + ++ char.name + ++ ": " + ++ (toString nav.remaining_points) + ++ "/" + ++ (toString char.movement_points) + ++ " movement points remaining." + ) + ) + ) + ] ) ] ) -- cgit v1.2.3-70-g09d2