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:
@@ -0,0 +1,44 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dnwg8b7xmh5qa"]
|
||||
|
||||
[ext_resource type="Script" path="res://level/ui/scripts/weapon_slot.gd" id="1_script"]
|
||||
[ext_resource type="Theme" uid="uid://dvsh7tuhulnfm" path="res://level/ui/theme/wow_style.tres" id="2_theme"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_slot"]
|
||||
bg_color = Color(0.15, 0.15, 0.15, 0.9)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.6, 0.5, 0.2, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[node name="WeaponSlot" type="Control"]
|
||||
custom_minimum_size = Vector2(80, 80)
|
||||
mouse_filter = 0
|
||||
theme = ExtResource("2_theme")
|
||||
script = ExtResource("1_script")
|
||||
|
||||
[node name="SlotPanel" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_slot")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="SlotPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 4
|
||||
theme_override_constants/margin_top = 4
|
||||
theme_override_constants/margin_right = 4
|
||||
theme_override_constants/margin_bottom = 4
|
||||
|
||||
[node name="IconRect" type="TextureRect" parent="SlotPanel/MarginContainer"]
|
||||
layout_mode = 2
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
Reference in New Issue
Block a user