fixed camera script and restructured ui folder
This commit is contained in:
parent
877ebafc74
commit
5748d34b34
32 changed files with 781 additions and 162 deletions
52
ui/battle_ui/battle_move_button.tscn
Normal file
52
ui/battle_ui/battle_move_button.tscn
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://vxwg04fxtbxf"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://d1324yxmpvk8e" path="res://assets/textures/Game Icons/Vector/2x/wrench.png" id="1_2tmqf"]
|
||||
[ext_resource type="Texture2D" uid="uid://ofkfd2bydpph" path="res://assets/textures/Generic/Vector/generic_button_circle_outline.svg" id="2_88fpt"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_ps1u1"]
|
||||
font_size = 24
|
||||
|
||||
[node name="Move1" type="PanelContainer"]
|
||||
offset_right = 236.0
|
||||
offset_bottom = 73.0
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 6
|
||||
theme_override_constants/margin_top = 6
|
||||
theme_override_constants/margin_right = 6
|
||||
theme_override_constants/margin_bottom = 6
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_2tmqf")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="MoveName" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Move Name 1"
|
||||
label_settings = SubResource("LabelSettings_ps1u1")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2_88fpt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Effective"
|
||||
|
||||
[node name="Label2" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 10
|
||||
text = "10 / 10"
|
||||
18
ui/battle_ui/battle_ui.gd
Normal file
18
ui/battle_ui/battle_ui.gd
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
extends Control
|
||||
|
||||
var move_button = preload("res://ui/battle_ui/battle_move_button.tscn")
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
self.visible = false
|
||||
for i in range(4):
|
||||
var button = move_button.instantiate()
|
||||
$MarginContainer/HBoxContainer/BattleMovesMenu.add_child(button)
|
||||
|
||||
|
||||
func _on_battle_button_pressed() -> void:
|
||||
print("attack here")
|
||||
# attack here
|
||||
#%MainBattleMenu.visible = false
|
||||
#%BattleMovesMenu.visible = true
|
||||
pass # Replace with function body.
|
||||
281
ui/battle_ui/battle_ui.tscn
Normal file
281
ui/battle_ui/battle_ui.tscn
Normal file
|
|
@ -0,0 +1,281 @@
|
|||
[gd_scene load_steps=19 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"]
|
||||
[ext_resource type="Texture2D" uid="uid://4t8cotroofge" path="res://assets/textures/Game Icons/Vector/2x/upRight.png" id="3_fa6tk"]
|
||||
[ext_resource type="StyleBox" uid="uid://ddtjhp2lob6to" path="res://ui/styles/battle_ui_normal_button.tres" id="4_r2q1k"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxry7h4q17lir" path="res://assets/textures/Game Icons/Vector/2x/star.png" id="4_saqy8"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1dlsfah0ioi5" path="res://assets/textures/Game Icons/Vector/2x/massiveMultiplayer.png" id="5_pnobx"]
|
||||
[ext_resource type="StyleBox" uid="uid://cv8ispcxuwjn5" path="res://ui/styles/battle_ui_pressed_button.tres" id="5_w48y1"]
|
||||
[ext_resource type="Texture2D" uid="uid://dbycrn4i3wkhu" path="res://assets/textures/Game Icons/Vector/2x/menuList.png" id="6_ikm1n"]
|
||||
[ext_resource type="Texture2D" uid="uid://cs84avwwjbn5q" path="res://assets/textures/Game Icons/Vector/2x/exitRight.png" id="7_tihhr"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6o8cs"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_top = 2.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 2.0
|
||||
bg_color = Color(0, 0, 0, 0.501961)
|
||||
corner_radius_top_left = 12
|
||||
corner_radius_top_right = 12
|
||||
corner_radius_bottom_right = 12
|
||||
corner_radius_bottom_left = 12
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_38ujs"]
|
||||
font_size = 26
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_kcdfy"]
|
||||
font_size = 26
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_auqmk"]
|
||||
content_margin_top = 10.0
|
||||
content_margin_right = 10.0
|
||||
bg_color = Color(0, 0, 0, 0.392157)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(1, 1, 1, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
expand_margin_left = 3.0
|
||||
expand_margin_top = 3.0
|
||||
expand_margin_right = 3.0
|
||||
expand_margin_bottom = 3.0
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_84eln"]
|
||||
bg_color = Color(0, 0.712615, 0.446827, 1)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 3
|
||||
expand_margin_left = 1.0
|
||||
expand_margin_top = 1.0
|
||||
expand_margin_right = 1.0
|
||||
expand_margin_bottom = 1.0
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_eqgks"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_4ki2k"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cabkl"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_g6kqv"]
|
||||
|
||||
[node name="BattleUI" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1_jyqir")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -138.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme_override_constants/margin_left = 30
|
||||
theme_override_constants/margin_right = 30
|
||||
theme_override_constants/margin_bottom = 50
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Left" type="HBoxContainer" parent="MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="PartyAliveStatus" type="VBoxContainer" parent="MarginContainer/HBoxContainer/Left"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Monster1" type="TextureRect" parent="MarginContainer/HBoxContainer/Left/PartyAliveStatus"]
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="Monster2" type="TextureRect" parent="MarginContainer/HBoxContainer/Left/PartyAliveStatus"]
|
||||
self_modulate = Color(1, 1, 1, 0.392157)
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="Monster3" type="TextureRect" parent="MarginContainer/HBoxContainer/Left/PartyAliveStatus"]
|
||||
self_modulate = Color(1, 1, 1, 0.392157)
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="Monster4" type="TextureRect" parent="MarginContainer/HBoxContainer/Left/PartyAliveStatus"]
|
||||
self_modulate = Color(1, 1, 1, 0.392157)
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="Monster5" type="TextureRect" parent="MarginContainer/HBoxContainer/Left/PartyAliveStatus"]
|
||||
self_modulate = Color(1, 1, 1, 0.392157)
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="Monster6" type="TextureRect" parent="MarginContainer/HBoxContainer/Left/PartyAliveStatus"]
|
||||
self_modulate = Color(1, 1, 1, 0.392157)
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
texture = ExtResource("2_keyyt")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="PartyFighterInfo" type="VBoxContainer" parent="MarginContainer/HBoxContainer/Left"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="LevelAndGender" type="HBoxContainer" parent="MarginContainer/HBoxContainer/Left/PartyFighterInfo"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Level" type="PanelContainer" parent="MarginContainer/HBoxContainer/Left/PartyFighterInfo/LevelAndGender"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_6o8cs")
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/HBoxContainer/Left/PartyFighterInfo/LevelAndGender/Level"]
|
||||
layout_mode = 2
|
||||
text = "Lv. 99"
|
||||
label_settings = SubResource("LabelSettings_38ujs")
|
||||
|
||||
[node name="Gender" type="TextureRect" parent="MarginContainer/HBoxContainer/Left/PartyFighterInfo/LevelAndGender"]
|
||||
self_modulate = Color(0.450091, 0.470517, 0.93375, 1)
|
||||
custom_minimum_size = Vector2(12, 12)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("3_fa6tk")
|
||||
expand_mode = 2
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="MonsterName" type="Label" parent="MarginContainer/HBoxContainer/Left/PartyFighterInfo"]
|
||||
layout_mode = 2
|
||||
text = "Monstername"
|
||||
label_settings = SubResource("LabelSettings_kcdfy")
|
||||
|
||||
[node name="ProgressBar" type="ProgressBar" parent="MarginContainer/HBoxContainer/Left/PartyFighterInfo"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_auqmk")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_84eln")
|
||||
value = 50.0
|
||||
show_percentage = false
|
||||
|
||||
[node name="Spacer" type="Control" parent="MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 0.5
|
||||
|
||||
[node name="MainBattleMenu" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="BattleButton" type="Button" parent="MarginContainer/HBoxContainer/MainBattleMenu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
theme_override_font_sizes/font_size = 26
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_eqgks")
|
||||
theme_override_styles/disabled_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/disabled = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_pressed_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_pressed = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover = ExtResource("4_r2q1k")
|
||||
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"
|
||||
icon = ExtResource("4_saqy8")
|
||||
alignment = 0
|
||||
|
||||
[node name="PartyButton" type="Button" parent="MarginContainer/HBoxContainer/MainBattleMenu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
theme_override_font_sizes/font_size = 26
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_4ki2k")
|
||||
theme_override_styles/disabled_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/disabled = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_pressed_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_pressed = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover = ExtResource("4_r2q1k")
|
||||
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 = "Party"
|
||||
icon = ExtResource("5_pnobx")
|
||||
alignment = 0
|
||||
|
||||
[node name="ItemsButton" type="Button" parent="MarginContainer/HBoxContainer/MainBattleMenu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
theme_override_font_sizes/font_size = 26
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_cabkl")
|
||||
theme_override_styles/disabled_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/disabled = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_pressed_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_pressed = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover = ExtResource("4_r2q1k")
|
||||
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 = "Items"
|
||||
icon = ExtResource("6_ikm1n")
|
||||
alignment = 0
|
||||
|
||||
[node name="RunButton" type="Button" parent="MarginContainer/HBoxContainer/MainBattleMenu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
theme_override_font_sizes/font_size = 26
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_g6kqv")
|
||||
theme_override_styles/disabled_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/disabled = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_pressed_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_pressed = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover_mirrored = ExtResource("4_r2q1k")
|
||||
theme_override_styles/hover = ExtResource("4_r2q1k")
|
||||
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 = "Run"
|
||||
icon = ExtResource("7_tihhr")
|
||||
alignment = 0
|
||||
|
||||
[node name="BattleMovesMenu" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/HBoxContainer/MainBattleMenu/BattleButton" to="." method="_on_battle_button_pressed"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue