This commit is contained in:
2025-09-19 19:56:12 +01:00
parent 2d856ddf9e
commit d4f2cdd3fd
20 changed files with 282 additions and 351 deletions
+6 -2
View File
@@ -1,9 +1,13 @@
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Combine where
import Control.Lens
import Dodge.Data.Item
data CombinableItem = CombinableItem
data CombItem = CombItem
{ _ciInvIDs :: [Int]
, _ciItem :: Item
}
makeLenses ''CombinableItem
makeLenses ''CombItem
+1 -1
View File
@@ -22,7 +22,7 @@ data SubInventory
, _mapInvItmID :: NewInt ItmInt
}
| CombineInventory
{ _ciSections :: IMSS CombinableItem
{ _ciSections :: IMSS CombItem
, _ciSelection :: Maybe Selection
, _ciFilter :: Maybe String
}
+3 -3
View File
@@ -26,7 +26,7 @@ data SectionCursor = SectionCursor
, _scurColor :: Color
}
data SelectionSection a = SelectionSection
data SelSection a = SelSection
{ _ssItems :: IntMap (SelectionItem a)
, _ssOffset :: Int
, _ssShownItems :: [Picture]
@@ -34,7 +34,7 @@ data SelectionSection a = SelectionSection
, _ssIndent :: Int
}
type IMSS a = IntMap (SelectionSection a)
type IMSS a = IntMap (SelSection a)
data SelectionWidth = FixedSelectionWidth Int | UseItemWidth
@@ -51,6 +51,6 @@ data SelectionItem a
makeLenses ''ListDisplayParams
makeLenses ''SelectionItem
makeLenses ''SelectionSection
makeLenses ''SelSection
makeLenses ''SectionCursor
makeLenses ''CursorDisplay
+7 -10
View File
@@ -73,26 +73,23 @@ data OptionScreenFlag = NormalOptions | GameOverOptions | SplashOptions
| LoadingScreen
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data EscapeMenuOption
= BottomEscapeMenuOption { _emoMenuOption :: MenuOption }
| TopEscapeMenuOption { _emoMenuOption :: MenuOption }
| NoEscapeMenuOption
data ExtraMenuOption
= BottomMenuOption { _emoMenuOption :: MenuOption }
| TopMenuOption { _emoMenuOption :: MenuOption }
| NoExtraMenuOption
data ScreenLayer
= OptionScreen
{ _scTitle :: String
, _scOptions :: [MenuOption]
, _scOffset :: Int
, _scPositionedMenuOption :: EscapeMenuOption
, _scPositionedMenuOption :: ExtraMenuOption
, _scOptionFlag :: OptionScreenFlag
, _scSelectionList :: [SelectionItem (Universe -> Universe,Universe->Universe)]
, _scAvailableLines :: Int
, _scDisplayTime :: Int
}
| InputScreen
{ _scInput :: String
, _scFooter :: String
}
| InputScreen { _scInput :: String }
data MenuOptionDisplay
= MODString {_modString :: String}
@@ -117,6 +114,6 @@ makeLenses ''ScreenLayer
makeLenses ''SideEffect
makeLenses ''MenuOptionDisplay
makeLenses ''MenuOption
makeLenses ''EscapeMenuOption
makeLenses ''ExtraMenuOption
makeLenses ''DebugItem
makeLenses ''DebugInfo