This commit is contained in:
2025-01-06 01:17:59 +00:00
parent c20486fc34
commit ab448770dd
2 changed files with 8 additions and 10 deletions
+2 -2
View File
@@ -55,7 +55,7 @@ drawHUD cfig w = case w ^. hud . hudElement of
drawInventory :: IM.IntMap (SelectionSection ()) -> World -> Configuration -> Picture
drawInventory sss w cfig =
drawSelectionSections sss invDP cfig
<> drawSSCursor sss (f $ w ^? hud . hudElement . diSelection . _Just) invDP curs cfig
<> drawSSCursor sss invDP curs cfig (f $ w ^? hud . hudElement . diSelection . _Just)
<> drawRootCursor w sss (f $ w ^? hud . hudElement . diSelection . _Just) invDP cfig
<> itemconnections
<> drawMouseOver cfig w
@@ -184,7 +184,7 @@ drawCombineInventory ::
drawCombineInventory cfig sss w =
invHead cfig "COMBINE"
<> drawSelectionSections sss secondColumnParams cfig
<> drawSSCursor sss msel secondColumnParams curs cfig
<> drawSSCursor sss secondColumnParams curs cfig msel
<> combineInventoryExtra sss msel cfig w
where
curs = BoundaryCursor [North, South, West]
+6 -8
View File
@@ -6,7 +6,6 @@ module Dodge.SelectionSections.Draw (
import Control.Lens
import qualified Data.IntMap.Strict as IM
import Data.Maybe
import Dodge.Data.Config
import Dodge.Data.SelectionList
import Dodge.Render.List
@@ -35,14 +34,14 @@ drawSelectionSections sss ldp cfig =
drawSSCursor ::
IM.IntMap (SelectionSection a) ->
Maybe (Int, Int) ->
ListDisplayParams ->
CursorDisplay ->
Configuration ->
Maybe (Int, Int) ->
Picture
drawSSCursor sss msel ldp curs cfig =
translateScreenPos cfig (ldp ^. ldpPos) $
selSecDrawCursor ldp curs sss msel
drawSSCursor sss ldp curs cfig =
translateScreenPos cfig (ldp ^. ldpPos) .
selSecDrawCursor ldp curs sss
drawSSMultiCursor ::
IM.IntMap (SelectionSection a) ->
@@ -53,7 +52,7 @@ drawSSMultiCursor ::
Configuration ->
Picture
drawSSMultiCursor sss msel mextra ldp curs cfig = translateScreenPos cfig (ldp ^. ldpPos)
. fromMaybe mempty
. fold
$ do
(i, j) <- msel
yint <- selSecYint i j sss
@@ -64,7 +63,6 @@ drawSSMultiCursor sss msel mextra ldp curs cfig = translateScreenPos cfig (ldp ^
ysize = sum . fmap _siHeight $ selitms
maxxoff = maximum . fmap _siOffX $ selitms
minxoff = minimum . fmap _siOffX $ selitms
let col = white
return $
listCursorChooseBorderScale
(ldp ^. ldpVerticalGap)
@@ -72,6 +70,6 @@ drawSSMultiCursor sss msel mextra ldp curs cfig = translateScreenPos cfig (ldp ^
curs
yint
(minxoff + sindent)
col
white
(15 + maxxoff - minxoff)
ysize