Skip to content

Commit a41d8f9

Browse files
committed
Add background circle to joystick for better visibility
Add semi-transparent circular background and border to joystick container so users can see where the joystick is located before touching it
1 parent 4c6d5f7 commit a41d8f9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/game/mobile/TouchJoystick.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const TouchJoystick: React.FC<TouchJoystickProps> = ({
2626
zone: containerRef.current,
2727
mode: 'static',
2828
position: { left: '50%', top: '50%' },
29-
color: 'rgba(255, 255, 255, 0.5)',
29+
color: 'rgba(255, 255, 255, 0.7)',
3030
size: 120 * scale
3131
})
3232

@@ -95,7 +95,10 @@ export const TouchJoystick: React.FC<TouchJoystickProps> = ({
9595
left: `${20 * scale}px`,
9696
width: `${140 * scale}px`,
9797
height: `${140 * scale}px`,
98-
touchAction: 'none'
98+
touchAction: 'none',
99+
backgroundColor: 'rgba(255, 255, 255, 0.15)',
100+
border: '2px solid rgba(255, 255, 255, 0.3)',
101+
borderRadius: '50%'
99102
}}
100103
/>
101104
)

0 commit comments

Comments
 (0)