Fix scroll selection of floor items and buttons
This commit is contained in:
@@ -13,7 +13,8 @@ import Geometry.Data
|
||||
|
||||
data HUDElement
|
||||
= DisplayInventory
|
||||
{ _subInventory :: SubInventory}
|
||||
{ _subInventory :: SubInventory
|
||||
}
|
||||
| DisplayCarte
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
--{-# LANGUAGE DeriveGeneric #-}
|
||||
--{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.SelectionList where
|
||||
@@ -8,8 +8,8 @@ import Picture.Data
|
||||
import Control.Lens
|
||||
import Data.Set (Set)
|
||||
import Dodge.Data.CardinalPoint
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
--import Data.Aeson
|
||||
--import Data.Aeson.TH
|
||||
|
||||
data ListDisplayParams = ListDisplayParams
|
||||
{ _ldpPosX :: Float
|
||||
@@ -26,6 +26,7 @@ data SelectionList a = SelectionList
|
||||
, _slSelPos :: Maybe Int
|
||||
, _slLength :: Int
|
||||
}
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data SelectionWidth = FixedSelectionWidth Int
|
||||
| VariableSelectionWidth (Int -> Int)
|
||||
@@ -43,8 +44,10 @@ data SelectionItem a = SelectionItem
|
||||
, _siOffX :: Int
|
||||
, _siPayload :: a
|
||||
}
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
makeLenses ''ListDisplayParams
|
||||
makeLenses ''SelectionList
|
||||
makeLenses ''SelectionItem
|
||||
deriveJSON defaultOptions ''SelectionItem
|
||||
--deriveJSON defaultOptions ''SelectionItem
|
||||
--deriveJSON defaultOptions ''SelectionList
|
||||
|
||||
Reference in New Issue
Block a user