Add "equipped" text

This commit is contained in:
2022-02-17 20:35:34 +00:00
parent f4d88a15bf
commit c0dcb4a5ec
2 changed files with 12 additions and 6 deletions
+8
View File
@@ -5,6 +5,7 @@ module Dodge.Inventory
, invSelPos
, invSelSize
, selNumPos
, selNumTextPos
, selNumCol
, selNumSlots
, selNumMidHeight
@@ -93,6 +94,13 @@ selNumPos i w = splitgap + (foldl' (+) 0 . fst $ IM.split i (augmentedInvSizes w
| i < length (yourInv w) = 0
| otherwise = 1
selNumTextPos :: Configuration -> World -> Int -> Point2
selNumTextPos cfig w i = V2 (150 - hw) ( hh + 20 * fromIntegral ipos + 7.5)
where
hh = halfHeight cfig
hw = halfWidth cfig
ipos = selNumPos i w
selNumMidHeight :: Configuration -> World -> Int -> Point2
selNumMidHeight cfig w i = V2 (150 - hw) ( hh + bump - (20 * fromIntegral ipos + 7.5))
where