Use IntSet for extra selection items

This commit is contained in:
2024-11-20 16:52:03 +00:00
parent 1f5d034c5f
commit a05511f6d8
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
All good (594 modules, at 16:13:14)
All good (594 modules, at 16:52:02)
+4 -2
View File
@@ -21,8 +21,10 @@ import Dodge.Data.Universe
import qualified IntMapHelp as IM
testStringInit :: Universe -> [String]
testStringInit u = [show $
u ^? uvWorld . input . mouseContext . mcoSelEnd
testStringInit u =
[ show $ u ^? uvWorld . input . mouseContext . mcoSelEnd
, show $ u ^? uvWorld . hud . hudElement . diSelection
, show $ u ^? uvWorld . hud . hudElement . diSelectionExtra
]
-- fmap show $ u ^.. uvWorld . cWorld . lWorld . creatures . ix 0 . crInv . each . itLocation . ilIsRoot
-- , show . fmap (fmap _siPictures) $ u ^? uvWorld . hud . hudElement . diSections . ix (-1) . ssItems
+3
View File
@@ -123,6 +123,9 @@ updateMouseReleaseInGame w = case w ^. input . mouseContext of
OverInvDrag mpos -> fromMaybe (dropSelected w & input . mouseContext .~ MouseInGame) $ do
j <- mpos
return $ w & input . mouseContext .~ OverInvSelect (0,j)
OverInvDragSelect _ Nothing ->
w & input . mouseContext .~ MouseInGame
& hud . hudElement . diSelectionExtra .~ mempty
OverInvDragSelect ssel (Just esel) ->
w & input . mouseContext .~ MouseInGame
& hud . hudElement . diSelectionExtra