Migrate hotbar to bubble UI
This commit is contained in:
parent
48a3ab03ea
commit
22f7119b72
7 changed files with 596 additions and 228 deletions
113
ui/hotbar.tscn
113
ui/hotbar.tscn
|
|
@ -1,25 +1,24 @@
|
|||
[gd_scene load_steps=3 format=3]
|
||||
[gd_scene load_steps=4 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://ui/hotbar.gd" id="1_script"]
|
||||
[ext_resource type="Theme" path="res://ui/game_theme.tres" id="2_theme"]
|
||||
[ext_resource type="PackedScene" path="res://ui/components/bubble_hotbar/bubble_hotbar_slot.tscn" id="3_slot"]
|
||||
|
||||
[node name="Hotbar" type="Control"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
z_index = 20
|
||||
layout_mode = 3
|
||||
anchors_preset = 12
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -84.0
|
||||
offset_bottom = -8.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
theme = ExtResource("2_theme")
|
||||
script = ExtResource("1_script")
|
||||
|
||||
[node name="Center" type="CenterContainer" parent="."]
|
||||
[node name="ResponsiveHotbarStage" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
|
@ -28,36 +27,100 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Panel" type="PanelContainer" parent="Center"]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Margin" type="MarginContainer" parent="Center/Panel"]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
theme_override_constants/margin_left = 5
|
||||
theme_override_constants/margin_top = 5
|
||||
theme_override_constants/margin_right = 5
|
||||
theme_override_constants/margin_bottom = 5
|
||||
|
||||
[node name="SlotRow" type="HBoxContainer" parent="Center/Panel/Margin"]
|
||||
[node name="HotbarPresentationScaleRoot" type="Control" parent="ResponsiveHotbarStage"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
layout_mode = 0
|
||||
offset_right = 1280.0
|
||||
offset_bottom = 720.0
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 4
|
||||
|
||||
[node name="SelectedItemLabel" type="Label" parent="."]
|
||||
[node name="BubbleField" type="Control" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 230.0
|
||||
offset_top = 608.0
|
||||
offset_right = 1050.0
|
||||
offset_bottom = 712.0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Slot1" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot/BubbleField" instance=ExtResource("3_slot")]
|
||||
layout_mode = 0
|
||||
slot_index = 0
|
||||
desktop_anchor = Vector2(58, 49)
|
||||
compact_anchor = Vector2(52, 42)
|
||||
motion_phase = 0.15
|
||||
|
||||
[node name="Slot2" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot/BubbleField" instance=ExtResource("3_slot")]
|
||||
layout_mode = 0
|
||||
slot_index = 1
|
||||
desktop_anchor = Vector2(146, 53)
|
||||
compact_anchor = Vector2(114, 46)
|
||||
motion_phase = 0.82
|
||||
|
||||
[node name="Slot3" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot/BubbleField" instance=ExtResource("3_slot")]
|
||||
layout_mode = 0
|
||||
slot_index = 2
|
||||
desktop_anchor = Vector2(234, 57)
|
||||
compact_anchor = Vector2(176, 50)
|
||||
motion_phase = 1.49
|
||||
|
||||
[node name="Slot4" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot/BubbleField" instance=ExtResource("3_slot")]
|
||||
layout_mode = 0
|
||||
slot_index = 3
|
||||
desktop_anchor = Vector2(322, 60)
|
||||
compact_anchor = Vector2(238, 53)
|
||||
motion_phase = 2.16
|
||||
|
||||
[node name="Slot5" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot/BubbleField" instance=ExtResource("3_slot")]
|
||||
layout_mode = 0
|
||||
slot_index = 4
|
||||
desktop_anchor = Vector2(410, 62)
|
||||
compact_anchor = Vector2(300, 55)
|
||||
motion_phase = 2.83
|
||||
|
||||
[node name="Slot6" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot/BubbleField" instance=ExtResource("3_slot")]
|
||||
layout_mode = 0
|
||||
slot_index = 5
|
||||
desktop_anchor = Vector2(498, 60)
|
||||
compact_anchor = Vector2(362, 53)
|
||||
motion_phase = 3.5
|
||||
|
||||
[node name="Slot7" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot/BubbleField" instance=ExtResource("3_slot")]
|
||||
layout_mode = 0
|
||||
slot_index = 6
|
||||
desktop_anchor = Vector2(586, 57)
|
||||
compact_anchor = Vector2(424, 50)
|
||||
motion_phase = 4.17
|
||||
|
||||
[node name="Slot8" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot/BubbleField" instance=ExtResource("3_slot")]
|
||||
layout_mode = 0
|
||||
slot_index = 7
|
||||
desktop_anchor = Vector2(674, 53)
|
||||
compact_anchor = Vector2(486, 46)
|
||||
motion_phase = 4.84
|
||||
|
||||
[node name="Slot9" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot/BubbleField" instance=ExtResource("3_slot")]
|
||||
layout_mode = 0
|
||||
slot_index = 8
|
||||
desktop_anchor = Vector2(762, 49)
|
||||
compact_anchor = Vector2(548, 42)
|
||||
motion_phase = 5.51
|
||||
|
||||
[node name="SelectedItemLabel" type="Label" parent="ResponsiveHotbarStage/HotbarPresentationScaleRoot"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchors_preset = 12
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -150.0
|
||||
offset_top = -28.0
|
||||
offset_top = -132.0
|
||||
offset_right = 150.0
|
||||
offset_bottom = -8.0
|
||||
offset_bottom = -112.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
mouse_filter = 2
|
||||
clip_text = true
|
||||
text_overrun_behavior = 3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue