Skip to content

Commit 67dbd56

Browse files
committed
dont display new hint when gamepad is used
1 parent 517f5d3 commit 67dbd56

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/react/GlobalOverlayHints.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useEffect } from 'react'
22
import { proxy, useSnapshot } from 'valtio'
33
import { pointerLock } from '../utils'
4+
import { miscUiState } from '../globalState'
45
import PixelartIcon, { pixelartIcons } from './PixelartIcon'
56
import { useUsingTouch } from './utilsApp'
67

@@ -10,6 +11,7 @@ export const displayHintsState = proxy({
1011

1112
export default () => {
1213
const { captureMouseHint } = useSnapshot(displayHintsState)
14+
const { usingGamepadInput } = useSnapshot(miscUiState)
1315
const usingTouch = useUsingTouch()
1416

1517
useEffect(() => {
@@ -25,7 +27,6 @@ export default () => {
2527
}
2628
}, [])
2729

28-
if (usingTouch) return null
2930
return <div style={{
3031
// below crosshair that is in center of screen
3132
position: 'absolute',
@@ -40,7 +41,7 @@ export default () => {
4041
pointerEvents: 'none',
4142
textShadow: '0 0 1px black'
4243
}}>
43-
{captureMouseHint && <div style={{
44+
{captureMouseHint && !usingTouch && !usingGamepadInput && <div style={{
4445
display: 'flex',
4546
alignItems: 'center',
4647
gap: '10px',

0 commit comments

Comments
 (0)