Clicking on button in inventory list activates button

This commit is contained in:
2025-12-24 20:25:06 +00:00
parent de6bbe7697
commit faa40bdd9f
3 changed files with 16 additions and 20 deletions
+5
View File
@@ -5,6 +5,7 @@ module Dodge.Update.Input.InGame (
updateMouseInGame,
) where
import Dodge.Button.Event
import Control.Applicative
import Control.Monad
import Data.Foldable
@@ -219,6 +220,10 @@ updateMouseClickInGame cfig w = case w ^. input . mouseContext of
| selsec == Just 2 ->
w & hud . diSelection %~ endRegex 2 w
& hud . diCloseFilter .~ Nothing
OverInvSelect (5, j) -> fromMaybe w $ do
k <- w ^? hud . closeButtons . ix j
but <- w ^? cWorld . lWorld . buttons . ix k
return $ doButtonEvent (but ^. btEvent) but w
OverInvSelect x
| ScancodeLShift `M.member` (w ^. input . pressedKeys)
&& isGroupSelectableSection (fst x) ->