Restrict hotkey firing to initialpress
This commit is contained in:
@@ -46,7 +46,8 @@ handleHotkeys w
|
|||||||
| SDL.ScancodeLShift `M.member` _pressedKeys (_input w)
|
| SDL.ScancodeLShift `M.member` _pressedKeys (_input w)
|
||||||
|| SDL.ScancodeRShift `M.member` _pressedKeys (_input w) =
|
|| SDL.ScancodeRShift `M.member` _pressedKeys (_input w) =
|
||||||
foldl' tryAssignHotkey w allHotkeys
|
foldl' tryAssignHotkey w allHotkeys
|
||||||
| otherwise = foldl' useHotkey w (M.intersection thehotkeys (w ^. input . pressedKeys))
|
| otherwise = foldl' useHotkey w
|
||||||
|
(M.intersection thehotkeys (M.filter (== InitialPress) (w ^. input . pressedKeys)))
|
||||||
where
|
where
|
||||||
thehotkeys = M.mapKeys hotkeyToScancode $ w ^. cWorld . lWorld . hotkeys
|
thehotkeys = M.mapKeys hotkeyToScancode $ w ^. cWorld . lWorld . hotkeys
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ module Dodge.HeldUse (
|
|||||||
) where
|
) where
|
||||||
|
|
||||||
import NewInt
|
import NewInt
|
||||||
import Dodge.Luse
|
|
||||||
import Dodge.Creature.Action.Blink
|
import Dodge.Creature.Action.Blink
|
||||||
import Dodge.RadarSweep
|
import Dodge.RadarSweep
|
||||||
import Color
|
import Color
|
||||||
|
|||||||
Reference in New Issue
Block a user