2026-08-09 03:24:28 +02:00
|
|
|
extends Control
|
|
|
|
|
|
|
|
|
|
@onready var in_game_menu: Control = %InGameMenu
|
|
|
|
|
@onready var debug_menu: Control = %DebugMenu
|
2026-08-13 13:28:13 +02:00
|
|
|
@onready var inventory_menu: Control = %InventoryMenu
|
2026-08-09 03:24:28 +02:00
|
|
|
|
2026-08-16 22:38:23 +02:00
|
|
|
func toggle_self():
|
|
|
|
|
visible = !visible
|
|
|
|
|
|
2026-08-09 03:24:28 +02:00
|
|
|
func toggle_debug_menu():
|
|
|
|
|
debug_menu.visible = !debug_menu.visible
|
|
|
|
|
|
2026-08-13 17:06:15 +02:00
|
|
|
func toggle_inventory_menu(equipped_backpack, hotbar_component):
|
|
|
|
|
if not Console.toggled:
|
|
|
|
|
if inventory_menu.visible:
|
|
|
|
|
inventory_menu.hide()
|
|
|
|
|
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
|
|
|
|
else:
|
|
|
|
|
inventory_menu.show()
|
|
|
|
|
inventory_menu.open_inventory(equipped_backpack, hotbar_component)
|
|
|
|
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
|
|
|
|
|
2026-08-09 03:24:28 +02:00
|
|
|
func toggle_in_game_menu():
|
2026-08-12 01:47:15 +02:00
|
|
|
if not Console.toggled:
|
|
|
|
|
in_game_menu.visible = !in_game_menu.visible
|
|
|
|
|
if in_game_menu.visible:
|
|
|
|
|
GameState.player.ui.visible = false
|
|
|
|
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
|
|
|
|
else:
|
|
|
|
|
GameState.player.ui.visible = true
|
|
|
|
|
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|