Cleanup
This commit is contained in:
@@ -4,8 +4,6 @@ module Dodge.Render.HUD (
|
||||
drawHUD,
|
||||
) where
|
||||
|
||||
import Dodge.Data.EquipType
|
||||
import Dodge.Item.Location
|
||||
import Control.Applicative
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
@@ -22,6 +20,7 @@ import Dodge.Data.CardinalPoint
|
||||
import Dodge.Data.Combine
|
||||
import Dodge.Data.Config
|
||||
import Dodge.Data.DoubleTree
|
||||
import Dodge.Data.EquipType
|
||||
import Dodge.Data.SelectionList
|
||||
import Dodge.Data.World
|
||||
import Dodge.DoubleTree
|
||||
@@ -31,6 +30,7 @@ import Dodge.Item.Display
|
||||
import Dodge.Item.Grammar
|
||||
import Dodge.Item.Info
|
||||
import Dodge.Item.InvSize
|
||||
import Dodge.Item.Location
|
||||
import Dodge.ListDisplayParams
|
||||
import Dodge.Render.Connectors
|
||||
--import Dodge.Render.HUD.Carte
|
||||
@@ -48,7 +48,7 @@ import SDL (MouseButton (..))
|
||||
|
||||
drawHUD :: Configuration -> World -> Picture
|
||||
drawHUD cfig w = case w ^. hud . hudElement of
|
||||
-- DisplayCarte -> drawCarte cfig w
|
||||
-- DisplayCarte -> drawCarte cfig w
|
||||
DisplayInventory{_diSections = sections, _subInventory = subinv} ->
|
||||
drawInventory sections w cfig
|
||||
<> drawSubInventory subinv cfig w
|
||||
@@ -96,7 +96,7 @@ getRootItemBounds :: Int -> IM.IntMap Item -> Maybe (Int, Int)
|
||||
getRootItemBounds i inv = do
|
||||
let ia = invIndents inv -- why indents? why OItem?
|
||||
itm <- ia ^? ix i . _2
|
||||
let root = locToTop' itm
|
||||
let root = locToTop itm
|
||||
x <- locDTRightmost root ^? locDT . dtValue . _1 . itLocation . ilInvID
|
||||
y <- locDTLeftmost root ^? locDT . dtValue . _1 . itLocation . ilInvID
|
||||
return (x, y)
|
||||
@@ -160,7 +160,7 @@ drawDragSelecting cfig w = do
|
||||
|
||||
drawSubInventory :: SubInventory -> Configuration -> World -> Picture
|
||||
drawSubInventory subinv cfig w = case subinv of
|
||||
-- LockedInventory -> mempty -- topInvCursor col cursPos cfig w
|
||||
-- LockedInventory -> mempty -- topInvCursor col cursPos cfig w
|
||||
NoSubInventory{} -> drawRBOptions cfig w
|
||||
ExamineInventory -> drawExamineInventory cfig w
|
||||
DisplayTerminal tid -> drawTerminalDisplay tid cfig (w ^. cWorld . lWorld)
|
||||
@@ -172,8 +172,7 @@ drawMapperInventory itid w = fold $ do
|
||||
itm <- w ^? pointerToItemID itid
|
||||
ls <- itm ^? itUse . useMapperLines
|
||||
let _ = w ^. wCam . camRot
|
||||
return . color red
|
||||
$ foldMap (\(x,y) -> line [f x,f y]) ls
|
||||
return . color red $ foldMap (\(x, y) -> line [f x, f y]) ls
|
||||
where
|
||||
f = worldPosToScreen (w ^. wCam)
|
||||
|
||||
@@ -253,7 +252,7 @@ drawRBOptions cfig w = fold $ do
|
||||
invid <- you w ^? crManipulation . manObject . imSelectedItem
|
||||
eslist <-
|
||||
fmap eqSiteToPositions $
|
||||
you w ^? crInv . ix invid >>= equipType-- . itUse . uequipEffect . eeType
|
||||
you w ^? crInv . ix invid >>= equipType -- . itUse . uequipEffect . eeType
|
||||
i <- w ^? rbOptions . opSel
|
||||
let ae = getEquipmentAllocation invid w
|
||||
sss <- w ^? hud . hudElement . diSections
|
||||
|
||||
Reference in New Issue
Block a user