Clicking on button in inventory list activates button
This commit is contained in:
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user