From 33e57128d48a012533c42635f52037fcdedd4c56 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Tue, 26 Sep 2017 19:13:04 +0200 Subject: Range indicators are now clickable. --- client/elm/battlemap/src/Model.elm | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'client/elm/battlemap/src/Model.elm') diff --git a/client/elm/battlemap/src/Model.elm b/client/elm/battlemap/src/Model.elm index f5f57c0..4303b6f 100644 --- a/client/elm/battlemap/src/Model.elm +++ b/client/elm/battlemap/src/Model.elm @@ -1,4 +1,4 @@ -module Model exposing (Type, State(..)) +module Model exposing (Type, CharacterSelection, State(..)) import Dict @@ -7,22 +7,32 @@ import Battlemap.Navigator import Battlemap.Location import Battlemap.RangeIndicator +import Error + import Character +type alias CharacterSelection = + { + character: Character.Ref, + navigator: Battlemap.Navigator.Type, + range_indicator: + (Dict.Dict + Battlemap.Location.Ref + Battlemap.RangeIndicator.Type + ) + } + type State = Default - | MovingCharacter Character.Ref + | Error Error.Type + | MovingCharacterWithButtons + | MovingCharacterWithClick + | FocusingTile --- MODEL type alias Type = { state: State, battlemap: Battlemap.Type, - navigator: (Maybe Battlemap.Navigator.Type), characters: (Dict.Dict Character.Ref Character.Type), - range_indicator: - (Dict.Dict - Battlemap.Location.Ref - Battlemap.RangeIndicator.Type - ) + selection: (Maybe CharacterSelection) } -- cgit v1.2.3-70-g09d2