Fix mouse selection in menus

This commit is contained in:
2023-05-10 12:37:36 +01:00
parent cc42a5e124
commit 69fbf5926a
5 changed files with 16 additions and 24 deletions
+11 -6
View File
@@ -3,6 +3,7 @@ module Dodge.ListDisplayParams
, secondColumnParams
, subInvX
, defaultListDisplayParams
, optionListDisplayParams
) where
import Dodge.Data.ScreenPos
@@ -51,12 +52,6 @@ subInvX = 9 * fromIntegral topInvW + 50
topInvW :: Int
topInvW = 15
--thirdColumnParams :: ListDisplayParams
--thirdColumnParams =
-- defaultListDisplayParams
-- & ldpPosX .~ 9 * fromIntegral topInvW + 275
-- & ldpPosY .~ 60
determineInvSelCursorWidth :: World -> Int
determineInvSelCursorWidth w = case _rbOptions w of
NoRightButtonOptions -> topInvW
@@ -69,3 +64,13 @@ determineInvSelCursorWidth w = case _rbOptions w of
hasnosubinv = case w ^? hud . hudElement . subInventory of
Just NoSubInventory -> True
_ -> False
optionListDisplayParams :: ListDisplayParams
optionListDisplayParams =
defaultListDisplayParams
& ldpPos . spPixelOff .~ V2 11 (-70)
& ldpScale .~ 2
& ldpVerticalGap .~ 0
& ldpWidth .~ FixedSelectionWidth 25
& ldpCursorSides .~ [North, South, West]