Unify key press and mouse button press timings
Both now use Ints for presses. Still no release timer for keyboard events.
This commit is contained in:
@@ -67,7 +67,7 @@ handleHotkeys w
|
||||
thehotkeys = M.mapKeys hotkeyToScancode $ w ^. cWorld . lWorld . hotkeys
|
||||
lw = w ^. cWorld . lWorld
|
||||
|
||||
useHotkey :: World -> (NewInt ItmInt, PressType) -> World
|
||||
useHotkey :: World -> (NewInt ItmInt, Int) -> World
|
||||
useHotkey w (NInt itid, pt) = fromMaybe w $ do
|
||||
invid <- w ^? cWorld . lWorld . itemLocations . ix itid . ilInvID
|
||||
useItem invid pt w
|
||||
@@ -228,8 +228,5 @@ tryClickUse pkeys w = fromMaybe w $ do
|
||||
. crManipulation
|
||||
. manObject
|
||||
. imSelectedItem of
|
||||
Just invid -> useItem invid (f ltime) w
|
||||
Just invid -> useItem invid ltime w
|
||||
Nothing -> interactWithCloseObj <$> getSelectedCloseObj w ?? w
|
||||
where
|
||||
f 0 = InitialPress
|
||||
f _ = ShortPress
|
||||
|
||||
Reference in New Issue
Block a user