Decouple selection section inventory position

This commit is contained in:
2024-10-24 14:55:51 +01:00
parent 81f4f38166
commit 388064895f
17 changed files with 304 additions and 261 deletions
+4 -1
View File
@@ -16,6 +16,7 @@ data HUDElement
= DisplayInventory
{ _subInventory :: SubInventory
, _diSections :: SelectionSections ()
, _diSelection :: Maybe (Int,Int)
}
| DisplayCarte
@@ -33,7 +34,9 @@ data SubInventory
, _nsMouseOver :: Maybe (Int, Int)
}
| ExamineInventory
| CombineInventory {_ciSections :: SelectionSections CombinableItem}
| CombineInventory {_ciSections :: SelectionSections CombinableItem
, _ciSelection :: Maybe (Int,Int)
}
| LockedInventory
| DisplayTerminal {_termID :: Int}
+1 -2
View File
@@ -42,8 +42,7 @@ data SelectionSections a = SelectionSections
-- a pair of ints (i,i+1) such that the lower is the regex section, the higher
-- is the items section.
data SSSExtra = SSSExtra
{ _sssSelPos :: Maybe (Int, Int)
, _sssFilters :: IntMap (Maybe String)
{ _sssFilters :: IntMap (Maybe String)
}
data SectionCursor = SectionCursor