added battle state as globals, adds half working battle flow
This commit is contained in:
parent
b09eee0805
commit
4963131d3e
12 changed files with 250 additions and 95 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=19 format=3 uid="uid://dyroahq85mhws"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://dyroahq85mhws"]
|
||||
|
||||
[ext_resource type="Script" path="res://ui/battle_ui/battle_ui.gd" id="1_jyqir"]
|
||||
[ext_resource type="Texture2D" uid="uid://ve2k0qrfpwxw" path="res://assets/textures/Generic/Vector/generic_button_circle_fill.svg" id="2_keyyt"]
|
||||
|
|
@ -56,6 +56,20 @@ expand_margin_top = 1.0
|
|||
expand_margin_right = 1.0
|
||||
expand_margin_bottom = 1.0
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jwbwi"]
|
||||
bg_color = Color(0, 0, 0, 1)
|
||||
border_width_left = 3
|
||||
border_width_top = 3
|
||||
border_width_right = 3
|
||||
border_width_bottom = 3
|
||||
border_color = Color(1, 1, 1, 1)
|
||||
corner_radius_top_left = 6
|
||||
corner_radius_top_right = 6
|
||||
corner_radius_bottom_right = 6
|
||||
corner_radius_bottom_left = 6
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_5e62u"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_eqgks"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_4ki2k"]
|
||||
|
|
@ -193,25 +207,53 @@ theme_override_constants/margin_left = 30
|
|||
theme_override_constants/margin_right = 30
|
||||
theme_override_constants/margin_bottom = 50
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="BottomMarginContainer"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="BottomMarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 20
|
||||
alignment = 2
|
||||
|
||||
[node name="MessageContainer" type="MarginContainer" parent="BottomMarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="BottomMarginContainer/VBoxContainer/MessageContainer"]
|
||||
custom_minimum_size = Vector2(0, 100)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_jwbwi")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="BottomMarginContainer/VBoxContainer/MessageContainer/PanelContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 8
|
||||
theme_override_constants/margin_top = 8
|
||||
theme_override_constants/margin_right = 8
|
||||
theme_override_constants/margin_bottom = 8
|
||||
|
||||
[node name="Message" type="Label" parent="BottomMarginContainer/VBoxContainer/MessageContainer/PanelContainer/MarginContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
text = "A wild monster appeared!"
|
||||
label_settings = SubResource("LabelSettings_5e62u")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="BottomMarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PartyFighterContainer" type="HBoxContainer" parent="BottomMarginContainer/HBoxContainer"]
|
||||
[node name="PartyFighterContainer" type="HBoxContainer" parent="BottomMarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="PartyAliveStatus" type="VBoxContainer" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer"]
|
||||
[node name="PartyAliveStatus" type="VBoxContainer" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PartyAliveStatus1" type="TextureRect" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
[node name="PartyAliveStatus1" type="TextureRect" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="PartyAliveStatus2" type="TextureRect" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
[node name="PartyAliveStatus2" type="TextureRect" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
self_modulate = Color(1, 1, 1, 0.392157)
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
|
|
@ -219,7 +261,7 @@ size_flags_horizontal = 0
|
|||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="PartyAliveStatus3" type="TextureRect" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
[node name="PartyAliveStatus3" type="TextureRect" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
self_modulate = Color(1, 1, 1, 0.392157)
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
|
|
@ -227,7 +269,7 @@ size_flags_horizontal = 0
|
|||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="PartyAliveStatus4" type="TextureRect" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
[node name="PartyAliveStatus4" type="TextureRect" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
self_modulate = Color(1, 1, 1, 0.392157)
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
|
|
@ -235,7 +277,7 @@ size_flags_horizontal = 0
|
|||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="PartyAliveStatus5" type="TextureRect" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
[node name="PartyAliveStatus5" type="TextureRect" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
self_modulate = Color(1, 1, 1, 0.392157)
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
|
|
@ -243,7 +285,7 @@ size_flags_horizontal = 0
|
|||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="PartyAliveStatus6" type="TextureRect" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
[node name="PartyAliveStatus6" type="TextureRect" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyAliveStatus"]
|
||||
self_modulate = Color(1, 1, 1, 0.392157)
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
|
|
@ -251,25 +293,25 @@ size_flags_horizontal = 0
|
|||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="PartyFighterInfo" type="VBoxContainer" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer"]
|
||||
[node name="PartyFighterInfo" type="VBoxContainer" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="LevelAndGender" type="HBoxContainer" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo"]
|
||||
[node name="LevelAndGender" type="HBoxContainer" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Level" type="PanelContainer" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo/LevelAndGender"]
|
||||
[node name="Level" type="PanelContainer" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo/LevelAndGender"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_6o8cs")
|
||||
|
||||
[node name="PartyFighterLevel" type="Label" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo/LevelAndGender/Level"]
|
||||
[node name="PartyFighterLevel" type="Label" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo/LevelAndGender/Level"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Lv. 99"
|
||||
label_settings = SubResource("LabelSettings_38ujs")
|
||||
|
||||
[node name="PartyFighterGender" type="TextureRect" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo/LevelAndGender"]
|
||||
[node name="PartyFighterGender" type="TextureRect" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo/LevelAndGender"]
|
||||
unique_name_in_owner = true
|
||||
self_modulate = Color(0.450091, 0.470517, 0.93375, 1)
|
||||
custom_minimum_size = Vector2(12, 12)
|
||||
|
|
@ -278,13 +320,13 @@ texture = ExtResource("3_fa6tk")
|
|||
expand_mode = 2
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="PartyFighterName" type="Label" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo"]
|
||||
[node name="PartyFighterName" type="Label" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Monstername"
|
||||
label_settings = SubResource("LabelSettings_kcdfy")
|
||||
|
||||
[node name="PartyFighterHealthbar" type="ProgressBar" parent="BottomMarginContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo"]
|
||||
[node name="PartyFighterHealthbar" type="ProgressBar" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/PartyFighterContainer/PartyFighterInfo"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_auqmk")
|
||||
|
|
@ -292,17 +334,17 @@ theme_override_styles/fill = SubResource("StyleBoxFlat_84eln")
|
|||
value = 50.0
|
||||
show_percentage = false
|
||||
|
||||
[node name="Spacer" type="Control" parent="BottomMarginContainer/HBoxContainer"]
|
||||
[node name="Spacer" type="Control" parent="BottomMarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 0.5
|
||||
|
||||
[node name="MainBattleMenu" type="VBoxContainer" parent="BottomMarginContainer/HBoxContainer"]
|
||||
[node name="MainBattleMenu" type="VBoxContainer" parent="BottomMarginContainer/VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="BattleButton" type="Button" parent="BottomMarginContainer/HBoxContainer/MainBattleMenu"]
|
||||
[node name="BattleButton" type="Button" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/MainBattleMenu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
|
|
@ -318,11 +360,11 @@ theme_override_styles/pressed_mirrored = ExtResource("5_w48y1")
|
|||
theme_override_styles/pressed = ExtResource("5_w48y1")
|
||||
theme_override_styles/normal_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/normal = ExtResource("4_r2q1k")
|
||||
text = "Battle"
|
||||
text = "Attack"
|
||||
icon = ExtResource("4_saqy8")
|
||||
alignment = 0
|
||||
|
||||
[node name="PartyButton" type="Button" parent="BottomMarginContainer/HBoxContainer/MainBattleMenu"]
|
||||
[node name="PartyButton" type="Button" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/MainBattleMenu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
|
|
@ -342,7 +384,7 @@ text = "Party"
|
|||
icon = ExtResource("5_pnobx")
|
||||
alignment = 0
|
||||
|
||||
[node name="ItemsButton" type="Button" parent="BottomMarginContainer/HBoxContainer/MainBattleMenu"]
|
||||
[node name="ItemsButton" type="Button" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/MainBattleMenu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
|
|
@ -362,7 +404,7 @@ text = "Items"
|
|||
icon = ExtResource("6_ikm1n")
|
||||
alignment = 0
|
||||
|
||||
[node name="RunButton" type="Button" parent="BottomMarginContainer/HBoxContainer/MainBattleMenu"]
|
||||
[node name="RunButton" type="Button" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/MainBattleMenu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
|
|
@ -382,10 +424,10 @@ text = "Run"
|
|||
icon = ExtResource("7_tihhr")
|
||||
alignment = 0
|
||||
|
||||
[node name="BattleMovesMenu" type="VBoxContainer" parent="BottomMarginContainer/HBoxContainer"]
|
||||
[node name="BattleMovesMenu" type="VBoxContainer" parent="BottomMarginContainer/VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[connection signal="pressed" from="BottomMarginContainer/HBoxContainer/MainBattleMenu/BattleButton" to="." method="_on_battle_button_pressed"]
|
||||
[connection signal="pressed" from="BottomMarginContainer/VBoxContainer/HBoxContainer/MainBattleMenu/BattleButton" to="." method="_on_battle_button_pressed"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue