Add comprehensive UI system with action bar, unit frame, and character sheet
- Created UI system in level/ui/ folder - Action bar with 12 ability slots (Attack, Block, Dash, Jump + 8 expansion slots) - Unit frame showing player portrait with health bar - Character sheet/spellbook (toggle with Tab) displaying stats, weapons, and abilities - Tab hint indicator showing how to open character sheet - Custom theme with golden borders and dark backgrounds - UI Components: - HUD Manager autoload handles all UI initialization and player connections - Ability buttons with cooldown overlay and keybind display - Real-time health and cooldown tracking via signals - Scrollable character sheet with two-page layout - Player Integration: - Added UI signals: dash_cooldown_updated, attack_cooldown_updated, weapon_equipped_changed - Mouse capture system (Escape to toggle, click to recapture) - Synced attack cooldown from weapons to player for UI tracking - Updated level.gd to connect local player to HUD Manager - Updated CLAUDE.md with git commit guidelines
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b4h0p6nbcq35b"]
|
||||
|
||||
[ext_resource type="Script" path="res://level/ui/scripts/action_bar.gd" id="1_script"]
|
||||
[ext_resource type="PackedScene" uid="uid://cq7xyb8n4h6yk" path="res://level/ui/scenes/ability_button.tscn" id="2_ability_button"]
|
||||
|
||||
[node name="ActionBar" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -400.0
|
||||
offset_top = -100.0
|
||||
offset_right = 400.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
script = ExtResource("1_script")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/separation = 4
|
||||
alignment = 1
|
||||
|
||||
[node name="Slot1" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot2" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot3" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot4" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot5" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot6" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot7" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot8" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot9" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot10" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot11" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Slot12" parent="HBoxContainer" instance=ExtResource("2_ability_button")]
|
||||
layout_mode = 2
|
||||
Reference in New Issue
Block a user