diff --git a/project.godot b/project.godot index fd1383a025b..0961a757d43 100644 --- a/project.godot +++ b/project.godot @@ -266,12 +266,14 @@ quit={ undo={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"command_or_control_autoremap":true,"alt_pressed":false,"shift_pressed":false,"pressed":false,"keycode":90,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":8,"canceled":false,"pressed":false,"double_click":false,"script":null) ] } redo={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"command_or_control_autoremap":true,"alt_pressed":false,"shift_pressed":false,"pressed":false,"keycode":89,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"command_or_control_autoremap":true,"alt_pressed":false,"shift_pressed":true,"pressed":false,"keycode":90,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(138, 9),"global_position":Vector2(147, 55),"factor":1.0,"button_index":9,"canceled":false,"pressed":true,"double_click":false,"script":null) ] } show_grid={ diff --git a/src/UI/TopMenuContainer/TopMenuContainer.gd b/src/UI/TopMenuContainer/TopMenuContainer.gd index b2342a65773..c9c121d30f7 100644 --- a/src/UI/TopMenuContainer/TopMenuContainer.gd +++ b/src/UI/TopMenuContainer/TopMenuContainer.gd @@ -98,6 +98,18 @@ func _ready() -> void: _setup_help_menu() +func _input(event: InputEvent) -> void: + if event is InputEventMouseButton and event.pressed: + file_menu.activate_item_by_event(event) + edit_menu.activate_item_by_event(event) + select_menu.activate_item_by_event(event) + image_menu.activate_item_by_event(event) + effects_menu.activate_item_by_event(event) + view_menu.activate_item_by_event(event) + window_menu.activate_item_by_event(event) + help_menu.activate_item_by_event(event) + + func _notification(what: int) -> void: if what == NOTIFICATION_TRANSLATION_CHANGED and Global.current_project != null: _update_file_menu_buttons(Global.current_project)