Remove equality derivation for hud elements
This commit is contained in:
@@ -16,7 +16,7 @@ data HUDElement
|
||||
{ _subInventory :: SubInventory
|
||||
}
|
||||
| DisplayCarte
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data SubInventory
|
||||
= NoSubInventory
|
||||
@@ -25,7 +25,7 @@ data SubInventory
|
||||
, _subInvRegexInput :: Bool}
|
||||
| LockedInventory
|
||||
| DisplayTerminal {_termID :: Int}
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data HUD = HUD
|
||||
{ _hudElement :: HUDElement
|
||||
|
||||
@@ -8,7 +8,6 @@ import qualified Data.Map.Strict as M
|
||||
import Dodge.Data.CWorld
|
||||
import Geometry.Data
|
||||
import SDL (MouseButton, Scancode)
|
||||
import qualified Data.Text as T
|
||||
|
||||
data PressType = InitialPress
|
||||
| ShortPress
|
||||
|
||||
@@ -18,7 +18,6 @@ import Control.Lens
|
||||
--import qualified Data.Map.Strict as M
|
||||
import Data.Preload
|
||||
import Data.Sequence (Seq (..))
|
||||
import qualified Data.Text as T
|
||||
import Dodge.Data.Config
|
||||
import Dodge.Data.World
|
||||
import Loop.Data
|
||||
|
||||
@@ -328,9 +328,13 @@ determineInvSelCursorWidth w = case _rbOptions w of
|
||||
NoRightButtonOptions -> topInvW
|
||||
EquipOptions{}
|
||||
| ButtonRight `M.member` _mouseButtons (_input w)
|
||||
&& w ^? hud . hudElement . subInventory == Just NoSubInventory ->
|
||||
&& hasnosubinv ->
|
||||
47
|
||||
| otherwise -> topInvW
|
||||
where
|
||||
hasnosubinv = case w ^? hud . hudElement . subInventory of
|
||||
Just NoSubInventory -> True
|
||||
_ -> False
|
||||
|
||||
combineListSelection :: World -> Maybe Int -> String -> Bool -> SelectionList ()
|
||||
combineListSelection w mi regex x =
|
||||
|
||||
Reference in New Issue
Block a user