Cleanup
This commit is contained in:
+14
-26
@@ -30,12 +30,12 @@ import Dodge.Render.List
|
||||
import Dodge.ScreenPos
|
||||
import Dodge.SelectionSections
|
||||
import Dodge.SelectionSections.Draw
|
||||
import Dodge.Tweak.Show
|
||||
--import Dodge.Tweak.Show
|
||||
import Geometry
|
||||
import qualified IntMapHelp as IM
|
||||
import Justify
|
||||
--import ListHelp
|
||||
import Padding
|
||||
--import Padding
|
||||
import Picture
|
||||
import SDL (MouseButton (..))
|
||||
|
||||
@@ -313,18 +313,6 @@ lnkMidPosInvSelsCol cfig w i col = foldMap f
|
||||
invcol <- selSecSelCol 0 j sss
|
||||
return $ zConnectCol (rp - V2 5 0) (lp + V2 175 0) col col col invcol
|
||||
|
||||
tweakItems :: Maybe Item -> [SelectionItem ()]
|
||||
tweakItems = textSelItems . ammoTweakStrings
|
||||
|
||||
ammoTweakStrings :: Maybe Item -> [String]
|
||||
ammoTweakStrings _ = []-- case it ^? _Just . itTweaks . tweakParams of
|
||||
--ammoTweakStrings it = case it ^? _Just . itTweaks . tweakParams of
|
||||
-- Just l -> map tweakString $ IM.elems l
|
||||
-- _ -> ["NOT TWEAKABLE"]
|
||||
|
||||
tweakString :: TweakParam -> String
|
||||
tweakString tp = rightPad 12 ' ' (show $ _tweakType tp) ++ " " ++ showTweak tp
|
||||
|
||||
invHead :: Configuration -> String -> Picture
|
||||
invHead cfig =
|
||||
translateScreenPos cfig (fromTopLeft (V2 (subInvX - 5) 80))
|
||||
@@ -375,19 +363,19 @@ invHead cfig =
|
||||
-- ( halfHeight cfig - 20* (fromIntegral invPos +1) + 2.5)
|
||||
-- return . winScale cfig . color col $ lConnect p itScreenPos
|
||||
|
||||
textSelItems :: [String] -> [SelectionItem ()]
|
||||
textSelItems = map (picsToSelectable . (: []))
|
||||
--textSelItems :: [String] -> [SelectionItem ()]
|
||||
--textSelItems = map (picsToSelectable . (: []))
|
||||
|
||||
picsToSelectable :: [String] -> SelectionItem ()
|
||||
picsToSelectable pics =
|
||||
SelectionItem
|
||||
{ _siPictures = pics
|
||||
, _siHeight = length pics
|
||||
, _siIsSelectable = True
|
||||
, _siColor = white
|
||||
, _siOffX = 0
|
||||
, _siPayload = ()
|
||||
}
|
||||
--picsToSelectable :: [String] -> SelectionItem ()
|
||||
--picsToSelectable pics =
|
||||
-- SelectionItem
|
||||
-- { _siPictures = pics
|
||||
-- , _siHeight = length pics
|
||||
-- , _siIsSelectable = True
|
||||
-- , _siColor = white
|
||||
-- , _siOffX = 0
|
||||
-- , _siPayload = ()
|
||||
-- }
|
||||
|
||||
-- would be nice to add parameter to orient this with NSEW, cf cursor
|
||||
selNumPos ::
|
||||
|
||||
Reference in New Issue
Block a user