- Edited
I want create the context menu in my game, which appears right on the game field, but if I just create it and place where I need, game field will be proccess mouse events under the context menu and when player doing something in this menu, game field reacting. In other words, I want to create focus on specific GUI element.
for example:
script:
extends Sprite
func _process(delta):
if Input.is_action_just_pressed("mouse_left"):
if get_rect().has_point(get_local_mouse_position()):
modulate = Color(1, 0, 0)
I want to sprite colored red only when I click outside texture rect: