summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-07-13 17:57:01 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-07-13 17:57:01 +0200
commit9a86bc7064fed626ecd1d3f03c7af30a5ef246c8 (patch)
tree01048538f5745065f603e14d089499e3ce0dc37f /src/map-editor/src/Update/SetToolboxShape.elm
parentbb65777eca64d868a578d6abdbf054fb05d5d99f (diff)
Got the rectangle mode to work.
Diffstat (limited to 'src/map-editor/src/Update/SetToolboxShape.elm')
-rw-r--r--src/map-editor/src/Update/SetToolboxShape.elm25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/map-editor/src/Update/SetToolboxShape.elm b/src/map-editor/src/Update/SetToolboxShape.elm
new file mode 100644
index 0000000..c0bd273
--- /dev/null
+++ b/src/map-editor/src/Update/SetToolboxShape.elm
@@ -0,0 +1,25 @@
+module Update.SetToolboxShape exposing (apply_to)
+-- Elm -------------------------------------------------------------------------
+
+-- Battlemap -------------------------------------------------------------------
+import Struct.Event
+import Struct.Toolbox
+import Struct.Model
+
+--------------------------------------------------------------------------------
+-- LOCAL -----------------------------------------------------------------------
+--------------------------------------------------------------------------------
+
+--------------------------------------------------------------------------------
+-- EXPORTED --------------------------------------------------------------------
+--------------------------------------------------------------------------------
+apply_to : (
+ Struct.Model.Type ->
+ Struct.Toolbox.Shape ->
+ (Struct.Model.Type, (Cmd Struct.Event.Type))
+ )
+apply_to model shape =
+ (
+ {model | toolbox = (Struct.Toolbox.set_shape shape model.toolbox)},
+ Cmd.none
+ )