Separate out input datatype

This commit is contained in:
2022-10-29 11:36:57 +01:00
parent 82e2a5a234
commit af6cdff063
19 changed files with 160 additions and 112 deletions
+14 -9
View File
@@ -9,27 +9,32 @@ import Geometry.Polygon
import qualified IntMapHelp as IM
import System.Random
defaultWorld :: World
defaultWorld =
World
{ _cWorld = defaultCWorld
, _clickMousePos = V2 0 0
, _toPlaySounds = M.empty
, _playingSounds = M.empty
, _randGen = mkStdGen 2
defaultInput :: Input
defaultInput = Input
{ _clickMousePos = V2 0 0
, _keys = S.empty
, _mouseButtons = mempty
, _mousePos = V2 0 0
, _scrollAmount = 0
, _previousScrollAmount = 0
, _hammers = defaultWorldHammers
, _testFloat = 0
, _lrLine = (0, 0)
, _lLine = (0, 0)
, _rLine = (0, 0)
, _lSelect = 0
, _rSelect = 0
, _backspaceTimer = 0
}
defaultWorld :: World
defaultWorld =
World
{ _cWorld = defaultCWorld
, _input = defaultInput
, _toPlaySounds = M.empty
, _playingSounds = M.empty
, _randGen = mkStdGen 2
, _testFloat = 0
, _rbOptions = NoRightButtonOptions
}