Move towards tweak parameters editing items

This commit is contained in:
2021-11-29 21:58:28 +00:00
parent 4f77a15445
commit 02dc7c29e0
6 changed files with 86 additions and 61 deletions
+5 -5
View File
@@ -58,7 +58,7 @@ subInventoryDisplay cfig w = case _inventoryMode w of
col = itCol it
cursorsZ :: Configuration -> Int -> Item -> Picture
cursorsZ cfig ipos it = case it ^? itConsumption . aoType . amParamSel of
cursorsZ cfig ipos it = case it ^? itParams . tweakSel of
Nothing -> f $ zConnect sp (V2 (155- hw) ( hh - 77.5))
Just jpos -> f $ zConnect sp (V2 (155 - hw) ( hh - (20 * fromIntegral jpos + 77.5)))
where
@@ -75,12 +75,12 @@ topInvCursor col iPos cfig w
| otherwise = mainListCursor col iPos cfig
ammoTweakStrings :: Item -> [String]
ammoTweakStrings it = case it ^? itConsumption . aoType . amPjParams of
ammoTweakStrings it = case it ^? itParams . tweakParams of
Just l -> map pjTweakString l
_ -> ["NOT TWEAKABLE"]
mCurs :: Item -> Configuration -> World -> Picture
mCurs it cfig w = case it ^? itConsumption . aoType . amParamSel of
mCurs it cfig w = case it ^? itParams . tweakSel of
Nothing -> []
Just i
| ButtonRight `S.member` _mouseButtons w ->
@@ -93,8 +93,8 @@ mCurs it cfig w = case it ^? itConsumption . aoType . amParamSel of
x = 117.5
y = 155
pjTweakString :: PjParam -> String
pjTweakString pj = _pjDisplayParam pj $ _pjIntParam pj
pjTweakString :: TweakParam -> String
pjTweakString pj = _pjDisplayParam pj $ _curTweak pj
displayMidList :: Configuration -> [String] -> String -> Picture
displayMidList cfig strs s = invHead cfig s