Count mouse button press time up from 0
This commit is contained in:
@@ -61,7 +61,7 @@ updateUseInputInGame u = case u ^. uvWorld . hud . hudElement of
|
||||
where
|
||||
w = u ^. uvWorld
|
||||
pkeys = u ^. uvWorld . input . pressedKeys
|
||||
lbinitialpress = u ^? uvWorld . input . mouseButtons . ix ButtonLeft == Just 1
|
||||
lbinitialpress = u ^? uvWorld . input . mouseButtons . ix ButtonLeft == Just 0
|
||||
|
||||
updatePressedButtonsCarte :: World -> World
|
||||
updatePressedButtonsCarte w = updatePressedButtonsCarte' (_mouseButtons (_input w)) w
|
||||
@@ -152,7 +152,7 @@ doRegexInput u i sss
|
||||
any
|
||||
((== Just InitialPress) . (`M.lookup` pkeys))
|
||||
[ScancodeReturn, ScancodeSlash]
|
||||
endmouse = (Just 1 == ) $ u ^? uvWorld . input . mouseButtons . ix ButtonLeft
|
||||
endmouse = (Just 0 == ) $ u ^? uvWorld . input . mouseButtons . ix ButtonLeft
|
||||
backspacetonothing =
|
||||
sss ^? sssExtra . sssFilters . ix i . _Just == Just ""
|
||||
&& ScancodeBackspace `M.lookup` pkeys == Just InitialPress
|
||||
|
||||
@@ -60,12 +60,12 @@ mouseClickOptionsList :: ScreenLayer -> Universe -> Universe
|
||||
mouseClickOptionsList screen u = fromMaybe u $ do
|
||||
sl <- screen ^? scSelectionList
|
||||
Just $ case u ^. uvWorld . input . mouseButtons . at ButtonLeft of
|
||||
Just 1 -> fromMaybe u $ do
|
||||
Just 0 -> fromMaybe u $ do
|
||||
i <- sl ^. slSelPos
|
||||
f <- sl ^? slItems . ix i . siPayload . _1
|
||||
return $ f u
|
||||
_ -> case u ^. uvWorld . input . mouseButtons . at ButtonRight of
|
||||
Just 1 -> fromMaybe u $ do
|
||||
Just 0 -> fromMaybe u $ do
|
||||
i <- sl ^. slSelPos
|
||||
f <- sl ^? slItems . ix i . siPayload . _2
|
||||
return $ f u
|
||||
|
||||
Reference in New Issue
Block a user