Draw cursor when targeting with HUD
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
module Dodge.Item.Draw.SPic (
|
||||
itemSPic,
|
||||
itemTreeSPic,
|
||||
) where
|
||||
|
||||
import Data.Maybe
|
||||
import qualified Linear.Quaternion as Q
|
||||
import Dodge.Data.ComposedItem
|
||||
import Dodge.Data.DoubleTree
|
||||
import Color
|
||||
@@ -26,8 +29,19 @@ import ShapePicture
|
||||
-- hit <- itm ^? itType . iyBase . ibtHeld
|
||||
-- return mempty
|
||||
|
||||
itemSPic :: LabelDoubleTree ComposeLinkType ComposedItem -> SPic
|
||||
itemSPic itmtree = case it ^. itType of
|
||||
itemTreeSPic :: LabelDoubleTree ItemLink ComposedItem -> SPic
|
||||
itemTreeSPic (LDT (itm,_) l r) = itemSPic itm
|
||||
<> foldMap (itemRotTreeSPic itm) (l <> r)
|
||||
|
||||
itemRotTreeSPic :: Item -> (ItemLink,LabelDoubleTree ItemLink ComposedItem) -> SPic
|
||||
itemRotTreeSPic par (il,t) = fromMaybe mempty $ do
|
||||
(p,q) <- _iatOrient il par itm
|
||||
return $ (translateSP p $ overPosSP (Q.rotate q) $ itemTreeSPic t)
|
||||
where
|
||||
itm = t ^. ldtValue . _1
|
||||
|
||||
itemSPic :: Item -> SPic
|
||||
itemSPic it = case it ^. itType of
|
||||
CRAFT _ -> defSPic
|
||||
HELD ht -> heldItemSPic ht it
|
||||
LEFT lt -> leftItemSPic lt it
|
||||
@@ -37,8 +51,6 @@ itemSPic itmtree = case it ^. itType of
|
||||
AMMOMAG {} -> defSPic
|
||||
TARGETING {} -> defSPic
|
||||
BULLETMOD {} -> defSPic
|
||||
where
|
||||
it = itmtree ^. ldtValue . _1
|
||||
|
||||
equipItemSPic :: EquipItemType -> Item -> SPic
|
||||
equipItemSPic et _ = case et of
|
||||
@@ -531,3 +543,5 @@ keyPic =
|
||||
|
||||
legsSPic :: Color -> SPic
|
||||
legsSPic col = noPic $ translateSH (V3 0 4 0) $ colorSH col $ upperPrismPolyST 3 $ rectWH 2 2
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user