This commit is contained in:
2024-11-17 13:03:46 +00:00
parent 5b6c356bab
commit d5be125a3b
13 changed files with 156 additions and 169 deletions
+3 -5
View File
@@ -24,7 +24,6 @@ import Dodge.Data.Config
import Dodge.Data.DoubleTree
import Dodge.Data.SelectionList
import Dodge.Data.World
import Dodge.Default.SelectionList
import Dodge.DoubleTree
import Dodge.Equipment.Text
import Dodge.Inventory
@@ -180,15 +179,14 @@ drawExamineInventory cfig w =
<> drawSelectionList
secondColumnParams
cfig
( defaultSelectionList & slItems
.~ map f
( (map f
( makeParagraph 55 $
yourAugmentedItem
itemInfo
(yourInfo (you w))
(closeObjectInfo (crNumFreeSlots (you w)))
w
)
))
)
where
f str =
@@ -359,7 +357,7 @@ drawTerminalDisplay tid cfig w = fromMaybe mempty $ do
<> color (dark $ _tmExternalColor tm) (drawTitleBackground cfig)
where
toselitm (str, col) = SelectionItem [str] 1 True col 0 ()
thesellist tm = defaultSelectionList & slItems .~ thelist tm
thesellist tm = thelist tm
thelist tm =
map toselitm . displayTermInput tm
. reverse
+3 -3
View File
@@ -31,7 +31,7 @@ import LensHelp
import ListHelp
import Picture
drawSelectionList :: ListDisplayParams -> Configuration -> SelectionList a -> Picture
drawSelectionList :: ListDisplayParams -> Configuration -> [SelectionItem a] -> Picture
drawSelectionList ldps cfig sl =
translateScreenPos cfig (ldps ^. ldpPos) $
drawListYgapScaleYoff
@@ -59,8 +59,8 @@ drawSelectionListBackground ldp cfig l = translateScreenPos cfig (ldp ^. ldpPos)
s = - (5 + fromIntegral l * (20 * ldp ^. ldpScale + ldp ^. ldpVerticalGap))
e = 555 -- HACK isOverTerminalScreen
makeSelectionListPictures :: SelectionList a -> [Picture]
makeSelectionListPictures = concatMap f . _slItems
makeSelectionListPictures :: [SelectionItem a] -> [Picture]
makeSelectionListPictures = concatMap f
where
f si = map (color (_siColor si) . text) $ _siPictures si
+2 -2
View File
@@ -38,7 +38,7 @@ drawOptions ::
-- | Title
String ->
Maybe Int ->
SelectionList a ->
[SelectionItem a] ->
Picture
drawOptions ldps cfig title msel sl =
darkenBackground cfig
@@ -46,7 +46,7 @@ drawOptions ldps cfig title msel sl =
<> drawSelectionList ldps cfig sl
<> translateScreenPos cfig (ldps ^. ldpPos) (drawCursorAt
msel
(sl ^. slItems)
sl
ldps
(BoundaryCursor [North, South])
)