From 0075abf51db5d1b54117525d7a7f9b06e31c9484 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Tue, 17 Mar 2015 21:26:40 +0100 Subject: Adding an edition mode for a timer --- src/Main.elm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/Main.elm') diff --git a/src/Main.elm b/src/Main.elm index c2a7519..c2a327b 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -5,8 +5,12 @@ module Main import Signal import Html (Html) import Time (..) +import Mouse +import Debug +import Json.Encode (Value) import Model.Model (..) +import Model.Position (..) import Update.Update (..) import View.View (view) @@ -21,6 +25,15 @@ input = Signal.mergeMany [ Signal.subscribe updates , Signal.map DeltaTime (fps 30) + , Signal.map (\_ -> ReadOnly) clickAway ] +port clickPosition : Signal Value +port clickPosition = + Signal.sampleOn + Mouse.clicks + (Signal.map positionEncoder Mouse.position) + +port clickAway : Signal () + port initialTime : Time -- cgit v1.2.3