Centralise mouse context data
This commit is contained in:
@@ -82,10 +82,10 @@ mouseCursorType u
|
||||
| isselect = drawPlus 5
|
||||
| Just tmid <- u ^? uvWorld . hud . hudElement . subInventory . termID = determineTermCursor tmid u
|
||||
| Just csel <- u ^? uvWorld . hud . hudElement . subInventory . ciSelection =
|
||||
if ( csel == u ^? uvWorld . hud . hudElement . subInventory . ciMouseOver . _Just
|
||||
|| null (u ^? uvWorld . hud . hudElement . subInventory . ciMouseOver . _Just)
|
||||
if ( csel == u ^? uvWorld . input . mouseContext . mcoCombInv
|
||||
|| null (u ^? uvWorld . input . mouseContext . mcoCombInv)
|
||||
)
|
||||
&& null (u ^? uvWorld . hud . hudElement . diMouseOver . _Just)
|
||||
&& null (u ^? uvWorld . input . mouseContext . mcoInv)
|
||||
&& fmap fst csel /= Just (-1)
|
||||
&& fromMaybe True (u ^? uvWorld . hud . hudElement . subInventory . ciSections . ix 0 . ssItems . ix 0 . siIsSelectable) --HACK to check there is something creatable
|
||||
then drawGapPlus 5
|
||||
@@ -94,7 +94,7 @@ mouseCursorType u
|
||||
where
|
||||
isselect =
|
||||
not (null $ u ^. uvScreenLayers)
|
||||
|| not (null $ u ^? uvWorld . hud . hudElement . diMouseOver . _Just)
|
||||
|| not (null $ u ^? uvWorld . input . mouseContext . mcoInv)
|
||||
w = u ^. uvWorld
|
||||
a = fromMaybe 0 $ do
|
||||
cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos
|
||||
|
||||
Reference in New Issue
Block a user