From 18ebe6e6ca4299b7f903426502c5a5fb73747c81 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Mon, 27 Dec 2021 22:32:32 +0100 Subject: ... --- src/ElmModule/Update.elm | 4 ++++ src/ElmModule/View.elm | 14 ++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'src/ElmModule') diff --git a/src/ElmModule/Update.elm b/src/ElmModule/Update.elm index a4b827a..3dbad82 100644 --- a/src/ElmModule/Update.elm +++ b/src/ElmModule/Update.elm @@ -6,6 +6,8 @@ module ElmModule.Update exposing (update) import Struct.Event import Struct.Model +import Update.Story + -------------------------------------------------------------------------------- -- LOCAL ----------------------------------------------------------------------- -------------------------------------------------------------------------------- @@ -21,3 +23,5 @@ update : ( update event model = case event of Struct.Event.None -> (model, Cmd.none) + (Struct.Event.ChoiceSelected ix) -> + ((Update.Story.select_choice ix model), Cmd.none) diff --git a/src/ElmModule/View.elm b/src/ElmModule/View.elm index fb99b89..f93928c 100644 --- a/src/ElmModule/View.elm +++ b/src/ElmModule/View.elm @@ -8,6 +8,7 @@ import Html.Attributes import Struct.Event import Struct.Model +import View.PlayerInput -------------------------------------------------------------------------------- -- LOCAL ----------------------------------------------------------------------- -------------------------------------------------------------------------------- @@ -22,5 +23,18 @@ view model = (Html.Attributes.class "fullscreen-module") ] [ + (Html.div + [ + (Html.Attributes.class "tonkadur-errors") + ] + model.ui.displayed_errors + ), + (Html.div + [ + (Html.Attributes.class "tonkadur-texts") + ] + model.ui.displayed_texts + ), + (View.PlayerInput.get_html model) ] ) -- cgit v1.2.3-70-g09d2