File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { useEffect } from 'react'
2
2
import { proxy , useSnapshot } from 'valtio'
3
3
import { pointerLock } from '../utils'
4
+ import { miscUiState } from '../globalState'
4
5
import PixelartIcon , { pixelartIcons } from './PixelartIcon'
5
6
import { useUsingTouch } from './utilsApp'
6
7
@@ -10,6 +11,7 @@ export const displayHintsState = proxy({
10
11
11
12
export default ( ) => {
12
13
const { captureMouseHint } = useSnapshot ( displayHintsState )
14
+ const { usingGamepadInput } = useSnapshot ( miscUiState )
13
15
const usingTouch = useUsingTouch ( )
14
16
15
17
useEffect ( ( ) => {
@@ -25,7 +27,6 @@ export default () => {
25
27
}
26
28
} , [ ] )
27
29
28
- if ( usingTouch ) return null
29
30
return < div style = { {
30
31
// below crosshair that is in center of screen
31
32
position : 'absolute' ,
@@ -40,7 +41,7 @@ export default () => {
40
41
pointerEvents : 'none' ,
41
42
textShadow : '0 0 1px black'
42
43
} } >
43
- { captureMouseHint && < div style = { {
44
+ { captureMouseHint && ! usingTouch && ! usingGamepadInput && < div style = { {
44
45
display : 'flex' ,
45
46
alignItems : 'center' ,
46
47
gap : '10px' ,
You can’t perform that action at this time.
0 commit comments