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