Tweak shift selection
This commit is contained in:
@@ -203,7 +203,6 @@ multiSelScroll yi w
|
|||||||
|
|
||||||
multiSelScroll' :: (Int -> IM.IntMap (SelectionItem ()) -> Maybe Int) -> World -> World
|
multiSelScroll' :: (Int -> IM.IntMap (SelectionItem ()) -> Maybe Int) -> World -> World
|
||||||
multiSelScroll' f w = fromMaybe w $ do
|
multiSelScroll' f w = fromMaybe w $ do
|
||||||
--Sel j i is <- w ^. hud . diSelection
|
|
||||||
Sel j i <- w ^. hud . diSelection
|
Sel j i <- w ^. hud . diSelection
|
||||||
is <- w ^? hud . diSections . ix j . ssSet
|
is <- w ^? hud . diSections . ix j . ssSet
|
||||||
ss <- w ^? hud . diSections . ix j . ssItems
|
ss <- w ^? hud . diSections . ix j . ssItems
|
||||||
|
|||||||
@@ -220,6 +220,7 @@ updateMouseClickInGame u = case w ^. input . mouseContext of
|
|||||||
OverInvSelect x
|
OverInvSelect x
|
||||||
| ScancodeLShift `M.member` (w ^. input . pressedKeys) ->
|
| ScancodeLShift `M.member` (w ^. input . pressedKeys) ->
|
||||||
u & uvWorld . input . mouseContext .~ OverInvDragSelect (NonInf x)
|
u & uvWorld . input . mouseContext .~ OverInvDragSelect (NonInf x)
|
||||||
|
& maybeselectselected x
|
||||||
OverInvSelect (-1, _)
|
OverInvSelect (-1, _)
|
||||||
| selsec == Just (-1) ->
|
| selsec == Just (-1) ->
|
||||||
u
|
u
|
||||||
@@ -276,6 +277,10 @@ updateMouseClickInGame u = case w ^. input . mouseContext of
|
|||||||
w = u ^. uvWorld
|
w = u ^. uvWorld
|
||||||
f (x, y) = Sel x y
|
f (x, y) = Sel x y
|
||||||
selsec = w ^? hud . diSelection . _Just . slSec
|
selsec = w ^? hud . diSelection . _Just . slSec
|
||||||
|
maybeselectselected (i,_) = fromMaybe id $ do
|
||||||
|
Sel i' j <- w ^. hud . diSelection
|
||||||
|
guard $ i' == i && w ^? hud . diSections . ix i . ssSet == Just (IS.empty)
|
||||||
|
return $ uvWorld . hud . diSections . ix i . ssSet .~ IS.singleton j
|
||||||
|
|
||||||
endRegex :: Int -> World -> Maybe Selection -> Maybe Selection
|
endRegex :: Int -> World -> Maybe Selection -> Maybe Selection
|
||||||
endRegex i w = ssSetCursor (ssLookupDown i j) sss
|
endRegex i w = ssSetCursor (ssLookupDown i j) sss
|
||||||
@@ -536,10 +541,6 @@ pauseGame u = u & uvScreenLayers .~ [pauseMenu u] & pauseSound
|
|||||||
|
|
||||||
spaceAction :: World -> World
|
spaceAction :: World -> World
|
||||||
spaceAction w = case w ^. hud . subInventory of
|
spaceAction w = case w ^. hud . subInventory of
|
||||||
NoSubInventory
|
|
||||||
| ScancodeCapsLock `M.member` (w ^. input . pressedKeys)
|
|
||||||
, Just (Sel 0 j) <- w ^. hud . diSelection
|
|
||||||
-> maybe id interactWithCloseObj (getCloseObj w) w
|
|
||||||
NoSubInventory -> maybe id interactWithCloseObj (getCloseObj w) w
|
NoSubInventory -> maybe id interactWithCloseObj (getCloseObj w) w
|
||||||
_ -> w & hud . subInventory .~ NoSubInventory
|
_ -> w & hud . subInventory .~ NoSubInventory
|
||||||
|
|
||||||
|
|||||||
@@ -2878,7 +2878,7 @@ centroid src/Geometry/Polygon.hs 192;" f
|
|||||||
centroidNum src/Geometry/Polygon.hs 195;" f
|
centroidNum src/Geometry/Polygon.hs 195;" f
|
||||||
chainPairs src/Geometry.hs 360;" f
|
chainPairs src/Geometry.hs 360;" f
|
||||||
changeSwapOther src/Dodge/Inventory.hs 220;" f
|
changeSwapOther src/Dodge/Inventory.hs 220;" f
|
||||||
changeSwapSel src/Dodge/Inventory.hs 189;" f
|
changeSwapSel src/Dodge/Inventory.hs 190;" f
|
||||||
changeSwapSelSet src/Dodge/Inventory.hs 125;" f
|
changeSwapSelSet src/Dodge/Inventory.hs 125;" f
|
||||||
changeSwapWith src/Dodge/Inventory.hs 251;" f
|
changeSwapWith src/Dodge/Inventory.hs 251;" f
|
||||||
charToTuple src/Picture/Base.hs 312;" f
|
charToTuple src/Picture/Base.hs 312;" f
|
||||||
@@ -4405,8 +4405,8 @@ multGunCrit src/Dodge/Creature.hs 68;" f
|
|||||||
multiArrow src/Picture/Composite.hs 11;" f
|
multiArrow src/Picture/Composite.hs 11;" f
|
||||||
multiLookupTrie src/SimpleTrie.hs 57;" f
|
multiLookupTrie src/SimpleTrie.hs 57;" f
|
||||||
multiLookupTrieI src/SimpleTrie.hs 66;" f
|
multiLookupTrieI src/SimpleTrie.hs 66;" f
|
||||||
multiSelScroll src/Dodge/Inventory.hs 196;" f
|
multiSelScroll src/Dodge/Inventory.hs 197;" f
|
||||||
multiSelScroll' src/Dodge/Inventory.hs 203;" f
|
multiSelScroll' src/Dodge/Inventory.hs 204;" f
|
||||||
muout src/Dodge/RoomLink.hs 144;" f
|
muout src/Dodge/RoomLink.hs 144;" f
|
||||||
muzFlareAt src/Dodge/HeldUse.hs 702;" f
|
muzFlareAt src/Dodge/HeldUse.hs 702;" f
|
||||||
muzzlePos src/Dodge/HeldUse.hs 787;" f
|
muzzlePos src/Dodge/HeldUse.hs 787;" f
|
||||||
|
|||||||
Reference in New Issue
Block a user