From c9786fd27954c79faf901963003a8b7b3131ca4c Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Fri, 15 Sep 2017 17:41:07 +0200 Subject: Adds UI to test the Navigator. --- client/elm/battlemap/src/View.elm | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (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 f4774c7..7058681 100644 --- a/client/elm/battlemap/src/View.elm +++ b/client/elm/battlemap/src/View.elm @@ -3,10 +3,11 @@ module View exposing (view) import Html exposing (Html, button, div, text, table, tr, td) import Html.Events exposing (onClick) -import Update exposing (Msg(Increment, Decrement)) +import Update exposing (..) import Model exposing (Model) import Battlemap.Html as Batmap exposing (view) +import Battlemap.Direction exposing (..) -- VIEW @@ -16,16 +17,20 @@ view model = [] [ (button - [ (onClick Decrement) ] - [ (text "-") ] + [ (onClick (DirectionRequest Left)) ] + [ (text "Left") ] ), - (div - [] - [ (text (toString model)) ] + (button + [ (onClick (DirectionRequest Down)) ] + [ (text "Down") ] + ), + (button + [ (onClick (DirectionRequest Up)) ] + [ (text "Up") ] ), (button - [ (onClick Increment) ] - [ (text "+") ] + [ (onClick (DirectionRequest Right)) ] + [ (text "Right") ] ), (div [] -- cgit v1.2.3-70-g09d2