Separate out input datatype
This commit is contained in:
@@ -141,7 +141,7 @@ subInventoryDisplay subinv cfig w = case subinv of
|
||||
selcursor' ct = fromMaybe mempty $ ct 0 0 cfig curpos itcol (determineInvSelCursorWidth w) cury <$ it
|
||||
selcursor = selcursor' selcursortype
|
||||
selcursortype
|
||||
| ButtonRight `M.member` _mouseButtons w = listCursorNESW
|
||||
| ButtonRight `M.member` _mouseButtons (_input w) = listCursorNESW
|
||||
| otherwise = listCursorNSW
|
||||
curpos = invSelPos w
|
||||
cury = fromMaybe 1 $ augmentedInvSizes w IM.!? crSel (you w)
|
||||
@@ -151,7 +151,7 @@ subInventoryDisplay subinv cfig w = case subinv of
|
||||
equipcursors = IM.foldMapWithKey (f yellow) (_crInvEquipped cr)
|
||||
f col invid epos = listTextPictureAt 144 0 cfig (selNumPos invid w) . color col $ text $ eqPosText epos
|
||||
rboptions =
|
||||
if ButtonRight `M.member` _mouseButtons w
|
||||
if ButtonRight `M.member` _mouseButtons (_input w)
|
||||
then drawRBOptions cfig w (_rbOptions w)
|
||||
else mempty
|
||||
|
||||
@@ -277,7 +277,7 @@ determineInvSelCursorWidth :: World -> Int
|
||||
determineInvSelCursorWidth w = case _rbOptions w of
|
||||
NoRightButtonOptions -> topInvW
|
||||
EquipOptions{} ->
|
||||
if ButtonRight `M.member` _mouseButtons w
|
||||
if ButtonRight `M.member` _mouseButtons (_input w)
|
||||
then 47
|
||||
else topInvW
|
||||
|
||||
|
||||
@@ -46,6 +46,6 @@ drawConcurrentMessage u = case u ^. uvConcEffects of
|
||||
customMouseCursor :: Configuration -> World -> Picture
|
||||
customMouseCursor cfig w =
|
||||
winScale cfig
|
||||
. uncurryV translate (_mousePos w)
|
||||
. uncurryV translate (_mousePos (_input w))
|
||||
. color white
|
||||
$ pictures [line [V2 (-5) 0, V2 5 0], line [V2 0 (-5), V2 0 5]]
|
||||
|
||||
@@ -194,7 +194,7 @@ drawCollisionTest cfig w =
|
||||
<> foldMap (drawZoneCol yellow crZoneSize . zoneOfPoint crZoneSize) (yIntercepts' crZoneSize a b)
|
||||
<> foldMap (drawLabCrossCol cfig cam blue) (xIntercepts crZoneSize a b)
|
||||
where
|
||||
(a, b) = _lrLine w
|
||||
(a, b) = _lrLine (_input w)
|
||||
cam = w ^. cWorld . lWorld . camPos
|
||||
|
||||
drawCreatureDisplayTexts :: World -> Picture
|
||||
@@ -210,8 +210,8 @@ drawPathBetween w =
|
||||
where
|
||||
nodepos = (`getNodePos` w)
|
||||
nodelist = makePathBetween sp ep w
|
||||
sp = _lSelect w
|
||||
ep = _rSelect w
|
||||
sp = _lSelect (_input w)
|
||||
ep = _rSelect (_input w)
|
||||
|
||||
--drawNodesNearSelect :: World -> Picture
|
||||
--drawNodesNearSelect w =
|
||||
@@ -229,7 +229,7 @@ drawInspectWalls w =
|
||||
IM.elems $ w ^. cWorld . lWorld . walls
|
||||
)
|
||||
where
|
||||
(a, b) = _lLine w
|
||||
(a, b) = _lLine (_input w)
|
||||
|
||||
drawInspectWall :: World -> Wall -> Picture
|
||||
drawInspectWall w wl =
|
||||
@@ -262,8 +262,8 @@ drawWorldSelect w =
|
||||
color cyan (line [a, b])
|
||||
<> color magenta (line [c, d])
|
||||
where
|
||||
(a, b) = _lLine w
|
||||
(c, d) = _rLine w
|
||||
(a, b) = _lLine (_input w)
|
||||
(c, d) = _rLine (_input w)
|
||||
|
||||
drawFarWallDetect :: World -> Picture
|
||||
drawFarWallDetect w =
|
||||
|
||||
Reference in New Issue
Block a user