Add escape menu and weapon slot tooltips to character sheet

- Escape Menu:
  - Opens with Escape key from base game screen
  - Resume button to return to game
  - Exit Game button to quit application
  - Character sheet closes with Escape if open (takes priority)
  - Mouse capture/release handled by UI components

- Weapon Slot System:
  - Visual weapon boxes (80x80) in character sheet
  - Display weapon icons from WeaponData
  - Empty slots appear dimmed
  - Hover tooltips show weapon stats (not clipped by containers)
  - Tooltips display: slot name, weapon name, damage, range, cooldown, knockback, block percentage
  - Tooltips positioned globally to avoid ScrollContainer clipping

- Bug Fixes:
  - Fixed typo in lilguy_body.gd (dwextends -> extends)
  - Removed manual mouse toggle from player (now handled by UI)

- Updated character_sheet.gd to use weapon slot components instead of text labels
- Added weapon_tooltip.tscn as separate scene for unclipped tooltips
This commit is contained in:
2025-11-16 23:11:51 +00:00
parent 15865dd15f
commit aba42e2a02
10 changed files with 382 additions and 37 deletions
+14
View File
@@ -8,6 +8,7 @@ var unit_frame: Control = null
var target_frame: Control = null
var character_sheet: Control = null
var tab_hint: Control = null
var escape_menu: Control = null
# Player reference
var local_player: Character = null
@@ -76,6 +77,7 @@ func _create_ui_components():
_create_unit_frame()
_create_character_sheet()
_create_tab_hint()
_create_escape_menu()
## Create action bar at bottom of screen
func _create_action_bar():
@@ -123,6 +125,18 @@ func _create_tab_hint():
else:
push_error("[HUD] Failed to load tab_hint.tscn")
## Create escape menu (toggle with Escape)
func _create_escape_menu():
var escape_menu_scene = load("res://level/ui/scenes/escape_menu.tscn")
if escape_menu_scene:
escape_menu = escape_menu_scene.instantiate()
add_child(escape_menu)
if escape_menu and local_player:
escape_menu.set_player(local_player)
print("[HUD] Escape menu created")
else:
push_error("[HUD] Failed to load escape_menu.tscn")
## Show all UI components
func show_hud():
show()