Start unifying drawn cursors
This commit is contained in:
@@ -3,6 +3,7 @@ module Dodge.Render.HUD (
|
||||
hudDrawings,
|
||||
) where
|
||||
|
||||
import Dodge.Data.CardinalPoint
|
||||
import Dodge.Data.SelectionList
|
||||
import Control.Lens
|
||||
import qualified Data.Map.Strict as M
|
||||
@@ -26,6 +27,7 @@ import ListHelp
|
||||
import Padding
|
||||
import Picture
|
||||
import SDL (MouseButton (..))
|
||||
import qualified Data.Set as Set
|
||||
|
||||
hudDrawings :: Universe -> Picture
|
||||
hudDrawings uv = case w ^. cWorld . lWorld . hud . hudElement of
|
||||
@@ -96,13 +98,13 @@ inventoryDisplay :: SubInventory -> Configuration -> World -> Picture
|
||||
inventoryDisplay subinv cfig w = drawSelectionList cfig $
|
||||
defaultSelectionList & slItems .~ inventorySelectionList w
|
||||
& slWidth .~ FixedSelectionWidth topInvW
|
||||
& slCursorType .~ selcursortype
|
||||
& slCursorType .~ BorderCursor (Set.fromList selcursortype)
|
||||
& slSelPos .~ inventoryCursorPos subinv w
|
||||
& slWidth .~ FixedSelectionWidth (determineInvSelCursorWidth w)
|
||||
where
|
||||
selcursortype
|
||||
| ButtonRight `M.member` _mouseButtons (_input w) = NSEWCursor
|
||||
| otherwise = NSWCursor
|
||||
| ButtonRight `M.member` _mouseButtons (_input w) = [North,South,East,West]
|
||||
| otherwise = [North,South,West]
|
||||
|
||||
subInventoryDisplay :: SubInventory -> Configuration -> World -> Picture
|
||||
subInventoryDisplay subinv cfig w = case subinv of
|
||||
|
||||
Reference in New Issue
Block a user