From d222161a5bcce5c0f2848d9714ab509b4ba957ff Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Sun, 30 Jan 2022 12:27:36 +0100 Subject: Seems to be working. --- src/View/PlayerInput.elm | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) (limited to 'src/View/PlayerInput.elm') diff --git a/src/View/PlayerInput.elm b/src/View/PlayerInput.elm index e8004f4..da3162c 100644 --- a/src/View/PlayerInput.elm +++ b/src/View/PlayerInput.elm @@ -71,9 +71,18 @@ get_html model = ), (Html.Attributes.max (String.fromFloat model.ui.max_float) - ) + ), + (Html.Events.onInput (Struct.Event.UserInputInProgress)) + ] + [ ] + ), + (Html.button [ + (Html.Events.onClick (Struct.Event.UserInputValidated)) + ] + [ + (Html.text "OK") ] ) ] @@ -105,9 +114,18 @@ get_html model = [ (Html.Attributes.class "tonkadur-input-field"), (Html.Attributes.min (String.fromInt model.ui.min)), - (Html.Attributes.max (String.fromInt model.ui.max)) + (Html.Attributes.max (String.fromInt model.ui.max)), + (Html.Events.onInput (Struct.Event.UserInputInProgress)) + ] + [ + ] + ), + (Html.button + [ + (Html.Events.onClick (Struct.Event.UserInputValidated)) ] [ + (Html.text "OK") ] ) ] @@ -139,9 +157,18 @@ get_html model = [ (Html.Attributes.class "tonkadur-input-field"), (Html.Attributes.minlength model.ui.min), - (Html.Attributes.maxlength model.ui.max) + (Html.Attributes.maxlength model.ui.max), + (Html.Events.onInput (Struct.Event.UserInputInProgress)) + ] + [ + ] + ), + (Html.button + [ + (Html.Events.onClick (Struct.Event.UserInputValidated)) ] [ + (Html.text "OK") ] ) ] @@ -174,9 +201,18 @@ get_html model = [ (Html.Attributes.class "tonkadur-input-field"), (Html.Attributes.minlength model.ui.min), - (Html.Attributes.maxlength model.ui.max) + (Html.Attributes.maxlength model.ui.max), + (Html.Events.onInput (Struct.Event.UserInputInProgress)) + ] + [ + ] + ), + (Html.button + [ + (Html.Events.onClick (Struct.Event.UserInputValidated)) ] [ + (Html.text "OK") ] ) ] -- cgit v1.2.3-70-g09d2