Move item inv size and item dimensions from records to external function
This commit is contained in:
@@ -4,6 +4,7 @@ module Dodge.Render.HUD (
|
||||
drawHUD,
|
||||
) where
|
||||
|
||||
import Dodge.Item.InvSize
|
||||
import Control.Applicative
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
@@ -215,7 +216,7 @@ closeObjectInfo n x = case x of
|
||||
|
||||
floorItemPickupInfo :: Int -> Item -> String
|
||||
floorItemPickupInfo n itm
|
||||
| n >= _itInvSize itm = ", but you have space to pick it up."
|
||||
| n >= itInvHeight itm = ", but you have space to pick it up."
|
||||
| otherwise = ", and you don't have space to pick it up."
|
||||
|
||||
-- note the use of ^?!
|
||||
|
||||
@@ -67,8 +67,7 @@ makeSelectionListPictures = concatMap f
|
||||
where
|
||||
f si = map (color (_siColor si) . text) $ _siPictures si
|
||||
|
||||
-- note this does not take into account any selectionsection indent, nor the LDP
|
||||
-- selection width
|
||||
-- note this does not take into account any selectionsection indent
|
||||
drawCursorAt ::
|
||||
Maybe Int ->
|
||||
[SelectionItem a] ->
|
||||
@@ -125,13 +124,11 @@ selSecDrawCursorAt ldp curs sss (i, j) = fold $ do
|
||||
(_siHeight si)
|
||||
|
||||
selSecDrawCursor ::
|
||||
-- Int ->
|
||||
ListDisplayParams ->
|
||||
CursorDisplay ->
|
||||
IM.IntMap (SelectionSection a) ->
|
||||
Maybe (Int, Int) ->
|
||||
Picture
|
||||
--selSecDrawCursor xsize ldp curs = maybe mempty . selSecDrawCursorAt xsize ldp curs
|
||||
selSecDrawCursor ldp curs = maybe mempty . selSecDrawCursorAt ldp curs
|
||||
|
||||
-- displays a cursor that should match up to list text pictures
|
||||
|
||||
Reference in New Issue
Block a user