conforms file names to consistant standard
This commit is contained in:
7
ui/menus/CharacterSelect/character_podium.gd
Normal file
7
ui/menus/CharacterSelect/character_podium.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
class_name CharacterPodium extends Node3D
|
||||
|
||||
@export var text: String = ""
|
||||
|
||||
|
||||
func show_content() -> void:
|
||||
$Base/Content.visible = true
|
||||
1
ui/menus/CharacterSelect/character_podium.gd.uid
Normal file
1
ui/menus/CharacterSelect/character_podium.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bc0xyfr5nj1ul
|
||||
40
ui/menus/CharacterSelect/character_preview.gd
Normal file
40
ui/menus/CharacterSelect/character_preview.gd
Normal file
@@ -0,0 +1,40 @@
|
||||
class_name CharacterPreview extends PanelContainer
|
||||
|
||||
@export var tower_label_scene: PackedScene
|
||||
@export var tower_label_container: VBoxContainer
|
||||
@export var hero_name_label: Label
|
||||
|
||||
var added_tags: Array[TowerLabel] = []
|
||||
var regular_label: Label = null
|
||||
|
||||
|
||||
func set_preview(hero: HeroClass) -> void:
|
||||
hero_name_label.text = tr(hero.hero_name)
|
||||
if regular_label:
|
||||
regular_label.queue_free()
|
||||
regular_label = null
|
||||
for tag: TowerLabel in added_tags:
|
||||
tag.queue_free()
|
||||
added_tags = []
|
||||
var added_labels: Array[Cassette] = []
|
||||
for cassette: Cassette in hero.deck:
|
||||
if !added_labels.has(cassette):
|
||||
var new_label: TowerLabel = tower_label_scene.instantiate() as TowerLabel
|
||||
new_label.change_label(tr(cassette.display_name), str(hero.deck.count(cassette)))
|
||||
added_labels.append(cassette)
|
||||
tower_label_container.add_child(new_label)
|
||||
added_tags.append(new_label)
|
||||
|
||||
|
||||
func setup_with_basic_text(hero: HeroClass, text: String) -> void:
|
||||
hero_name_label.text = tr(hero.hero_name)
|
||||
if regular_label:
|
||||
regular_label.queue_free()
|
||||
regular_label = null
|
||||
for tag: TowerLabel in added_tags:
|
||||
tag.queue_free()
|
||||
added_tags = []
|
||||
var new_label: Label = Label.new()
|
||||
new_label.text = text
|
||||
tower_label_container.add_child(new_label)
|
||||
regular_label = new_label
|
||||
1
ui/menus/CharacterSelect/character_preview.gd.uid
Normal file
1
ui/menus/CharacterSelect/character_preview.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b1ucgfqilvr67
|
||||
80
ui/menus/CharacterSelect/character_select.gd
Normal file
80
ui/menus/CharacterSelect/character_select.gd
Normal file
@@ -0,0 +1,80 @@
|
||||
class_name CharacterSelect extends Node3D
|
||||
|
||||
signal hero_selected(hero_class: int)
|
||||
signal hero_confirmed()
|
||||
|
||||
@export var hero_preview_panel: CharacterPreview
|
||||
|
||||
var podiums: Array[CharacterPodium]
|
||||
|
||||
var character_selected: int = 0
|
||||
var can_hit_button: bool = true
|
||||
|
||||
func _ready() -> void:
|
||||
hero_preview_panel.set_preview(Data.characters[0])
|
||||
var heroes: int = Data.characters.size()
|
||||
var x: int = 0
|
||||
for hero: HeroClass in Data.characters:
|
||||
var pivot: Node3D = Node3D.new()
|
||||
$Podiums.add_child(pivot)
|
||||
var podium: CharacterPodium = hero.podium.instantiate() as CharacterPodium
|
||||
podium.position = Vector3(0.0, -0.5, 5.0)
|
||||
podiums.append(podium)
|
||||
pivot.add_child(podium)
|
||||
pivot.rotate_y((TAU / heroes) * x)
|
||||
x += 1
|
||||
podiums[0].show_content()
|
||||
if Data.save_data.mage_unlocked:
|
||||
podiums[1].show_content()
|
||||
|
||||
|
||||
func reset_button() -> void:
|
||||
can_hit_button = true
|
||||
|
||||
|
||||
func setup_ui() -> void:
|
||||
#TODO: This should all tie into a proper achievements system
|
||||
if character_selected == 0 or (character_selected == 1 and Data.save_data.mage_unlocked):
|
||||
$Controls/ConfirmButton.disabled = false
|
||||
hero_preview_panel.set_preview(Data.characters[character_selected])
|
||||
hero_selected.emit(character_selected)
|
||||
elif character_selected == 1 and !Data.save_data.mage_unlocked and Data.save_data.mage_cassette_seen_in_shop:
|
||||
hero_preview_panel.setup_with_basic_text(Data.characters[character_selected], "Buy " + str(Data.save_data.mage_cassettes_bought) + "/10 scrolls in the shop to unlock")
|
||||
else:
|
||||
$Controls/ConfirmButton.disabled = true
|
||||
hero_preview_panel.setup_with_basic_text(Data.characters[character_selected], podiums[character_selected].text)
|
||||
|
||||
|
||||
func retreat_selector() -> void:
|
||||
if !can_hit_button:
|
||||
return
|
||||
can_hit_button = false
|
||||
var tween: Tween = create_tween()
|
||||
tween.set_ease(Tween.EASE_OUT)
|
||||
tween.set_trans(Tween.TRANS_CUBIC)
|
||||
tween.tween_property($Node3D, "rotation_degrees", Vector3(0.0, $Node3D.rotation_degrees.y - 90.0, 0.0), 1.0)
|
||||
tween.tween_callback(reset_button)
|
||||
character_selected -= 1
|
||||
if character_selected < 0:
|
||||
character_selected = Data.characters.size() - 1
|
||||
setup_ui()
|
||||
|
||||
|
||||
func advance_selector() -> void:
|
||||
if !can_hit_button:
|
||||
return
|
||||
can_hit_button = false
|
||||
var tween: Tween = create_tween()
|
||||
tween.set_ease(Tween.EASE_OUT)
|
||||
tween.set_trans(Tween.TRANS_CUBIC)
|
||||
tween.tween_property($Node3D, "rotation_degrees", Vector3(0.0, $Node3D.rotation_degrees.y + 90.0, 0.0), 1.0)
|
||||
tween.tween_callback(reset_button)
|
||||
character_selected += 1
|
||||
if character_selected >= Data.characters.size():
|
||||
character_selected = 0
|
||||
setup_ui()
|
||||
|
||||
|
||||
func _on_confirm_button_pressed() -> void:
|
||||
$Controls.visible = false
|
||||
hero_confirmed.emit()
|
||||
1
ui/menus/CharacterSelect/character_select.gd.uid
Normal file
1
ui/menus/CharacterSelect/character_select.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://plrd0ckxrabh
|
||||
96
ui/menus/CharacterSelect/character_select.tscn
Normal file
96
ui/menus/CharacterSelect/character_select.tscn
Normal file
@@ -0,0 +1,96 @@
|
||||
[gd_scene format=3 uid="uid://bc6m3cluulpis"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://plrd0ckxrabh" path="res://ui/menus/CharacterSelect/character_select.gd" id="1_lqqhx"]
|
||||
[ext_resource type="Script" uid="uid://b1ucgfqilvr67" path="res://ui/menus/CharacterSelect/character_preview.gd" id="9_8d0rx"]
|
||||
[ext_resource type="PackedScene" uid="uid://clabkhnbn75rf" path="res://ui/tower_label.tscn" id="10_jdigy"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tlgw2"]
|
||||
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
|
||||
ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
|
||||
energy_multiplier = 0.0
|
||||
|
||||
[sub_resource type="Sky" id="Sky_atdxu"]
|
||||
sky_material = SubResource("ProceduralSkyMaterial_tlgw2")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_pq6wd"]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_atdxu")
|
||||
tonemap_mode = 2
|
||||
glow_enabled = true
|
||||
|
||||
[node name="CharacterSelect" type="Node3D" unique_id=436729461 node_paths=PackedStringArray("hero_preview_panel")]
|
||||
script = ExtResource("1_lqqhx")
|
||||
hero_preview_panel = NodePath("PanelContainer")
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1371630210]
|
||||
environment = SubResource("Environment_pq6wd")
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1239254279]
|
||||
transform = Transform3D(-0.866023, -0.433016, 0.250001, 0, 0.499998, 0.866027, -0.500003, 0.749999, -0.43301, 0, 0, 0)
|
||||
light_energy = 0.0
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="Node3D" type="Node3D" parent="." unique_id=1629857614]
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="Node3D" unique_id=1488123111]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.976893, 0.21373, 0, -0.21373, 0.976893, 0, 2.25535, 10.9009)
|
||||
cull_mask = 1047553
|
||||
fov = 39.4
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=39844487 node_paths=PackedStringArray("tower_label_container", "hero_name_label")]
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.05
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.05
|
||||
anchor_bottom = 0.5
|
||||
grow_vertical = 2
|
||||
script = ExtResource("9_8d0rx")
|
||||
tower_label_scene = ExtResource("10_jdigy")
|
||||
tower_label_container = NodePath("HBoxContainer2/HBoxContainer")
|
||||
hero_name_label = NodePath("HBoxContainer2/Label")
|
||||
|
||||
[node name="HBoxContainer2" type="VBoxContainer" parent="PanelContainer" unique_id=190920841]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/HBoxContainer2" unique_id=728476760]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
text = "character name"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="PanelContainer/HBoxContainer2" unique_id=984564366]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="VBoxContainer" parent="PanelContainer/HBoxContainer2" unique_id=1179176427]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Controls" type="VBoxContainer" parent="." unique_id=1200198613]
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.95
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.95
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Controls" unique_id=1966478987]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PrevButton" type="Button" parent="Controls/HBoxContainer" unique_id=1857725137]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_PREVIOUS"
|
||||
|
||||
[node name="NextButton" type="Button" parent="Controls/HBoxContainer" unique_id=1088756994]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_NEXT"
|
||||
|
||||
[node name="ConfirmButton" type="Button" parent="Controls" unique_id=1693979285]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_CONFIRM"
|
||||
|
||||
[node name="Podiums" type="Node3D" parent="." unique_id=743227295]
|
||||
|
||||
[connection signal="pressed" from="Controls/HBoxContainer/PrevButton" to="." method="retreat_selector"]
|
||||
[connection signal="pressed" from="Controls/HBoxContainer/NextButton" to="." method="advance_selector"]
|
||||
[connection signal="pressed" from="Controls/ConfirmButton" to="." method="_on_confirm_button_pressed"]
|
||||
36
ui/menus/GameEndScreen/enemy_row.gd
Normal file
36
ui/menus/GameEndScreen/enemy_row.gd
Normal file
@@ -0,0 +1,36 @@
|
||||
class_name EnemyRow
|
||||
extends VBoxContainer
|
||||
|
||||
signal enemy_clicked(enemy: Enemy)
|
||||
|
||||
@export var wave_label: Label
|
||||
@export var enemy_hbox: HBoxContainer
|
||||
|
||||
var last_pressed_button: Button
|
||||
|
||||
|
||||
func set_wave(wave: int) -> void:
|
||||
wave_label.text = tr("LABEL_WAVE").format({Wave_Number = str(wave)})
|
||||
|
||||
|
||||
func add_enemy_tag(enemy: Enemy, num: int) -> void:
|
||||
var container: MarginContainer = MarginContainer.new()
|
||||
enemy_hbox.add_child(container)
|
||||
var enemy_button: Button = Button.new()
|
||||
enemy_button.icon = enemy.icon
|
||||
enemy_button.texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST
|
||||
enemy_button.icon_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
enemy_button.custom_minimum_size = Vector2(32, 32)
|
||||
enemy_button.pressed.connect(on_button_pressed.bind(enemy))
|
||||
container.add_child(enemy_button)
|
||||
var amount_label: Label = Label.new()
|
||||
amount_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
amount_label.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
amount_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT
|
||||
amount_label.vertical_alignment = VERTICAL_ALIGNMENT_BOTTOM
|
||||
amount_label.text = str(num)
|
||||
container.add_child(amount_label)
|
||||
|
||||
|
||||
func on_button_pressed(enemy: Enemy) -> void:
|
||||
enemy_clicked.emit(enemy)
|
||||
1
ui/menus/GameEndScreen/enemy_row.gd.uid
Normal file
1
ui/menus/GameEndScreen/enemy_row.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b0h5oewxd48lv
|
||||
20
ui/menus/GameEndScreen/enemy_row.tscn
Normal file
20
ui/menus/GameEndScreen/enemy_row.tscn
Normal file
@@ -0,0 +1,20 @@
|
||||
[gd_scene format=3 uid="uid://b5hp43bm07b8a"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b0h5oewxd48lv" path="res://ui/menus/GameEndScreen/enemy_row.gd" id="1_th4b3"]
|
||||
|
||||
[node name="EnemyRow" type="VBoxContainer" unique_id=1785212437 node_paths=PackedStringArray("wave_label", "enemy_hbox")]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_th4b3")
|
||||
wave_label = NodePath("WaveLabel")
|
||||
enemy_hbox = NodePath("Enemies")
|
||||
|
||||
[node name="WaveLabel" type="Label" parent="." unique_id=751370519]
|
||||
layout_mode = 2
|
||||
text = "LABEL_WAVE"
|
||||
|
||||
[node name="Enemies" type="HBoxContainer" parent="." unique_id=1511803695]
|
||||
layout_mode = 2
|
||||
63
ui/menus/GameEndScreen/game_end_screen.gd
Normal file
63
ui/menus/GameEndScreen/game_end_screen.gd
Normal file
@@ -0,0 +1,63 @@
|
||||
class_name GameEndScreen extends PanelContainer
|
||||
|
||||
signal pressed_continue()
|
||||
|
||||
@export var box: PackedScene
|
||||
|
||||
@export var outcome_label: Label
|
||||
@export var winrate_label: Label
|
||||
@export var total_games_label: Label
|
||||
@export var total_wins_label: Label
|
||||
@export var total_losses_label: Label
|
||||
@export var undefeated_enemies: VBoxContainer
|
||||
|
||||
var game_manager: GameManager
|
||||
|
||||
|
||||
func won_game() -> void:
|
||||
$VBoxContainer/Buttons/ContinueButton.visible = true
|
||||
$VBoxContainer/Buttons/PlayButton.visible = false
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
winrate_label.text = str(Data.save_data.winrate) + "%"
|
||||
total_games_label.text = str(Data.save_data.wins + Data.save_data.losses)
|
||||
total_wins_label.text = str(Data.save_data.wins)
|
||||
total_losses_label.text = str(Data.save_data.losses)
|
||||
if game_manager:
|
||||
set_wave()
|
||||
|
||||
|
||||
func set_wave() -> void:
|
||||
for wave_key: int in game_manager.stats.enemies_undefeated:
|
||||
var spawned_box: EnemyRow = box.instantiate() as EnemyRow
|
||||
undefeated_enemies.add_child(spawned_box)
|
||||
spawned_box.set_wave(wave_key)
|
||||
for enemy_key: Enemy in game_manager.stats.enemies_undefeated[wave_key]:
|
||||
spawned_box.add_enemy_tag(enemy_key, game_manager.stats.enemies_undefeated[wave_key][enemy_key])
|
||||
|
||||
|
||||
func set_outcome_message(message: String) -> void:
|
||||
outcome_label.text = message
|
||||
|
||||
|
||||
func _on_quit_button_pressed() -> void:
|
||||
game_manager.scene_switch_main_menu()
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_play_button_pressed() -> void:
|
||||
if game_manager.gamemode.daily == false and !game_manager.gamemode.seeded:
|
||||
game_manager.gamemode.rng_seed = randi()
|
||||
game_manager.setup()
|
||||
game_manager.start()
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_button_mouse_entered() -> void:
|
||||
$AudioStreamPlayer.play()
|
||||
|
||||
|
||||
func _on_continue_button_pressed() -> void:
|
||||
pressed_continue.emit()
|
||||
queue_free()
|
||||
1
ui/menus/GameEndScreen/game_end_screen.gd.uid
Normal file
1
ui/menus/GameEndScreen/game_end_screen.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bdknvktw033g3
|
||||
149
ui/menus/GameEndScreen/game_end_screen.tscn
Normal file
149
ui/menus/GameEndScreen/game_end_screen.tscn
Normal file
@@ -0,0 +1,149 @@
|
||||
[gd_scene format=3 uid="uid://ce0m8vbjbng6o"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bdknvktw033g3" path="res://ui/menus/GameEndScreen/game_end_screen.gd" id="1_oa7nq"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5hp43bm07b8a" path="res://ui/menus/GameEndScreen/enemy_row.tscn" id="2_xm8em"]
|
||||
[ext_resource type="AudioStream" uid="uid://cp6ph4ra7u5rk" path="res://ui/drop_003.ogg" id="3_ro1yg"]
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_dram5"]
|
||||
random_pitch = 1.1
|
||||
streams_count = 1
|
||||
stream_0/stream = ExtResource("3_ro1yg")
|
||||
|
||||
[node name="GameEndScreen" type="PanelContainer" unique_id=385780924 node_paths=PackedStringArray("outcome_label", "winrate_label", "total_games_label", "total_wins_label", "total_losses_label", "undefeated_enemies")]
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.05
|
||||
anchor_top = 0.05
|
||||
anchor_right = 0.95
|
||||
anchor_bottom = 0.95
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_oa7nq")
|
||||
box = ExtResource("2_xm8em")
|
||||
outcome_label = NodePath("VBoxContainer/Labels/OutcomeLabel")
|
||||
winrate_label = NodePath("VBoxContainer/Labels/VBoxContainer/HBoxContainer/WinRateLabel2")
|
||||
total_games_label = NodePath("VBoxContainer/Labels/VBoxContainer/HBoxContainer2/WinRateLabel3")
|
||||
total_wins_label = NodePath("VBoxContainer/Labels/VBoxContainer/HBoxContainer3/WinRateLabel4")
|
||||
total_losses_label = NodePath("VBoxContainer/Labels/VBoxContainer/HBoxContainer4/WinRateLabel5")
|
||||
undefeated_enemies = NodePath("VBoxContainer/ScrollContainer/UndefeatedEnemies")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1602527228]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Labels" type="VBoxContainer" parent="VBoxContainer" unique_id=786722908]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="OutcomeLabel" type="Label" parent="VBoxContainer/Labels" unique_id=132993466]
|
||||
layout_mode = 2
|
||||
text = "LABEL_WIN_MESSAGE"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/Labels" unique_id=84006447]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Labels/VBoxContainer" unique_id=707771486]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="WinRateLabel" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer" unique_id=335128429]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "LABEL_WINRATE"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="WinRateLabel2" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer" unique_id=597730893]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "0"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/Labels/VBoxContainer" unique_id=529298520]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TotalGamesLabel" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer2" unique_id=1090711143]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "LABEL_GAMES"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="WinRateLabel3" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer2" unique_id=1346901729]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "0"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/Labels/VBoxContainer" unique_id=1084468622]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TotalWinsLabel" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer3" unique_id=1320799082]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "LABEL_WINS"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="WinRateLabel4" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer3" unique_id=16447985]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "0"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer/Labels/VBoxContainer" unique_id=1326560529]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TotalLossesLabel" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer4" unique_id=1596583596]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "LABEL_LOSSES"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="WinRateLabel5" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer4" unique_id=934370969]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "0"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer" unique_id=1827543223]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="UndefeatedEnemies" type="VBoxContainer" parent="VBoxContainer/ScrollContainer" unique_id=1470052916]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Buttons" type="HBoxContainer" parent="VBoxContainer" unique_id=1225984919]
|
||||
layout_mode = 2
|
||||
alignment = 2
|
||||
|
||||
[node name="ContinueButton" type="Button" parent="VBoxContainer/Buttons" unique_id=1143038936]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "BUTTON_CONTINUE"
|
||||
|
||||
[node name="PlayButton" type="Button" parent="VBoxContainer/Buttons" unique_id=774071211]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_RESTART"
|
||||
|
||||
[node name="QuitButton" type="Button" parent="VBoxContainer/Buttons" unique_id=2059159081]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_MAIN_MENU"
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1265670542]
|
||||
stream = SubResource("AudioStreamRandomizer_dram5")
|
||||
volume_db = -10.599
|
||||
bus = &"SFX"
|
||||
|
||||
[connection signal="mouse_entered" from="VBoxContainer/Buttons/ContinueButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="VBoxContainer/Buttons/ContinueButton" to="." method="_on_continue_button_pressed"]
|
||||
[connection signal="mouse_entered" from="VBoxContainer/Buttons/PlayButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="VBoxContainer/Buttons/PlayButton" to="." method="_on_play_button_pressed"]
|
||||
[connection signal="mouse_entered" from="VBoxContainer/Buttons/QuitButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="VBoxContainer/Buttons/QuitButton" to="." method="_on_quit_button_pressed"]
|
||||
9
ui/menus/MainMenu/achievements_menu.gd
Normal file
9
ui/menus/MainMenu/achievements_menu.gd
Normal file
@@ -0,0 +1,9 @@
|
||||
extends PanelContainer
|
||||
|
||||
func _ready() -> void:
|
||||
if Data.save_data.wins > 0:
|
||||
$VBoxContainer/GridContainer/FirstWin.icon.region = Rect2(36, 0, 36, 36)
|
||||
if Data.save_data.mage_cassette_seen_in_shop:
|
||||
$VBoxContainer/GridContainer/SeenMagecassette.icon.region = Rect2(36, 0, 36, 36)
|
||||
if Data.save_data.mage_unlocked:
|
||||
$VBoxContainer/GridContainer/UnlockedMage.icon.region = Rect2(36, 0, 36, 36)
|
||||
1
ui/menus/MainMenu/achievements_menu.gd.uid
Normal file
1
ui/menus/MainMenu/achievements_menu.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cjr0pbqisd51v
|
||||
52
ui/menus/MainMenu/level_selecter_main_menu.gd
Normal file
52
ui/menus/MainMenu/level_selecter_main_menu.gd
Normal file
@@ -0,0 +1,52 @@
|
||||
class_name MainMenuLevelSelector extends PanelContainer
|
||||
|
||||
signal level_selected(specs: LevelConfig, side_chosen: int)
|
||||
|
||||
var side: int = 0
|
||||
|
||||
@export var levels: Array[LevelConfig] = []
|
||||
|
||||
func _on_button_pressed() -> void:
|
||||
side = 0
|
||||
$VBoxContainer/Label.text = tr("LABEL_CAMPAIGN_DESC")
|
||||
|
||||
|
||||
func _on_button_2_pressed() -> void:
|
||||
side = 1
|
||||
$VBoxContainer/Label.text = tr("LABEL_ENDLESS_DESC")
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
var i: int = 0
|
||||
for level: LevelConfig in levels:
|
||||
i += 1
|
||||
var button: Button = Button.new()
|
||||
button.text = "Level " + str(i)
|
||||
$VBoxContainer.add_child(button)
|
||||
button.pressed.connect(start_level.bind(i - 1))
|
||||
button.mouse_entered.connect(hover_config.bind(i - 1))
|
||||
|
||||
|
||||
func hover_config(level: int) -> void:
|
||||
if !side:
|
||||
var high_score: int = 0
|
||||
if Data.save_data.level_high_scores.has(levels[level].display_title):
|
||||
high_score = Data.save_data.level_high_scores[levels[level].display_title]
|
||||
|
||||
if high_score > 0:
|
||||
$VBoxContainer/HighScoreLabel.text = "Highest Wave: " + str(high_score)
|
||||
else:
|
||||
$VBoxContainer/HighScoreLabel.text = "Never attempted!"
|
||||
else:
|
||||
var high_score: int = 0
|
||||
if Data.save_data.endless_high_scores.has(levels[level].display_title):
|
||||
high_score = Data.save_data.endless_high_scores[levels[level].display_title]
|
||||
|
||||
if high_score > 0:
|
||||
$VBoxContainer/HighScoreLabel.text = "Highest B-SIDE Wave: " + str(high_score)
|
||||
else:
|
||||
$VBoxContainer/HighScoreLabel.text = "Never attempted!"
|
||||
|
||||
|
||||
func start_level(level: int) -> void:
|
||||
level_selected.emit(levels[level], side)
|
||||
1
ui/menus/MainMenu/level_selecter_main_menu.gd.uid
Normal file
1
ui/menus/MainMenu/level_selecter_main_menu.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bwsw4oq150v3p
|
||||
253
ui/menus/MainMenu/main_menu.gd
Normal file
253
ui/menus/MainMenu/main_menu.gd
Normal file
@@ -0,0 +1,253 @@
|
||||
class_name MainMenu extends Control
|
||||
|
||||
signal singleplayer_game_requested
|
||||
signal multiplayer_game_requested
|
||||
|
||||
@export var bg_level: Level
|
||||
@export var game_select_menu: Control
|
||||
@export var main_controls: Control
|
||||
@export var seed_entry: LineEdit
|
||||
@export var profile_controls: Control
|
||||
@export var mods_controls: ModMenu
|
||||
|
||||
var game: GameManager
|
||||
var gamemode: GameMode = GameMode.new()
|
||||
|
||||
var confirmation_popup_scene: PackedScene = preload("res://Scenes/Menus/confirmation_popup.tscn")
|
||||
var text_input_popup_scene: PackedScene = preload("res://Scenes/Menus/text_input_popup.tscn")
|
||||
var multiplayer_lobby_scene_path: String = "res://Scenes/multiplayer_lobby.tscn"
|
||||
var options_menu_scene: PackedScene = preload("res://UI/Menus/OptionsMenu/options_menu.tscn")
|
||||
var temp_data: SaveData
|
||||
var hovered_level_config: LevelConfig
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
load_stats(Data.save_data)
|
||||
#bg_level.a_star_graph_3d.make_grid()
|
||||
#bg_level.a_star_graph_3d.find_path()
|
||||
#bg_level.a_star_graph_3d.build_random_maze(70)
|
||||
#bg_level.a_star_graph_3d.place_random_towers(30)
|
||||
#bg_level.a_star_graph_3d.disable_all_tower_frames()
|
||||
#Game.level = bg_level
|
||||
#WaveManager.generate_wave(WaveManager.calculate_spawn_power(50, 4), bg_level.enemy_pool, bg_level.enemy_spawns)
|
||||
#for spawn: EnemySpawner in bg_level.enemy_spawns:
|
||||
# spawn.enemy_died_callback = enemy_died
|
||||
# spawn.enemy_reached_goal_callback = damage_goal
|
||||
# spawn.enemy_spawned.connect(increase_enemy_count)
|
||||
# spawn.spawn_wave()
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("Pause"):
|
||||
return_to_main_menu()
|
||||
|
||||
|
||||
#these exist purely to make the enemies that spawn on the main menu happy
|
||||
func enemy_died(_some_arg: Enemy) -> void:
|
||||
pass
|
||||
func damage_goal(_some_arg1: Enemy, _some_arg2: int) -> void:
|
||||
pass
|
||||
func increase_enemy_count() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_display_name_edit_pressed() -> void:
|
||||
$ProfileManager.visible = true
|
||||
$ProfileManager/VBoxContainer/DisplayName/LineEdit.placeholder_text = Data.player_profile.display_name
|
||||
temp_data = SaveData.load_from_disk(0)
|
||||
|
||||
|
||||
func change_profile_display_name(display_name: String) -> void:
|
||||
$ProfileEditor/VBoxContainer/HBoxContainer/DisplayName.text = display_name
|
||||
Data.player_profile.set_display_name(display_name)
|
||||
|
||||
|
||||
func _on_quit_button_pressed() -> void:
|
||||
var popup: ConfirmationPopup = confirmation_popup_scene.instantiate() as ConfirmationPopup
|
||||
popup.set_popup("PROMPT_QUIT", "BUTTON_CONFIRM", "BUTTON_CANCEL")
|
||||
popup.completed.connect(quit_game)
|
||||
add_child(popup)
|
||||
|
||||
|
||||
func quit_game(confirmation: bool) -> void:
|
||||
if confirmation:
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
func _on_options_button_pressed() -> void:
|
||||
var menu: OptionsMenu = options_menu_scene.instantiate()
|
||||
menu.game_manager = game
|
||||
add_child(menu)
|
||||
|
||||
|
||||
func _on_button_mouse_entered() -> void:
|
||||
$AudioStreamPlayer.play()
|
||||
|
||||
|
||||
func start_game() -> void:
|
||||
game.gamemode = gamemode
|
||||
if !gamemode.multiplayer:
|
||||
singleplayer_game_requested.emit()
|
||||
else:
|
||||
level_selected($PanelContainer.levels[0], 0)
|
||||
multiplayer_game_requested.emit()
|
||||
|
||||
|
||||
func _on_play_button_pressed() -> void:
|
||||
gamemode.multiplayer = false
|
||||
open_game_menu()
|
||||
|
||||
|
||||
|
||||
#TODO: Clearn this part up
|
||||
#TODO: new lobby system >>
|
||||
|
||||
#var lobby_panel: PanelContainer
|
||||
func _on_multiplayer_button_pressed() -> void:
|
||||
gamemode.multiplayer = true
|
||||
start_game()
|
||||
#if !lobby_panel:
|
||||
#lobby_panel = PanelContainer.new()
|
||||
#add_child(lobby_panel)
|
||||
#lobby_panel.visible = true
|
||||
#lobby_panel.anchor_top = 0.1
|
||||
#lobby_panel.anchor_left = 0.3
|
||||
#lobby_panel.anchor_right = 0.7
|
||||
#lobby_panel.anchor_bottom = 0.9
|
||||
#gamemode.multiplayer = true
|
||||
#open_game_menu()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func open_game_menu() -> void:
|
||||
main_controls.visible = false
|
||||
game_select_menu.visible = true
|
||||
|
||||
|
||||
func _on_back_button_pressed() -> void:
|
||||
main_controls.visible = true
|
||||
game_select_menu.visible = false
|
||||
|
||||
|
||||
func return_to_main_menu() -> void:
|
||||
main_controls.visible = true
|
||||
game_select_menu.visible = false
|
||||
profile_controls.visible = false
|
||||
mods_controls.visible = false
|
||||
|
||||
|
||||
func generate_seed() -> int:
|
||||
var seed_generated: int = 0
|
||||
if seed_entry.text != "":
|
||||
if seed_entry.text.is_valid_int():
|
||||
seed_generated = int(seed_entry.text)
|
||||
else:
|
||||
seed_generated = hash(seed_entry.text)
|
||||
gamemode.seeded = true
|
||||
else:
|
||||
seed_generated = randi()
|
||||
return seed_generated
|
||||
|
||||
|
||||
func level_selected(level: LevelConfig, side: int) -> void:
|
||||
gamemode.endless = true if side == 1 else false
|
||||
gamemode.rng_seed = generate_seed() if gamemode.endless else level.game_seed
|
||||
gamemode.daily = false
|
||||
if gamemode.endless:
|
||||
level.allowed_cassettes = Cassette.get_role_cassettes(level.hero_class.role)
|
||||
level.waves = []
|
||||
game.level_config = level
|
||||
if !gamemode.multiplayer:
|
||||
start_game()
|
||||
|
||||
|
||||
func _on_standard_button_pressed() -> void:
|
||||
generate_seed()
|
||||
gamemode.endless = false
|
||||
gamemode.daily = false
|
||||
start_game()
|
||||
|
||||
|
||||
func _on_daily_button_pressed() -> void:
|
||||
gamemode.rng_seed = hash(Time.get_date_string_from_system(true))
|
||||
gamemode.endless = false
|
||||
gamemode.daily = true
|
||||
start_game()
|
||||
|
||||
|
||||
func _on_endless_button_pressed() -> void:
|
||||
generate_seed()
|
||||
gamemode.endless = true
|
||||
gamemode.daily = false
|
||||
start_game()
|
||||
|
||||
|
||||
func _on_changelog_button_pressed() -> void:
|
||||
main_controls.visible = true
|
||||
profile_controls.visible = true
|
||||
$Changelog.queue_free()
|
||||
|
||||
|
||||
func load_stats(stats: SaveData) -> void:
|
||||
$ProfileManager/VBoxContainer/Stats/Games/Label2.text = str(Data.save_data.wins + Data.save_data.losses)
|
||||
$ProfileManager/VBoxContainer/Stats/Wins/Label2.text = str(Data.save_data.wins)
|
||||
$ProfileManager/VBoxContainer/Stats/Losses/Label2.text = str(Data.save_data.losses)
|
||||
$ProfileManager/VBoxContainer/Stats/Winrate/Label2.text = str(Data.save_data.winrate) + "%"
|
||||
$ProfileManager/VBoxContainer/Stats/EngineercassettesBought/Label2.text = str(stats.engineer_cassettes_bought)
|
||||
$ProfileManager/VBoxContainer/Stats/MagecassettesBought/Label2.text = str(stats.mage_cassettes_bought)
|
||||
|
||||
|
||||
func _on_achievements_back_button_pressed() -> void:
|
||||
$AchievementsMenu.visible = false
|
||||
|
||||
|
||||
func _on_achievements_button_pressed() -> void:
|
||||
$AchievementsMenu.visible = true
|
||||
|
||||
|
||||
func _on_profile_manager_cancel_pressed() -> void:
|
||||
profile_controls.visible = false
|
||||
main_controls.visible = true
|
||||
|
||||
|
||||
func _on_profile_manager_confirm_pressed() -> void:
|
||||
profile_controls.visible = false
|
||||
main_controls.visible = true
|
||||
if $ProfileManager/VBoxContainer/DisplayName/LineEdit.text != "":
|
||||
change_profile_display_name($ProfileManager/VBoxContainer/DisplayName/LineEdit.text)
|
||||
$ProfileManager/VBoxContainer/DisplayName/LineEdit.text = ""
|
||||
#Data.save_data = temp_data
|
||||
Data.save_data.save_to_disc()
|
||||
|
||||
|
||||
func _on_unlock_all_pressed() -> void:
|
||||
temp_data.unlock_all_content()
|
||||
|
||||
|
||||
func _on_lock_all_pressed() -> void:
|
||||
temp_data.lock_all_content()
|
||||
|
||||
|
||||
func _on_mods_button_pressed() -> void:
|
||||
profile_controls.visible = false
|
||||
main_controls.visible = false
|
||||
mods_controls.visible = true
|
||||
|
||||
|
||||
func _on_cancel_mods_pressed() -> void:
|
||||
main_controls.visible = true
|
||||
mods_controls.visible = false
|
||||
|
||||
|
||||
func _on_confirm_mods_pressed() -> void:
|
||||
mods_controls.load_mod_list()
|
||||
main_controls.visible = true
|
||||
mods_controls.visible = false
|
||||
|
||||
|
||||
func _on_stats_button_pressed() -> void:
|
||||
main_controls.visible = false
|
||||
profile_controls.visible = true
|
||||
1
ui/menus/MainMenu/main_menu.gd.uid
Normal file
1
ui/menus/MainMenu/main_menu.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ci8vq73u23viy
|
||||
512
ui/menus/MainMenu/main_menu.tscn
Normal file
512
ui/menus/MainMenu/main_menu.tscn
Normal file
@@ -0,0 +1,512 @@
|
||||
[gd_scene format=3 uid="uid://8yv7excojcg0"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://mt6liu1hi15j" path="res://ingame_logo.png" id="2_14tm0"]
|
||||
[ext_resource type="Script" uid="uid://ci8vq73u23viy" path="res://ui/menus/MainMenu/main_menu.gd" id="2_ivytu"]
|
||||
[ext_resource type="AudioStream" uid="uid://cp6ph4ra7u5rk" path="res://ui/drop_003.ogg" id="5_cwn2i"]
|
||||
[ext_resource type="Script" uid="uid://bwsw4oq150v3p" path="res://ui/menus/MainMenu/level_selecter_main_menu.gd" id="8_qshe4"]
|
||||
[ext_resource type="Script" uid="uid://dalgif6huggwg" path="res://scripts/resources/level_config.gd" id="9_nt3t4"]
|
||||
[ext_resource type="Resource" uid="uid://b67b70x1uf2el" path="res://levels/level_1/specs.tres" id="10_kjkav"]
|
||||
[ext_resource type="Resource" uid="uid://dffoufw4bnfn7" path="res://levels/level_2/specs.tres" id="11_kjkav"]
|
||||
[ext_resource type="Resource" uid="uid://dgrcneuv4fut" path="res://levels/level_3/specs.tres" id="12_eonxx"]
|
||||
[ext_resource type="Texture2D" uid="uid://cr1ucbuw3iotp" path="res://assets/textures/first_win_achievements.png" id="15_74epv"]
|
||||
[ext_resource type="Script" uid="uid://cjr0pbqisd51v" path="res://ui/menus/MainMenu/achievements_menu.gd" id="15_sv1gy"]
|
||||
[ext_resource type="Texture2D" uid="uid://cpa1hl36xfplg" path="res://assets/textures/first_scroll_seen.png" id="16_sv1gy"]
|
||||
[ext_resource type="Texture2D" uid="uid://ctbi3gm1me1t5" path="res://assets/textures/unlock_mage_achievement.png" id="17_6t4jd"]
|
||||
[ext_resource type="Script" uid="uid://cxrm2naq75jo1" path="res://scripts/mod_menu.gd" id="19_6t4jd"]
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_2jyua"]
|
||||
random_pitch = 1.1
|
||||
streams_count = 1
|
||||
stream_0/stream = ExtResource("5_cwn2i")
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_y5bw6"]
|
||||
atlas = ExtResource("15_74epv")
|
||||
region = Rect2(0, 0, 36, 36)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_q26na"]
|
||||
atlas = ExtResource("16_sv1gy")
|
||||
region = Rect2(0, 0, 36, 36)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3aj5m"]
|
||||
atlas = ExtResource("17_6t4jd")
|
||||
region = Rect2(0, 0, 36, 36)
|
||||
|
||||
[node name="MainMenu" type="Control" unique_id=869930777 node_paths=PackedStringArray("game_select_menu", "main_controls", "seed_entry", "profile_controls", "mods_controls")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("2_ivytu")
|
||||
game_select_menu = NodePath("PanelContainer")
|
||||
main_controls = NodePath("MainControls")
|
||||
seed_entry = NodePath("GameSelectMenu/VBoxContainer/HBoxContainer2/LineEdit")
|
||||
profile_controls = NodePath("ProfileManager")
|
||||
mods_controls = NodePath("ModsMenu")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=346340567]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.76819396, 0.5586745, 0.57690316, 1)
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="." unique_id=57227105]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("2_14tm0")
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="MainControls" type="VBoxContainer" parent="." unique_id=923552840]
|
||||
custom_minimum_size = Vector2(80, 0)
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.938
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.95
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
alignment = 2
|
||||
|
||||
[node name="PlayButton" type="Button" parent="MainControls" unique_id=966021827]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_PLAY"
|
||||
|
||||
[node name="MulitplayerButton" type="Button" parent="MainControls" unique_id=1241426994]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_MULTIPLAYER"
|
||||
|
||||
[node name="ModsButton" type="Button" parent="MainControls" unique_id=868836389]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_MODS"
|
||||
|
||||
[node name="StatsButton" type="Button" parent="MainControls" unique_id=469365040]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_PLAYER_STATS"
|
||||
|
||||
[node name="OptionsButton" type="Button" parent="MainControls" unique_id=861161627]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_OPTIONS
|
||||
"
|
||||
|
||||
[node name="QuitButton" type="Button" parent="MainControls" unique_id=1786709622]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_QUIT"
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=422058960]
|
||||
stream = SubResource("AudioStreamRandomizer_2jyua")
|
||||
volume_db = -10.599
|
||||
bus = &"SFX"
|
||||
|
||||
[node name="GameSelectMenu" type="PanelContainer" parent="." unique_id=1604474538]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="GameSelectMenu" unique_id=872284999]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="GameSelectMenu/VBoxContainer" unique_id=428793094]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="BackButton" type="Button" parent="GameSelectMenu/VBoxContainer/HBoxContainer" unique_id=403559950]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_BACK"
|
||||
|
||||
[node name="Title" type="Label" parent="GameSelectMenu/VBoxContainer" unique_id=1718021793]
|
||||
layout_mode = 2
|
||||
text = "LABEL_GAME_MODE_SELECT"
|
||||
|
||||
[node name="StandardButton" type="Button" parent="GameSelectMenu/VBoxContainer" unique_id=1984093514]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_STANDARD_GAME"
|
||||
|
||||
[node name="DailyButton" type="Button" parent="GameSelectMenu/VBoxContainer" unique_id=320912704]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_DAILY_CHALLENGE"
|
||||
|
||||
[node name="EndlessButton" type="Button" parent="GameSelectMenu/VBoxContainer" unique_id=417225239]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_ENDLESS_GAME"
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="GameSelectMenu/VBoxContainer" unique_id=1279231572]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="GameSelectMenu/VBoxContainer/HBoxContainer2" unique_id=2055624607]
|
||||
layout_mode = 2
|
||||
text = "LABEL_SEED"
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="GameSelectMenu/VBoxContainer/HBoxContainer2" unique_id=474246153]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "LABEL_SEED_PLACEHOLDER"
|
||||
expand_to_text_length = true
|
||||
|
||||
[node name="ProfileManager" type="PanelContainer" parent="." unique_id=1344908572]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="ProfileManager" unique_id=539287205]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TitleBar" type="Label" parent="ProfileManager/VBoxContainer" unique_id=1638206531]
|
||||
layout_mode = 2
|
||||
text = "TITLE_STATS_MENU"
|
||||
|
||||
[node name="DisplayName" type="HBoxContainer" parent="ProfileManager/VBoxContainer" unique_id=305221291]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="ProfileManager/VBoxContainer/DisplayName" unique_id=1105359110]
|
||||
layout_mode = 2
|
||||
text = "LABEL_DISPLAY_NAME"
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="ProfileManager/VBoxContainer/DisplayName" unique_id=1566276326]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "LABEL_DISPLAY_NAME_PLACEHOLDER"
|
||||
alignment = 1
|
||||
expand_to_text_length = true
|
||||
|
||||
[node name="Stats" type="VBoxContainer" parent="ProfileManager/VBoxContainer" unique_id=578265141]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="ProfileManager/VBoxContainer/Stats" unique_id=1171792490]
|
||||
layout_mode = 2
|
||||
text = "LABEL_STATS"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Games" type="HBoxContainer" parent="ProfileManager/VBoxContainer/Stats" unique_id=289500149]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="ProfileManager/VBoxContainer/Stats/Games" unique_id=1710677379]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "LABEL_GAMES"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="ProfileManager/VBoxContainer/Stats/Games" unique_id=801621266]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "0"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Wins" type="HBoxContainer" parent="ProfileManager/VBoxContainer/Stats" unique_id=52829433]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="ProfileManager/VBoxContainer/Stats/Wins" unique_id=566213754]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "LABEL_WINS"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="ProfileManager/VBoxContainer/Stats/Wins" unique_id=1346652117]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "0"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Losses" type="HBoxContainer" parent="ProfileManager/VBoxContainer/Stats" unique_id=1693847488]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="ProfileManager/VBoxContainer/Stats/Losses" unique_id=1377334116]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "LABEL_LOSSES"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="ProfileManager/VBoxContainer/Stats/Losses" unique_id=1863506281]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "0"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Winrate" type="HBoxContainer" parent="ProfileManager/VBoxContainer/Stats" unique_id=443313052]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="ProfileManager/VBoxContainer/Stats/Winrate" unique_id=1231183322]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "LABEL_WINRATE"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="ProfileManager/VBoxContainer/Stats/Winrate" unique_id=2069320970]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "0"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="EngineerCardsBought" type="HBoxContainer" parent="ProfileManager/VBoxContainer/Stats" unique_id=1776121901]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="ProfileManager/VBoxContainer/Stats/EngineerCardsBought" unique_id=1170236283]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "LABEL_ENGINEER_CARDS_BOUGHT"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="ProfileManager/VBoxContainer/Stats/EngineerCardsBought" unique_id=1887374490]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "0"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="MageCardsBought" type="HBoxContainer" parent="ProfileManager/VBoxContainer/Stats" unique_id=920990804]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="ProfileManager/VBoxContainer/Stats/MageCardsBought" unique_id=826470841]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "LABEL_MAGE_CARDS_BOUGHT"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="ProfileManager/VBoxContainer/Stats/MageCardsBought" unique_id=340339771]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "0"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="UnlockAll" type="Button" parent="ProfileManager/VBoxContainer" unique_id=436251634]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_UNLOCK_CONTENT"
|
||||
|
||||
[node name="LockAll" type="Button" parent="ProfileManager/VBoxContainer" unique_id=2000313619]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_LOCK_CONTENT"
|
||||
|
||||
[node name="AchievementsButton" type="Button" parent="ProfileManager/VBoxContainer" unique_id=269010635]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_ACHIEVEMENTS"
|
||||
|
||||
[node name="Controls" type="HBoxContainer" parent="ProfileManager/VBoxContainer" unique_id=1243400084]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Cancel" type="Button" parent="ProfileManager/VBoxContainer/Controls" unique_id=860932187]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "BUTTON_CANCEL"
|
||||
|
||||
[node name="Confirm" type="Button" parent="ProfileManager/VBoxContainer/Controls" unique_id=733481456]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "BUTTON_CONFIRM"
|
||||
|
||||
[node name="AchievementsMenu" type="PanelContainer" parent="." unique_id=40577774]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("15_sv1gy")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="AchievementsMenu" unique_id=1577211234]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="AchievementsMenu/VBoxContainer" unique_id=1021884308]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="AchievementsMenu/VBoxContainer/HBoxContainer" unique_id=528769598]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "TITLE_ACHIEVEMENTS"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Button" type="Button" parent="AchievementsMenu/VBoxContainer/HBoxContainer" unique_id=1889222807]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_BACK"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="AchievementsMenu/VBoxContainer" unique_id=2035992168]
|
||||
layout_mode = 2
|
||||
columns = 9
|
||||
|
||||
[node name="FirstWin" type="Button" parent="AchievementsMenu/VBoxContainer/GridContainer" unique_id=499912902]
|
||||
custom_minimum_size = Vector2(140, 140)
|
||||
layout_mode = 2
|
||||
tooltip_text = "ACHIEVEMENT_TOOLTIP_WIN_GAME"
|
||||
icon = SubResource("AtlasTexture_y5bw6")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="SeenMageCard" type="Button" parent="AchievementsMenu/VBoxContainer/GridContainer" unique_id=882043194]
|
||||
custom_minimum_size = Vector2(140, 140)
|
||||
layout_mode = 2
|
||||
tooltip_text = "ACHIEVEMENT_TOOLTIP_BUY_MAGE_CARD"
|
||||
icon = SubResource("AtlasTexture_q26na")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="UnlockedMage" type="Button" parent="AchievementsMenu/VBoxContainer/GridContainer" unique_id=539348371]
|
||||
custom_minimum_size = Vector2(140, 140)
|
||||
layout_mode = 2
|
||||
tooltip_text = "ACHIEVEMENT_TOOLTIP_UNLOCK_MAGE"
|
||||
icon = SubResource("AtlasTexture_3aj5m")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="ModsMenu" type="PanelContainer" parent="." unique_id=1219411456]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.05
|
||||
anchor_top = 0.05
|
||||
anchor_right = 0.95
|
||||
anchor_bottom = 0.95
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("19_6t4jd")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="ModsMenu" unique_id=604343120]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="ModsMenu/VBoxContainer" unique_id=773057029]
|
||||
layout_mode = 2
|
||||
text = "TITLE_MODS"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="ModsMenu/VBoxContainer" unique_id=570439123]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="ModsMenu/VBoxContainer/ScrollContainer" unique_id=1157309990]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="ModsMenu/VBoxContainer" unique_id=91693076]
|
||||
layout_mode = 2
|
||||
alignment = 2
|
||||
|
||||
[node name="CancelMods" type="Button" parent="ModsMenu/VBoxContainer/HBoxContainer" unique_id=476511006]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_CANCEL"
|
||||
|
||||
[node name="ConfirmMods" type="Button" parent="ModsMenu/VBoxContainer/HBoxContainer" unique_id=1767774211]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_CONFIRM"
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=1673631030]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -6.0
|
||||
offset_top = -6.0
|
||||
offset_right = 6.0
|
||||
offset_bottom = 6.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("8_qshe4")
|
||||
levels = Array[ExtResource("9_nt3t4")]([ExtResource("10_kjkav"), ExtResource("11_kjkav"), ExtResource("12_eonxx")])
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer" unique_id=507718308]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Button" type="Button" parent="PanelContainer/VBoxContainer" unique_id=2127573853]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
text = "BUTTON_BACK"
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer" unique_id=654891125]
|
||||
layout_mode = 2
|
||||
text = "LABEL_CAMPAIGN_DESC"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer" unique_id=776357424]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Button" type="Button" parent="PanelContainer/VBoxContainer/HBoxContainer" unique_id=1722538738]
|
||||
layout_mode = 2
|
||||
text = "A-SIDE"
|
||||
|
||||
[node name="Button2" type="Button" parent="PanelContainer/VBoxContainer/HBoxContainer" unique_id=708845101]
|
||||
layout_mode = 2
|
||||
text = "B-SIDE"
|
||||
|
||||
[node name="HighScoreLabel" type="Label" parent="PanelContainer/VBoxContainer" unique_id=417415208]
|
||||
layout_mode = 2
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[connection signal="mouse_entered" from="MainControls/PlayButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="MainControls/PlayButton" to="." method="_on_play_button_pressed"]
|
||||
[connection signal="mouse_entered" from="MainControls/MulitplayerButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="MainControls/MulitplayerButton" to="." method="_on_multiplayer_button_pressed"]
|
||||
[connection signal="mouse_entered" from="MainControls/ModsButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="MainControls/ModsButton" to="." method="_on_mods_button_pressed"]
|
||||
[connection signal="pressed" from="MainControls/StatsButton" to="." method="_on_stats_button_pressed"]
|
||||
[connection signal="mouse_entered" from="MainControls/OptionsButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="MainControls/OptionsButton" to="." method="_on_options_button_pressed"]
|
||||
[connection signal="mouse_entered" from="MainControls/QuitButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="MainControls/QuitButton" to="." method="_on_quit_button_pressed"]
|
||||
[connection signal="pressed" from="GameSelectMenu/VBoxContainer/HBoxContainer/BackButton" to="." method="_on_back_button_pressed"]
|
||||
[connection signal="pressed" from="GameSelectMenu/VBoxContainer/StandardButton" to="." method="_on_standard_button_pressed"]
|
||||
[connection signal="pressed" from="GameSelectMenu/VBoxContainer/DailyButton" to="." method="_on_daily_button_pressed"]
|
||||
[connection signal="pressed" from="GameSelectMenu/VBoxContainer/EndlessButton" to="." method="_on_endless_button_pressed"]
|
||||
[connection signal="pressed" from="ProfileManager/VBoxContainer/UnlockAll" to="." method="_on_unlock_all_pressed"]
|
||||
[connection signal="pressed" from="ProfileManager/VBoxContainer/LockAll" to="." method="_on_lock_all_pressed"]
|
||||
[connection signal="pressed" from="ProfileManager/VBoxContainer/AchievementsButton" to="." method="_on_achievements_button_pressed"]
|
||||
[connection signal="pressed" from="ProfileManager/VBoxContainer/Controls/Cancel" to="." method="_on_profile_manager_cancel_pressed"]
|
||||
[connection signal="pressed" from="ProfileManager/VBoxContainer/Controls/Confirm" to="." method="_on_profile_manager_confirm_pressed"]
|
||||
[connection signal="pressed" from="AchievementsMenu/VBoxContainer/HBoxContainer/Button" to="." method="_on_achievements_back_button_pressed"]
|
||||
[connection signal="pressed" from="ModsMenu/VBoxContainer/HBoxContainer/CancelMods" to="." method="_on_cancel_mods_pressed"]
|
||||
[connection signal="pressed" from="ModsMenu/VBoxContainer/HBoxContainer/ConfirmMods" to="." method="_on_confirm_mods_pressed"]
|
||||
[connection signal="level_selected" from="PanelContainer" to="." method="level_selected"]
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/Button" to="." method="_on_back_button_pressed"]
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainer/Button" to="PanelContainer" method="_on_button_pressed"]
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainer/Button2" to="PanelContainer" method="_on_button_2_pressed"]
|
||||
8
ui/menus/MixingMenu/price_panel.gd
Normal file
8
ui/menus/MixingMenu/price_panel.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
class_name PricePanel
|
||||
extends PanelContainer
|
||||
|
||||
@export var label: Label
|
||||
|
||||
|
||||
func set_price(price: int) -> void:
|
||||
label.text = "$" + str(price)
|
||||
1
ui/menus/MixingMenu/price_panel.gd.uid
Normal file
1
ui/menus/MixingMenu/price_panel.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bs73eocafngiu
|
||||
24
ui/menus/MixingMenu/price_panel.tscn
Normal file
24
ui/menus/MixingMenu/price_panel.tscn
Normal file
@@ -0,0 +1,24 @@
|
||||
[gd_scene format=3 uid="uid://dekexkjl37dvh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bs73eocafngiu" path="res://ui/menus/MixingMenu/price_panel.gd" id="1_sn84y"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_517dt"]
|
||||
bg_color = Color(0.2702219, 0.27022195, 0.27022177, 0.09019608)
|
||||
corner_detail = 1
|
||||
|
||||
[node name="Control" type="PanelContainer" unique_id=37062579 node_paths=PackedStringArray("label")]
|
||||
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_517dt")
|
||||
script = ExtResource("1_sn84y")
|
||||
label = NodePath("Label")
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=66237136]
|
||||
layout_mode = 2
|
||||
text = "$15"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
274
ui/menus/MixingMenu/track_editor.gd
Normal file
274
ui/menus/MixingMenu/track_editor.gd
Normal file
@@ -0,0 +1,274 @@
|
||||
class_name TrackEditor
|
||||
extends Control
|
||||
|
||||
signal cassettes_remixed(cassettes_consumed: Array[Cassette], cassettes_created: Array[Cassette], amount_spent: int)
|
||||
|
||||
@export var drag_feature: FeatureUI
|
||||
@export var sample_library: VBoxContainer
|
||||
@export var feature_scene: PackedScene
|
||||
@export var tower_parts: HBoxContainer
|
||||
@export var weapon_parts: HBoxContainer
|
||||
@export var drop_down: OptionButton
|
||||
@export var cassette_desc: cassetteDescriptionUI
|
||||
@export var price_panel_scene: PackedScene
|
||||
@export var price_label: Label
|
||||
@export var money_label: Label
|
||||
@export var confirm_button: Button
|
||||
@export var switch_button: Button
|
||||
|
||||
const FEATURE_SLOTS: int = 6
|
||||
const PRICE_STR: String = "LABEL_REMIX_PRICE"
|
||||
const MONEY_STR: String = "LABEL_REMIX_CURRENCY"
|
||||
const SIDE_A_STR: String = "BUTTON_VIEW_TOWER"
|
||||
const SIDE_B_STR: String = "BUTTON_VIEW_WEAPON"
|
||||
|
||||
var hero: Hero
|
||||
var dragging: bool = false
|
||||
var hovered_feature: Feature
|
||||
var hovered_drop_slot: int = -2
|
||||
var hovered_drop_track: int = 0
|
||||
var tower_feature_uis: Array[FeatureUI]
|
||||
var weapon_feature_uis: Array[FeatureUI]
|
||||
var features_list: Array[Feature]
|
||||
var tower_slots: Array[MarginContainer]
|
||||
var weapon_slots: Array[MarginContainer]
|
||||
var tower_prices: Array[PricePanel]
|
||||
var weapon_prices: Array[PricePanel]
|
||||
var cassettes: Array[Cassette]
|
||||
var cassette_selected: Cassette
|
||||
var temp_cassette: Cassette
|
||||
var cost: int = 0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
#populate_sample_library()
|
||||
#populate_feature_slots()
|
||||
cassette_desc.hide_features()
|
||||
tower_parts.mouse_entered.connect(set_hovered_drop_slot.bind(-1, 0))
|
||||
weapon_parts.mouse_entered.connect(set_hovered_drop_slot.bind(-1, 1))
|
||||
tower_parts.mouse_exited.connect(unset_hovered_drop_slot)
|
||||
weapon_parts.mouse_exited.connect(unset_hovered_drop_slot)
|
||||
price_label.text = tr(PRICE_STR) + str(cost)
|
||||
|
||||
|
||||
func set_money(money: int) -> void:
|
||||
money_label.text = tr(MONEY_STR) + str(money)
|
||||
|
||||
|
||||
func press_check_button(value: bool) -> void:
|
||||
switch_button.button_pressed = value
|
||||
if !value:
|
||||
switch_button.text = tr(SIDE_A_STR)
|
||||
else:
|
||||
switch_button.text = tr(SIDE_B_STR)
|
||||
cassette_desc.set_cassette(temp_cassette, switch_button.button_pressed)
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
drag_feature.position = get_viewport().get_mouse_position()
|
||||
if Input.is_action_just_pressed("Pause"):
|
||||
_on_cancel_button_pressed()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton:
|
||||
if event.pressed == true and event.button_index == 1:
|
||||
if hovered_feature != null:
|
||||
attach_feat_to_mouse(hovered_feature)
|
||||
if event.pressed == false and event.button_index == 1:
|
||||
detach_feat_from_mouse()
|
||||
|
||||
|
||||
func select_cassette(option: int) -> void:
|
||||
for feature_ui: FeatureUI in tower_feature_uis:
|
||||
feature_ui.queue_free()
|
||||
tower_feature_uis = []
|
||||
for feature_ui: FeatureUI in weapon_feature_uis:
|
||||
feature_ui.queue_free()
|
||||
for price_panel: PricePanel in tower_prices:
|
||||
price_panel.visible = true
|
||||
for price_panel: PricePanel in weapon_prices:
|
||||
price_panel.visible = true
|
||||
cost = 0
|
||||
price_label.text = tr(PRICE_STR) + str(cost)
|
||||
confirm_button.disabled = false
|
||||
weapon_feature_uis = []
|
||||
cassette_selected = cassettes[option]
|
||||
temp_cassette = cassette_selected.duplicate()
|
||||
temp_cassette.tower_stats = temp_cassette.tower_stats.get_duplicate()
|
||||
temp_cassette.weapon_stats = temp_cassette.weapon_stats.get_duplicate()
|
||||
press_check_button(switch_button.button_pressed)
|
||||
var x: int = 0
|
||||
for feature: Feature in temp_cassette.tower_stats.features:
|
||||
if x > 0:
|
||||
tower_prices[x - 1].visible = false
|
||||
add_feature(feature, 0, false)
|
||||
x += 1
|
||||
x = 0
|
||||
for feature: Feature in temp_cassette.weapon_stats.features:
|
||||
if x > 0:
|
||||
weapon_prices[x - 1].visible = false
|
||||
add_feature(feature, 1, false)
|
||||
x += 1
|
||||
|
||||
|
||||
func add_option(cassette_options: Array[Cassette]) -> void:
|
||||
cassettes = cassette_options
|
||||
for cassette: Cassette in cassettes:
|
||||
drop_down.add_item(tr(cassette.display_name))
|
||||
drop_down.select(0)
|
||||
select_cassette(0)
|
||||
populate_sample_library()
|
||||
|
||||
|
||||
func populate_sample_library() -> void:
|
||||
for cassette: Cassette in cassettes:
|
||||
for feature: Feature in cassette.tower_stats.features:
|
||||
if !features_list.has(feature):
|
||||
features_list.append(feature)
|
||||
for feature: Feature in cassette.weapon_stats.features:
|
||||
if !features_list.has(feature):
|
||||
features_list.append(feature)
|
||||
var i: int = 0
|
||||
var hbox: HBoxContainer
|
||||
for feature: Feature in features_list:
|
||||
if i == 0:
|
||||
hbox = HBoxContainer.new()
|
||||
sample_library.add_child(hbox)
|
||||
var feat: FeatureUI = feature_scene.instantiate() as FeatureUI
|
||||
feat.set_feature(feature)
|
||||
feat.show_title()
|
||||
feat.mouse_filter = Control.MOUSE_FILTER_PASS
|
||||
feat.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
feat.mouse_entered.connect(set_hovered_feature.bind(feat.feature))
|
||||
hbox.add_child(feat)
|
||||
i += 1
|
||||
if i == 3:
|
||||
i = 0
|
||||
sample_library.mouse_exited.connect(unset_hovered_feature)
|
||||
|
||||
|
||||
func populate_feature_slots() -> void:
|
||||
for x: int in FEATURE_SLOTS:
|
||||
var vbox: MarginContainer = MarginContainer.new()
|
||||
vbox.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
vbox.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
vbox.mouse_entered.connect(set_hovered_drop_slot.bind(tower_slots.size(), 0))
|
||||
vbox.mouse_exited.connect(unset_hovered_drop_slot)
|
||||
tower_parts.add_child(vbox)
|
||||
tower_slots.append(vbox)
|
||||
if x != 0:
|
||||
var panel: PricePanel = price_panel_scene.instantiate() as PricePanel
|
||||
panel.set_price(Data.slot_prices[x - 1])
|
||||
vbox.add_child(panel)
|
||||
tower_prices.append(panel)
|
||||
for x: int in FEATURE_SLOTS:
|
||||
var vbox: MarginContainer = MarginContainer.new()
|
||||
vbox.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
vbox.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
vbox.mouse_entered.connect(set_hovered_drop_slot.bind(weapon_slots.size(), 1))
|
||||
vbox.mouse_exited.connect(unset_hovered_drop_slot)
|
||||
weapon_parts.add_child(vbox)
|
||||
weapon_slots.append(vbox)
|
||||
if x != 0:
|
||||
var panel: PricePanel = price_panel_scene.instantiate() as PricePanel
|
||||
panel.set_price(Data.slot_prices[x - 1])
|
||||
vbox.add_child(panel)
|
||||
weapon_prices.append(panel)
|
||||
|
||||
|
||||
func add_feature(feature: Feature, track: int, modify_resource: bool = true) -> void:
|
||||
if hovered_drop_slot == 0:
|
||||
return
|
||||
if track == 0:
|
||||
if hovered_drop_slot > 0 and hovered_drop_slot < tower_feature_uis.size():
|
||||
change_feature(tower_feature_uis[hovered_drop_slot], feature, 0)
|
||||
elif tower_feature_uis.size() < FEATURE_SLOTS:
|
||||
var feature_visual: FeatureUI = feature_scene.instantiate()
|
||||
feature_visual.set_feature(feature)
|
||||
tower_slots[tower_feature_uis.size()].add_child(feature_visual)
|
||||
tower_feature_uis.append(feature_visual)
|
||||
if modify_resource:
|
||||
temp_cassette.tower_stats.features.append(feature)
|
||||
tower_prices[tower_feature_uis.size() - 2].visible = false
|
||||
cost += Data.slot_prices[tower_feature_uis.size() - 2]
|
||||
price_label.text = tr(PRICE_STR) + str(cost)
|
||||
press_check_button(false)
|
||||
cassette_desc.set_cassette(temp_cassette, switch_button.button_pressed)
|
||||
if cost > hero.currency:
|
||||
confirm_button.disabled = true
|
||||
elif track == 1:
|
||||
if hovered_drop_slot > 0 and hovered_drop_slot < weapon_feature_uis.size():
|
||||
change_feature(weapon_feature_uis[hovered_drop_slot], feature, 1)
|
||||
elif weapon_feature_uis.size() < FEATURE_SLOTS:
|
||||
var feature_visual: FeatureUI = feature_scene.instantiate()
|
||||
feature_visual.set_feature(feature)
|
||||
weapon_slots[weapon_feature_uis.size()].add_child(feature_visual)
|
||||
weapon_feature_uis.append(feature_visual)
|
||||
if modify_resource:
|
||||
temp_cassette.weapon_stats.features.append(feature)
|
||||
weapon_prices[weapon_feature_uis.size() - 2].visible = false
|
||||
cost += Data.slot_prices[weapon_feature_uis.size() - 2]
|
||||
price_label.text = tr(PRICE_STR) + str(cost)
|
||||
press_check_button(true)
|
||||
cassette_desc.set_cassette(temp_cassette, switch_button.button_pressed)
|
||||
if cost > hero.currency:
|
||||
confirm_button.disabled = true
|
||||
|
||||
|
||||
func change_feature(existing_feature: FeatureUI, new_feature: Feature, track: int) -> void:
|
||||
existing_feature.set_feature(new_feature)
|
||||
if track == 0:
|
||||
var i: int = tower_feature_uis.find(existing_feature)
|
||||
temp_cassette.tower_stats.features[i] = new_feature
|
||||
elif track == 1:
|
||||
var i: int = weapon_feature_uis.find(existing_feature)
|
||||
temp_cassette.weapon_stats.features[i] = new_feature
|
||||
cassette_desc.set_cassette(temp_cassette, switch_button.button_pressed)
|
||||
|
||||
|
||||
func attach_feat_to_mouse(feature: Feature) -> void:
|
||||
drag_feature.set_feature(feature)
|
||||
drag_feature.visible = true
|
||||
dragging = true
|
||||
|
||||
|
||||
func detach_feat_from_mouse() -> void:
|
||||
drag_feature.visible = false
|
||||
if hovered_drop_slot >= -1 and dragging == true:
|
||||
add_feature(drag_feature.feature, hovered_drop_track)
|
||||
dragging = false
|
||||
|
||||
|
||||
func set_hovered_feature(feature: Feature) -> void:
|
||||
hovered_feature = feature
|
||||
|
||||
|
||||
func unset_hovered_feature() -> void:
|
||||
hovered_feature = null
|
||||
|
||||
|
||||
func set_hovered_drop_slot(slot: int = -2, track: int = 0) -> void:
|
||||
hovered_drop_slot = slot
|
||||
hovered_drop_track = track
|
||||
|
||||
|
||||
func unset_hovered_drop_slot() -> void:
|
||||
hovered_drop_slot = -2
|
||||
hovered_drop_track = -1
|
||||
|
||||
|
||||
func _on_cancel_button_pressed() -> void:
|
||||
var cassettes_to_remove: Array[Cassette] = []
|
||||
var cassettes_to_add: Array[Cassette] = []
|
||||
cassettes_remixed.emit(cassettes_to_remove, cassettes_to_add, 0)
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_confirm_button_pressed() -> void:
|
||||
var cassettes_to_remove: Array[Cassette] = []
|
||||
var cassettes_to_add: Array[Cassette] = []
|
||||
cassettes_to_remove.append(cassette_selected)
|
||||
cassettes_to_add.append(temp_cassette)
|
||||
cassettes_remixed.emit(cassettes_to_remove, cassettes_to_add, cost)
|
||||
queue_free()
|
||||
1
ui/menus/MixingMenu/track_editor.gd.uid
Normal file
1
ui/menus/MixingMenu/track_editor.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://mrv5vrlxfc13
|
||||
241
ui/menus/MixingMenu/track_editor.tscn
Normal file
241
ui/menus/MixingMenu/track_editor.tscn
Normal file
@@ -0,0 +1,241 @@
|
||||
[gd_scene format=3 uid="uid://bajli4d3nqwll"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c8xdsg6gtwvh3" path="res://ui/feature_ui/feature_ui.tscn" id="1_y6tpq"]
|
||||
[ext_resource type="Script" uid="uid://mrv5vrlxfc13" path="res://ui/menus/MixingMenu/track_editor.gd" id="1_yrnbk"]
|
||||
[ext_resource type="PackedScene" uid="uid://dekexkjl37dvh" path="res://ui/menus/MixingMenu/price_panel.tscn" id="3_48m6c"]
|
||||
[ext_resource type="PackedScene" uid="uid://cmlpmr78tmo6p" path="res://ui/cassette_description_ui.tscn" id="3_q6wwl"]
|
||||
[ext_resource type="Texture2D" uid="uid://cll2vlvf1h454" path="res://ui/themes/scale_1/track_one_patch.png" id="4_dya4i"]
|
||||
[ext_resource type="Texture2D" uid="uid://cvhkk22pxxuqj" path="res://ui/themes/scale_1/track_two_patch.png" id="5_4gmyw"]
|
||||
|
||||
[node name="TrackEditor" type="Control" unique_id=1189474502 node_paths=PackedStringArray("drag_feature", "sample_library", "tower_parts", "weapon_parts", "drop_down", "card_desc", "price_label", "money_label", "confirm_button", "switch_button")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_yrnbk")
|
||||
drag_feature = NodePath("FeatureUI")
|
||||
sample_library = NodePath("PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2/SamplePanel/ScrollContainer/SampleLibrary")
|
||||
feature_scene = ExtResource("1_y6tpq")
|
||||
tower_parts = NodePath("PanelContainer/VBoxContainer/Tracks/HBoxContainer/TrackUIs/Tower/MarginContainer/TowerParts")
|
||||
weapon_parts = NodePath("PanelContainer/VBoxContainer/Tracks/HBoxContainer/TrackUIs/Weapon/MarginContainer/WeaponParts")
|
||||
drop_down = NodePath("PanelContainer/VBoxContainer/Tracks/SourceCartridge/CassetteSelector/OptionButton")
|
||||
card_desc = NodePath("PanelContainer/VBoxContainer/InfoPanel/VBoxContainer/DescriptionVBox")
|
||||
price_panel_scene = ExtResource("3_48m6c")
|
||||
price_label = NodePath("PanelContainer/VBoxContainer/Tracks/SourceCartridge/MarginContainer/VBoxContainer/PriceLabel")
|
||||
money_label = NodePath("PanelContainer/VBoxContainer/Tracks/SourceCartridge/MarginContainer/VBoxContainer/MoneyLabel")
|
||||
confirm_button = NodePath("PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2/Controls/ConfirmButton")
|
||||
switch_button = NodePath("PanelContainer/VBoxContainer/InfoPanel/VBoxContainer/Button")
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=1962957964]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.02
|
||||
anchor_top = 0.02
|
||||
anchor_right = 0.98
|
||||
anchor_bottom = 0.98
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer" unique_id=52145940]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer" unique_id=1297899052]
|
||||
layout_mode = 2
|
||||
text = "TITLE_REMIX"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Tracks" type="VBoxContainer" parent="PanelContainer/VBoxContainer" unique_id=569992226]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="SourceCartridge" type="HBoxContainer" parent="PanelContainer/VBoxContainer/Tracks" unique_id=931537259]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="PanelContainer/VBoxContainer/Tracks/SourceCartridge" unique_id=1025925653]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="CassetteSelector" type="VBoxContainer" parent="PanelContainer/VBoxContainer/Tracks/SourceCartridge" unique_id=1362428608]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="OptionButton" type="OptionButton" parent="PanelContainer/VBoxContainer/Tracks/SourceCartridge/CassetteSelector" unique_id=2057426198]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
alignment = 1
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer/Tracks/SourceCartridge" unique_id=56504458]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/Tracks/SourceCartridge/MarginContainer" unique_id=401386073]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MoneyLabel" type="Label" parent="PanelContainer/VBoxContainer/Tracks/SourceCartridge/MarginContainer/VBoxContainer" unique_id=1228771446]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
text = "Coins: $0"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="PriceLabel" type="Label" parent="PanelContainer/VBoxContainer/Tracks/SourceCartridge/MarginContainer/VBoxContainer" unique_id=10984916]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
text = "Price: $0"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer/Tracks" unique_id=1364917513]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Labels" type="VBoxContainer" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer" unique_id=710296334]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Tower" type="Label" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer/Labels" unique_id=289304279]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 7
|
||||
text = "LABEL_TOWER_TRACK"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Weapon" type="Label" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer/Labels" unique_id=1334584466]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 7
|
||||
text = "LABEL_WEAPON_TRACK"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="TrackUIs" type="VBoxContainer" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer" unique_id=1502640378]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Tower" type="MarginContainer" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer/TrackUIs" unique_id=1754951909]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 4.0
|
||||
|
||||
[node name="NinePatchRect" type="NinePatchRect" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer/TrackUIs/Tower" unique_id=1043876948]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("5_4gmyw")
|
||||
patch_margin_left = 1
|
||||
patch_margin_top = 1
|
||||
patch_margin_right = 1
|
||||
patch_margin_bottom = 1
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer/TrackUIs/Tower" unique_id=2041795880]
|
||||
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="TowerParts" type="HBoxContainer" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer/TrackUIs/Tower/MarginContainer" unique_id=1372896552]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Weapon" type="MarginContainer" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer/TrackUIs" unique_id=784957506]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 4.0
|
||||
|
||||
[node name="NinePatchRect" type="NinePatchRect" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer/TrackUIs/Weapon" unique_id=1367707421]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("4_dya4i")
|
||||
patch_margin_left = 1
|
||||
patch_margin_top = 1
|
||||
patch_margin_right = 1
|
||||
patch_margin_bottom = 1
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer/TrackUIs/Weapon" unique_id=1073473458]
|
||||
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="WeaponParts" type="HBoxContainer" parent="PanelContainer/VBoxContainer/Tracks/HBoxContainer/TrackUIs/Weapon/MarginContainer" unique_id=1207309530]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="InfoPanel" type="HBoxContainer" parent="PanelContainer/VBoxContainer" unique_id=200656580]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 2.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/InfoPanel" unique_id=760510393]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Button" type="Button" parent="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer" unique_id=833264766]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_type_variation = &"SideCheckButton"
|
||||
toggle_mode = true
|
||||
text = "Side A"
|
||||
|
||||
[node name="DescriptionVBox" parent="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer" unique_id=1832289499 instance=ExtResource("3_q6wwl")]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer/InfoPanel" unique_id=525893430]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 0.1
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="PanelContainer/VBoxContainer/InfoPanel" unique_id=1230571449]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SamplePanel" type="VBoxContainer" parent="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2" unique_id=21833113]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2/SamplePanel" unique_id=1994154810]
|
||||
layout_mode = 2
|
||||
text = "TITLE_SAMPLES"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2/SamplePanel" unique_id=979137095]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="SampleLibrary" type="VBoxContainer" parent="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2/SamplePanel/ScrollContainer" unique_id=456687569]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Controls" type="HBoxContainer" parent="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2" unique_id=1461793061]
|
||||
layout_mode = 2
|
||||
alignment = 2
|
||||
|
||||
[node name="CancelButton" type="Button" parent="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2/Controls" unique_id=1859473013]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_CANCEL"
|
||||
|
||||
[node name="ConfirmButton" type="Button" parent="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2/Controls" unique_id=367270034]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_CONFIRM_REMIX"
|
||||
|
||||
[node name="FeatureUI" parent="." unique_id=697389351 instance=ExtResource("1_y6tpq")]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
anchors_preset = 0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
grow_horizontal = 1
|
||||
grow_vertical = 1
|
||||
mouse_filter = 2
|
||||
|
||||
[connection signal="item_selected" from="PanelContainer/VBoxContainer/Tracks/SourceCartridge/CassetteSelector/OptionButton" to="." method="select_card"]
|
||||
[connection signal="toggled" from="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer/Button" to="." method="press_check_button"]
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2/Controls/CancelButton" to="." method="_on_cancel_button_pressed"]
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/InfoPanel/VBoxContainer2/Controls/ConfirmButton" to="." method="_on_confirm_button_pressed"]
|
||||
54
ui/menus/OptionsMenu/audio_options.gd
Normal file
54
ui/menus/OptionsMenu/audio_options.gd
Normal file
@@ -0,0 +1,54 @@
|
||||
class_name AudioOptionsMenu
|
||||
extends VBoxContainer
|
||||
|
||||
@export var master_input: SpinBox
|
||||
@export var master_slider: HSlider
|
||||
@export var music_input: SpinBox
|
||||
@export var music_slider: HSlider
|
||||
@export var sfx_input: SpinBox
|
||||
@export var sfx_slider: HSlider
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
master_input.value = Data.audio.master
|
||||
master_slider.value = Data.audio.master
|
||||
music_input.value = Data.audio.music
|
||||
music_slider.value = Data.audio.music
|
||||
sfx_input.value = Data.audio.sfx
|
||||
sfx_slider.value = Data.audio.sfx
|
||||
|
||||
|
||||
func _on_master_spin_box_value_changed(value: float) -> void:
|
||||
master_slider.value = value
|
||||
Data.audio.master = value
|
||||
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db(value / 100.0))
|
||||
|
||||
|
||||
func _on_master_h_slider_value_changed(value: float) -> void:
|
||||
master_input.value = value
|
||||
Data.audio.master = value
|
||||
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db(value / 100.0))
|
||||
|
||||
|
||||
func _on_music_spin_box_value_changed(value: float) -> void:
|
||||
music_slider.value = value
|
||||
Data.audio.music = value
|
||||
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Music"), linear_to_db(value / 100.0))
|
||||
|
||||
|
||||
func _on_music_h_slider_value_changed(value: float) -> void:
|
||||
music_input.value = value
|
||||
Data.audio.music = value
|
||||
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Music"), linear_to_db(value / 100.0))
|
||||
|
||||
|
||||
func _on_sfx_spin_box_value_changed(value: float) -> void:
|
||||
sfx_slider.value = value
|
||||
Data.audio.sfx = value
|
||||
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("SFX"), linear_to_db(value / 100.0))
|
||||
|
||||
|
||||
func _on_sfx_h_slider_value_changed(value: float) -> void:
|
||||
sfx_input.value = value
|
||||
Data.audio.sfx = value
|
||||
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("SFX"), linear_to_db(value / 100.0))
|
||||
1
ui/menus/OptionsMenu/audio_options.gd.uid
Normal file
1
ui/menus/OptionsMenu/audio_options.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c4ljvgrb81du6
|
||||
110
ui/menus/OptionsMenu/audio_options.tscn
Normal file
110
ui/menus/OptionsMenu/audio_options.tscn
Normal file
@@ -0,0 +1,110 @@
|
||||
[gd_scene format=3 uid="uid://bwc45ogto8thn"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c4ljvgrb81du6" path="res://ui/menus/OptionsMenu/audio_options.gd" id="1_avc0j"]
|
||||
|
||||
[sub_resource type="ImageTexture" id="ImageTexture_hvvdd"]
|
||||
|
||||
[node name="Audio" type="VBoxContainer" unique_id=593801484 node_paths=PackedStringArray("master_input", "master_slider", "music_input", "music_slider", "sfx_input", "sfx_slider")]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_avc0j")
|
||||
master_input = NodePath("Master/HBoxContainer/SpinBox")
|
||||
master_slider = NodePath("Master/HBoxContainer/HSlider")
|
||||
music_input = NodePath("Music/HBoxContainer/SpinBox")
|
||||
music_slider = NodePath("Music/HBoxContainer/HSlider")
|
||||
sfx_input = NodePath("SFX/HBoxContainer/SpinBox")
|
||||
sfx_slider = NodePath("SFX/HBoxContainer/HSlider")
|
||||
|
||||
[node name="Master" type="HBoxContainer" parent="." unique_id=1142133925]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Master" unique_id=1552603842]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_MASTER_AUDIO"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Master" unique_id=1063013261]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="Master/HBoxContainer" unique_id=1380819438]
|
||||
layout_mode = 2
|
||||
theme_override_icons/updown = SubResource("ImageTexture_hvvdd")
|
||||
value = 100.0
|
||||
rounded = true
|
||||
alignment = 1
|
||||
update_on_text_changed = true
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="Master/HBoxContainer" unique_id=497952448]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
value = 100.0
|
||||
|
||||
[node name="Music" type="HBoxContainer" parent="." unique_id=812179024]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Music" unique_id=1525069107]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_MUSIC_AUDIO"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Music" unique_id=1819073536]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="Music/HBoxContainer" unique_id=1382680787]
|
||||
layout_mode = 2
|
||||
theme_override_icons/updown = SubResource("ImageTexture_hvvdd")
|
||||
value = 100.0
|
||||
rounded = true
|
||||
alignment = 1
|
||||
update_on_text_changed = true
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="Music/HBoxContainer" unique_id=441308549]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
value = 100.0
|
||||
|
||||
[node name="SFX" type="HBoxContainer" parent="." unique_id=640927754]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="SFX" unique_id=645474174]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_SFX_AUDIO"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="SFX" unique_id=315581570]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="SFX/HBoxContainer" unique_id=1649673461]
|
||||
layout_mode = 2
|
||||
theme_override_icons/updown = SubResource("ImageTexture_hvvdd")
|
||||
value = 100.0
|
||||
rounded = true
|
||||
alignment = 1
|
||||
update_on_text_changed = true
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="SFX/HBoxContainer" unique_id=2086377224]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
value = 100.0
|
||||
|
||||
[connection signal="value_changed" from="Master/HBoxContainer/SpinBox" to="." method="_on_master_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="Master/HBoxContainer/HSlider" to="." method="_on_master_h_slider_value_changed"]
|
||||
[connection signal="value_changed" from="Music/HBoxContainer/SpinBox" to="." method="_on_music_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="Music/HBoxContainer/HSlider" to="." method="_on_music_h_slider_value_changed"]
|
||||
[connection signal="value_changed" from="SFX/HBoxContainer/SpinBox" to="." method="_on_sfx_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="SFX/HBoxContainer/HSlider" to="." method="_on_sfx_h_slider_value_changed"]
|
||||
74
ui/menus/OptionsMenu/gameplay_options.gd
Normal file
74
ui/menus/OptionsMenu/gameplay_options.gd
Normal file
@@ -0,0 +1,74 @@
|
||||
class_name GameplayOptionsMenu
|
||||
extends VBoxContainer
|
||||
|
||||
@export var resolution_drop_down: OptionButton
|
||||
@export var look_sens_slider: HSlider
|
||||
@export var look_sens_input: SpinBox
|
||||
@export var toggle_sprint_checkbox: CheckButton
|
||||
@export var invert_lookY: CheckButton
|
||||
@export var invert_lookX: CheckButton
|
||||
@export var fixed_minimap: CheckButton
|
||||
@export var tower_damage: Button
|
||||
@export var self_damage: Button
|
||||
@export var party_damage: Button
|
||||
@export var status_damage: Button
|
||||
@export var show_shield: Button
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
#resolution_drop_down.add_item("320x240")
|
||||
#resolution_drop_down.add_item("1920x1080")
|
||||
#$MouseSens2/HBoxContainer/SpinBox.value = get_window().content_scale_factor
|
||||
#$MouseSens2/HBoxContainer/HSlider.value = get_window().content_scale_factor
|
||||
look_sens_slider.value = Data.preferences.mouse_sens
|
||||
look_sens_input.value = Data.preferences.mouse_sens
|
||||
toggle_sprint_checkbox.button_pressed = Data.preferences.toggle_sprint
|
||||
invert_lookY.button_pressed = Data.preferences.invert_lookY
|
||||
invert_lookX.button_pressed = Data.preferences.invert_lookX
|
||||
fixed_minimap.button_pressed = Data.preferences.fixed_minimap
|
||||
tower_damage.button_pressed = Data.preferences.display_tower_damage_indicators
|
||||
self_damage.button_pressed = Data.preferences.display_self_damage_indicators
|
||||
party_damage.button_pressed = Data.preferences.display_party_damage_indicators
|
||||
status_damage.button_pressed = Data.preferences.display_status_effect_damage_indicators
|
||||
show_shield.button_pressed = Data.preferences.always_show_shield_ui
|
||||
|
||||
|
||||
func save() -> void:
|
||||
Data.preferences.mouse_sens = look_sens_slider.value
|
||||
Data.preferences.toggle_sprint = toggle_sprint_checkbox.button_pressed
|
||||
Data.preferences.invert_lookY = invert_lookY.button_pressed
|
||||
Data.preferences.invert_lookX = invert_lookX.button_pressed
|
||||
Data.preferences.fixed_minimap = fixed_minimap.button_pressed
|
||||
Data.preferences.display_tower_damage_indicators = tower_damage.button_pressed
|
||||
Data.preferences.display_self_damage_indicators = self_damage.button_pressed
|
||||
Data.preferences.display_party_damage_indicators = party_damage.button_pressed
|
||||
Data.preferences.display_status_effect_damage_indicators = status_damage.button_pressed
|
||||
Data.preferences.always_show_shield_ui = show_shield.button_pressed
|
||||
|
||||
|
||||
func _on_mouse_sens_spin_box_value_changed(value: float) -> void:
|
||||
look_sens_slider.value = value
|
||||
|
||||
|
||||
func _on_mouse_sens_h_slider_value_changed(value: float) -> void:
|
||||
look_sens_input.value = value
|
||||
|
||||
|
||||
func _on_option_button_item_selected(index: int) -> void:
|
||||
#print(index)
|
||||
if index == 0:
|
||||
get_tree().root.size = Vector2i(320, 240)
|
||||
#DisplayServer.window_set_size(Vector2i(320, 240))
|
||||
#print(get_tree().root.size)
|
||||
if index == 1:
|
||||
get_tree().root.size = Vector2i(1920, 1080)
|
||||
#DisplayServer.window_set_size(Vector2i(1920, 1080))
|
||||
#print(get_tree().root.size)
|
||||
|
||||
|
||||
func _on_spin_box_value_changed(value: float) -> void:
|
||||
get_window().content_scale_factor = value
|
||||
|
||||
|
||||
func _on_h_slider_value_changed(value: float) -> void:
|
||||
get_window().content_scale_factor = value
|
||||
1
ui/menus/OptionsMenu/gameplay_options.gd.uid
Normal file
1
ui/menus/OptionsMenu/gameplay_options.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dtrjph756oq1f
|
||||
210
ui/menus/OptionsMenu/gameplay_options.tscn
Normal file
210
ui/menus/OptionsMenu/gameplay_options.tscn
Normal file
@@ -0,0 +1,210 @@
|
||||
[gd_scene format=3 uid="uid://bjk7jf0bau5lv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dtrjph756oq1f" path="res://ui/menus/OptionsMenu/gameplay_options.gd" id="1_sy26f"]
|
||||
|
||||
[sub_resource type="ImageTexture" id="ImageTexture_03x6q"]
|
||||
|
||||
[node name="Gameplay" type="VBoxContainer" unique_id=9533751 node_paths=PackedStringArray("resolution_drop_down", "look_sens_slider", "look_sens_input", "toggle_sprint_checkbox", "invert_lookY", "invert_lookX", "fixed_minimap", "tower_damage", "self_damage", "party_damage", "status_damage", "show_shield")]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_sy26f")
|
||||
resolution_drop_down = NodePath("Resolution/HBoxContainer/OptionButton")
|
||||
look_sens_slider = NodePath("MouseSens/HBoxContainer/HSlider")
|
||||
look_sens_input = NodePath("MouseSens/HBoxContainer/SpinBox")
|
||||
toggle_sprint_checkbox = NodePath("ToggleSprint/CenterContainer/CheckButton")
|
||||
invert_lookY = NodePath("InvertMouseY/CenterContainer/CheckButton")
|
||||
invert_lookX = NodePath("InvertMouseX/CenterContainer/CheckButton")
|
||||
fixed_minimap = NodePath("FixedMinimap/CenterContainer/CheckButton")
|
||||
tower_damage = NodePath("FloatingDamageIndicators/CenterContainer/HBoxContainer/TowerDamage")
|
||||
self_damage = NodePath("FloatingDamageIndicators/CenterContainer/HBoxContainer/SelfDamage")
|
||||
party_damage = NodePath("FloatingDamageIndicators/CenterContainer/HBoxContainer/PartyDamage")
|
||||
status_damage = NodePath("FloatingDamageIndicators/CenterContainer/HBoxContainer/StatusDamage")
|
||||
show_shield = NodePath("AlwaysShowShield/CenterContainer/CheckButton")
|
||||
|
||||
[node name="Resolution" type="HBoxContainer" parent="." unique_id=1996706644]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Resolution" unique_id=1300086140]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_RESOLUTION"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Resolution" unique_id=681886116]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="OptionButton" type="OptionButton" parent="Resolution/HBoxContainer" unique_id=796953193]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
|
||||
[node name="MouseSens" type="HBoxContainer" parent="." unique_id=94044285]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="MouseSens" unique_id=121857514]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_MOUSE_SENSITIVITY"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MouseSens" unique_id=1900220297]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="MouseSens/HBoxContainer" unique_id=1624869113]
|
||||
layout_mode = 2
|
||||
theme_override_icons/updown = SubResource("ImageTexture_03x6q")
|
||||
step = 0.01
|
||||
alignment = 1
|
||||
update_on_text_changed = true
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="MouseSens/HBoxContainer" unique_id=1975350654]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
step = 0.01
|
||||
scrollable = false
|
||||
|
||||
[node name="ToggleSprint" type="HBoxContainer" parent="." unique_id=978539197]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="ToggleSprint" unique_id=1283392954]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_TOGGLE_SPRINT"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="ToggleSprint" unique_id=376741059]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="ToggleSprint/CenterContainer" unique_id=2022295218]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
flat = true
|
||||
|
||||
[node name="InvertMouseY" type="HBoxContainer" parent="." unique_id=1444600243]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="InvertMouseY" unique_id=1572398345]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_INVERT_MOUSE_Y"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="InvertMouseY" unique_id=374128785]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="InvertMouseY/CenterContainer" unique_id=2044173913]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
flat = true
|
||||
|
||||
[node name="InvertMouseX" type="HBoxContainer" parent="." unique_id=461905582]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="InvertMouseX" unique_id=372744415]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_INVERT_MOUSE_X"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="InvertMouseX" unique_id=2040531812]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="InvertMouseX/CenterContainer" unique_id=1411305788]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
flat = true
|
||||
|
||||
[node name="FixedMinimap" type="HBoxContainer" parent="." unique_id=1354501751]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="FixedMinimap" unique_id=1118779722]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_FIXED_MINIMAP"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="FixedMinimap" unique_id=32064831]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="FixedMinimap/CenterContainer" unique_id=290069283]
|
||||
layout_mode = 2
|
||||
flat = true
|
||||
|
||||
[node name="FloatingDamageIndicators" type="HBoxContainer" parent="." unique_id=259538885]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="FloatingDamageIndicators" unique_id=1583027587]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_DISPLAY_DAMAGE_INDICATORS"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="FloatingDamageIndicators" unique_id=599427541]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="FloatingDamageIndicators/CenterContainer" unique_id=1975754983]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TowerDamage" type="Button" parent="FloatingDamageIndicators/CenterContainer/HBoxContainer" unique_id=241424148]
|
||||
layout_mode = 2
|
||||
toggle_mode = true
|
||||
button_pressed = true
|
||||
text = "OPTION_TOWER_DAMAGE"
|
||||
|
||||
[node name="SelfDamage" type="Button" parent="FloatingDamageIndicators/CenterContainer/HBoxContainer" unique_id=924745895]
|
||||
layout_mode = 2
|
||||
toggle_mode = true
|
||||
button_pressed = true
|
||||
text = "OPTION_SELF_DAMAGE"
|
||||
|
||||
[node name="PartyDamage" type="Button" parent="FloatingDamageIndicators/CenterContainer/HBoxContainer" unique_id=852777437]
|
||||
layout_mode = 2
|
||||
toggle_mode = true
|
||||
button_pressed = true
|
||||
text = "OPTION_PARTY_DAMAGE"
|
||||
|
||||
[node name="StatusDamage" type="Button" parent="FloatingDamageIndicators/CenterContainer/HBoxContainer" unique_id=764996434]
|
||||
layout_mode = 2
|
||||
toggle_mode = true
|
||||
button_pressed = true
|
||||
text = "OPTION_STATUS_DAMAGE"
|
||||
|
||||
[node name="AlwaysShowShield" type="HBoxContainer" parent="." unique_id=745573840]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="AlwaysShowShield" unique_id=856331565]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_ALWAYS_SHOW_SHIELD"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="AlwaysShowShield" unique_id=726349358]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="AlwaysShowShield/CenterContainer" unique_id=263220323]
|
||||
layout_mode = 2
|
||||
flat = true
|
||||
|
||||
[connection signal="item_selected" from="Resolution/HBoxContainer/OptionButton" to="." method="_on_option_button_item_selected"]
|
||||
[connection signal="value_changed" from="MouseSens/HBoxContainer/SpinBox" to="." method="_on_mouse_sens_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="MouseSens/HBoxContainer/HSlider" to="." method="_on_mouse_sens_h_slider_value_changed"]
|
||||
94
ui/menus/OptionsMenu/graphics_options.gd
Normal file
94
ui/menus/OptionsMenu/graphics_options.gd
Normal file
@@ -0,0 +1,94 @@
|
||||
class_name GraphicsOptionsMenu
|
||||
extends VBoxContainer
|
||||
|
||||
@export var fov_input: SpinBox
|
||||
@export var fov_slider: HSlider
|
||||
@export var vsync_dropdown: OptionButton
|
||||
@export var aa_dropdown: OptionButton
|
||||
@export var window_dropdown: OptionButton
|
||||
@export var vertex_jitter_input: SpinBox
|
||||
@export var vertex_jitter_slider: HSlider
|
||||
@export var affine_warping_input: SpinBox
|
||||
@export var affine_warping_slider: HSlider
|
||||
@export var resolution_scaling_input: SpinBox
|
||||
@export var resolution_scaling_slider: HSlider
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
fov_input.value = Data.graphics.hfov
|
||||
fov_slider.value = Data.graphics.hfov
|
||||
vsync_dropdown.selected = Data.graphics.vsync_mode
|
||||
aa_dropdown.selected = Data.graphics.aa_mode
|
||||
window_dropdown.selected = Data.graphics.windowed_mode
|
||||
vertex_jitter_input.value = Data.graphics.vertex_jitter
|
||||
vertex_jitter_slider.value = Data.graphics.vertex_jitter
|
||||
affine_warping_input.value = Data.graphics.affine_warping
|
||||
affine_warping_slider.value = Data.graphics.affine_warping
|
||||
resolution_scaling_slider.value = Data.graphics.resolution_scaling
|
||||
resolution_scaling_input.value = Data.graphics.resolution_scaling
|
||||
|
||||
|
||||
func save() -> void:
|
||||
Data.graphics.hfov = fov_slider.value
|
||||
Data.graphics.vsync_mode = vsync_dropdown.selected
|
||||
Data.graphics.aa_mode = aa_dropdown.selected
|
||||
Data.graphics.windowed_mode = window_dropdown.selected
|
||||
Data.graphics.vertex_jitter = vertex_jitter_slider.value
|
||||
Data.graphics.affine_warping = affine_warping_slider.value
|
||||
Data.graphics.resolution_scaling = resolution_scaling_slider.value
|
||||
|
||||
|
||||
func _on_fov_spin_box_value_changed(value: float) -> void:
|
||||
if value < 40.0:
|
||||
value = 40.0
|
||||
if value > 160.0:
|
||||
value = 160.0
|
||||
fov_slider.value = value
|
||||
Data.graphics.hfov = value
|
||||
|
||||
|
||||
func _on_fov_h_slider_value_changed(value: float) -> void:
|
||||
fov_input.value = value
|
||||
Data.graphics.hfov = value
|
||||
|
||||
|
||||
func _on_vertex_jitter_spin_box_value_changed(value: float) -> void:
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
vertex_jitter_slider.value = value
|
||||
Data.graphics.vertex_jitter = value
|
||||
|
||||
|
||||
func _on_vertex_jitter_h_slider_value_changed(value: float) -> void:
|
||||
vertex_jitter_input.value = value
|
||||
Data.graphics.vertex_jitter = value
|
||||
|
||||
|
||||
func _on_affine_warping_spin_box_value_changed(value: float) -> void:
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
affine_warping_slider.value = value
|
||||
Data.graphics.affine_warping = value
|
||||
|
||||
|
||||
func _on_affine_warping_h_slider_value_changed(value: float) -> void:
|
||||
affine_warping_input.value = value
|
||||
Data.graphics.affine_warping = value
|
||||
|
||||
|
||||
func _on_resolution_scaling_spin_box_value_changed(value: float) -> void:
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
resolution_scaling_slider.value = value
|
||||
Data.resolution_changed.emit(Vector2(1920, 1080) * value)
|
||||
|
||||
|
||||
func _on_resolution_scaling_h_slider_value_changed(value: float) -> void:
|
||||
resolution_scaling_input.value = value
|
||||
Data.resolution_changed.emit(Vector2(1920, 1080) * value)
|
||||
1
ui/menus/OptionsMenu/graphics_options.gd.uid
Normal file
1
ui/menus/OptionsMenu/graphics_options.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bpb5c5r1yi8um
|
||||
241
ui/menus/OptionsMenu/graphics_options.tscn
Normal file
241
ui/menus/OptionsMenu/graphics_options.tscn
Normal file
@@ -0,0 +1,241 @@
|
||||
[gd_scene format=3 uid="uid://bmd4mawasoc11"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bpb5c5r1yi8um" path="res://ui/menus/OptionsMenu/graphics_options.gd" id="1_85rh6"]
|
||||
|
||||
[sub_resource type="ImageTexture" id="ImageTexture_03x6q"]
|
||||
|
||||
[node name="Graphics" type="VBoxContainer" unique_id=1842224615 node_paths=PackedStringArray("fov_input", "fov_slider", "vsync_dropdown", "aa_dropdown", "window_dropdown", "vertex_jitter_input", "vertex_jitter_slider", "affine_warping_input", "affine_warping_slider", "resolution_scaling_input", "resolution_scaling_slider")]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_85rh6")
|
||||
fov_input = NodePath("FOV/HBoxContainer/SpinBox")
|
||||
fov_slider = NodePath("FOV/HBoxContainer/HSlider")
|
||||
vsync_dropdown = NodePath("VSync/OptionButton")
|
||||
aa_dropdown = NodePath("AntiAliasing/OptionButton")
|
||||
window_dropdown = NodePath("Windowed/OptionButton")
|
||||
vertex_jitter_input = NodePath("VextexJitter/HBoxContainer/SpinBox")
|
||||
vertex_jitter_slider = NodePath("VextexJitter/HBoxContainer/HSlider")
|
||||
affine_warping_input = NodePath("AffineWarping/HBoxContainer/SpinBox")
|
||||
affine_warping_slider = NodePath("AffineWarping/HBoxContainer/HSlider")
|
||||
resolution_scaling_input = NodePath("ResolutionScaling/HBoxContainer/SpinBox")
|
||||
resolution_scaling_slider = NodePath("ResolutionScaling/HBoxContainer/HSlider")
|
||||
|
||||
[node name="ResolutionScaling" type="HBoxContainer" parent="." unique_id=1230619872]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="ResolutionScaling" unique_id=550655132]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_RESOLUTION_SCALING"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="ResolutionScaling" unique_id=1042104415]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="ResolutionScaling/HBoxContainer" unique_id=3787654]
|
||||
layout_mode = 2
|
||||
theme_override_icons/updown = SubResource("ImageTexture_03x6q")
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
value = 0.2
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
alignment = 1
|
||||
update_on_text_changed = true
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="ResolutionScaling/HBoxContainer" unique_id=608837003]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
value = 0.2
|
||||
scrollable = false
|
||||
|
||||
[node name="FOV" type="HBoxContainer" parent="." unique_id=693078328]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="FOV" unique_id=1333460491]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_FOV"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="FOV" unique_id=100259182]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="FOV/HBoxContainer" unique_id=1868915881]
|
||||
layout_mode = 2
|
||||
theme_override_icons/updown = SubResource("ImageTexture_03x6q")
|
||||
min_value = 40.0
|
||||
max_value = 160.0
|
||||
value = 100.0
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
alignment = 1
|
||||
update_on_text_changed = true
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="FOV/HBoxContainer" unique_id=1915723315]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
min_value = 40.0
|
||||
max_value = 160.0
|
||||
value = 100.0
|
||||
scrollable = false
|
||||
|
||||
[node name="VSync" type="HBoxContainer" parent="." unique_id=394348081]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VSync" unique_id=2134636415]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_VSYNC"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="OptionButton" type="OptionButton" parent="VSync" unique_id=1949378825]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
selected = 1
|
||||
item_count = 4
|
||||
popup/item_0/text = "OPTION_OFF"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "OPTION_ON"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "OPTION_ADAPTIVE"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "OPTION_TRIPLE_BUFFERED"
|
||||
popup/item_3/id = 3
|
||||
|
||||
[node name="AntiAliasing" type="HBoxContainer" parent="." unique_id=370267058]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="AntiAliasing" unique_id=927045887]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_AA"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="OptionButton" type="OptionButton" parent="AntiAliasing" unique_id=945853339]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
selected = 0
|
||||
item_count = 3
|
||||
popup/item_0/text = "OPTION_OFF"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "OPTION_FXAA"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "OPTION_TAA"
|
||||
popup/item_2/id = 2
|
||||
|
||||
[node name="Windowed" type="HBoxContainer" parent="." unique_id=588218761]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Windowed" unique_id=128071246]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_WINDOW_TYPE"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="OptionButton" type="OptionButton" parent="Windowed" unique_id=1949707304]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
selected = 0
|
||||
item_count = 3
|
||||
popup/item_0/text = "OPTION_WINDOWED"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "OPTION_BORDERLESS"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "OPTION_FULLSCREEN"
|
||||
popup/item_2/id = 2
|
||||
|
||||
[node name="VextexJitter" type="HBoxContainer" parent="." unique_id=624638999]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="VextexJitter" unique_id=890349126]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_VERTEX_JITTER"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VextexJitter" unique_id=857909591]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="VextexJitter/HBoxContainer" unique_id=319711346]
|
||||
layout_mode = 2
|
||||
theme_override_icons/updown = SubResource("ImageTexture_03x6q")
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
value = 0.2
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
alignment = 1
|
||||
update_on_text_changed = true
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="VextexJitter/HBoxContainer" unique_id=451280678]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
value = 0.2
|
||||
scrollable = false
|
||||
|
||||
[node name="AffineWarping" type="HBoxContainer" parent="." unique_id=962591793]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="AffineWarping" unique_id=206915184]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_AFFINE_WARPING"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="AffineWarping" unique_id=1780949636]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="AffineWarping/HBoxContainer" unique_id=1434191726]
|
||||
layout_mode = 2
|
||||
theme_override_icons/updown = SubResource("ImageTexture_03x6q")
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
value = 1.0
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
alignment = 1
|
||||
update_on_text_changed = true
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="AffineWarping/HBoxContainer" unique_id=2037498715]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
value = 1.0
|
||||
scrollable = false
|
||||
|
||||
[connection signal="value_changed" from="ResolutionScaling/HBoxContainer/SpinBox" to="." method="_on_resolution_scaling_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="ResolutionScaling/HBoxContainer/HSlider" to="." method="_on_resolution_scaling_h_slider_value_changed"]
|
||||
[connection signal="value_changed" from="FOV/HBoxContainer/SpinBox" to="." method="_on_fov_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="FOV/HBoxContainer/HSlider" to="." method="_on_fov_h_slider_value_changed"]
|
||||
[connection signal="value_changed" from="VextexJitter/HBoxContainer/SpinBox" to="." method="_on_vertex_jitter_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="VextexJitter/HBoxContainer/HSlider" to="." method="_on_vertex_jitter_h_slider_value_changed"]
|
||||
[connection signal="value_changed" from="AffineWarping/HBoxContainer/SpinBox" to="." method="_on_affine_warping_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="AffineWarping/HBoxContainer/HSlider" to="." method="_on_affine_warping_h_slider_value_changed"]
|
||||
125
ui/menus/OptionsMenu/keybind_entry.gd
Normal file
125
ui/menus/OptionsMenu/keybind_entry.gd
Normal file
@@ -0,0 +1,125 @@
|
||||
class_name KeybindEntry
|
||||
extends HBoxContainer
|
||||
|
||||
signal bind_button_pressed(button: Button)
|
||||
|
||||
var action_string: String
|
||||
var event_buttons: Array[BindButton]
|
||||
|
||||
|
||||
func to_array() -> Array:
|
||||
var binding_list: Array = []
|
||||
binding_list.append([action_string])
|
||||
for button: BindButton in event_buttons:
|
||||
var binding: Array = []
|
||||
if button.trigger_event is InputEventKey:
|
||||
binding.append("InputEventKey")
|
||||
binding.append(button.trigger_event.physical_keycode)
|
||||
if button.trigger_event is InputEventMouseButton:
|
||||
binding.append("InputEventMouseButton")
|
||||
binding.append(button.trigger_event.button_index)
|
||||
if button.trigger_event is InputEventJoypadButton:
|
||||
binding.append("InputEventJoypadButton")
|
||||
binding.append(button.trigger_event.button_index)
|
||||
binding_list.append(binding)
|
||||
return binding_list
|
||||
|
||||
|
||||
func populate_from_array(binding_list: Array) -> void:
|
||||
action_string = binding_list[0][0]
|
||||
for i: int in binding_list.size() - 1:
|
||||
if i == 0:
|
||||
continue
|
||||
for binding: Array in binding_list[i]:
|
||||
add_bind_button(KeymapData.event_from_array(binding))
|
||||
|
||||
|
||||
func set_action_name(action_name: String) -> void:
|
||||
action_string = action_name
|
||||
$ActionName.text = action_name
|
||||
|
||||
|
||||
func button_pressed(button: Button) -> void:
|
||||
bind_button_pressed.emit(button)
|
||||
|
||||
|
||||
func set_button_bind(event: InputEvent, button: BindButton) -> void:
|
||||
button.trigger_event = event
|
||||
button.text = ""
|
||||
if event is InputEventKey:
|
||||
if KeyIconMap.keys.has(str(event.physical_keycode)):
|
||||
button.icon = load(KeyIconMap.keys[str(event.physical_keycode)])
|
||||
elif event is InputEventMouseButton:
|
||||
if event.button_index == 4:
|
||||
button.icon = load(KeyIconMap.mouse_buttons[str(event.button_index)])
|
||||
elif event.button_index == 5:
|
||||
button.icon = load(KeyIconMap.mouse_buttons[str(event.button_index)])
|
||||
elif event.button_index == 6:
|
||||
button.text = "Mouse Wheel Left"
|
||||
elif event.button_index == 7:
|
||||
button.text = "Mouse Wheel Right"
|
||||
elif event.button_index == 8:
|
||||
button.text = "Mouse Button 4"
|
||||
elif event.button_index == 9:
|
||||
button.text = "Mouse Button 5"
|
||||
elif KeyIconMap.mouse_buttons.has(str(event.button_index)):
|
||||
button.icon = load(KeyIconMap.mouse_buttons[str(event.button_index)])
|
||||
elif event is InputEventJoypadButton:
|
||||
if Input.get_joy_name(event.device) == "Xbox 360 Controller":
|
||||
button.icon = load(KeyIconMap.xbox_360_keys[str(event.button_index)])
|
||||
elif Input.get_joy_name(event.device) == "Xbox Series Controller":
|
||||
button.icon = load(KeyIconMap.xbox_series_keys[str(event.button_index)])
|
||||
elif Input.get_joy_name(event.device).contains("playstation"):
|
||||
button.icon = load(KeyIconMap.playstation_keys[str(event.button_index)])
|
||||
|
||||
|
||||
func set_cross_button_visibility(button: Button, visibility: bool) -> void:
|
||||
button.visible = visibility
|
||||
|
||||
|
||||
func add_bind_button(event: InputEvent) -> BindButton:
|
||||
#Create binding button
|
||||
var new_button: BindButton = BindButton.new()
|
||||
new_button.mouse_filter = Control.MOUSE_FILTER_PASS
|
||||
new_button.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
new_button.custom_minimum_size = Vector2(75.0, 75.0)
|
||||
new_button.icon_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
new_button.expand_icon = true
|
||||
new_button.pressed.connect(button_pressed.bind(new_button))
|
||||
if event:
|
||||
set_button_bind(event, new_button)
|
||||
event_buttons.append(new_button)
|
||||
|
||||
#Create delete button
|
||||
var cross_button: Button = Button.new()
|
||||
cross_button.icon = load("res://Assets/Textures/flair_disabled_cross.png")
|
||||
cross_button.visible = false
|
||||
cross_button.mouse_filter = Control.MOUSE_FILTER_PASS
|
||||
cross_button.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
cross_button.icon_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
cross_button.expand_icon = true
|
||||
cross_button.pressed.connect(remove_bind_button.bind(new_button))
|
||||
|
||||
#Create vbox to hold buttons
|
||||
var vbox: VBoxContainer = VBoxContainer.new()
|
||||
vbox.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
vbox.custom_minimum_size = Vector2(100.0, 100.0)
|
||||
vbox.mouse_entered.connect(set_cross_button_visibility.bind(cross_button, true))
|
||||
vbox.mouse_exited.connect(set_cross_button_visibility.bind(cross_button, false))
|
||||
|
||||
#Add buttons to vbox and add vbox to button grid
|
||||
vbox.add_child(new_button)
|
||||
vbox.add_child(cross_button)
|
||||
$Buttons.add_child(vbox)
|
||||
$Buttons.move_child(vbox, $Buttons.get_child_count() - 2)
|
||||
|
||||
return new_button
|
||||
|
||||
|
||||
func remove_bind_button(button: BindButton) -> void:
|
||||
event_buttons.erase(button)
|
||||
button.get_parent().queue_free()
|
||||
|
||||
|
||||
func _on_add_bind_button_pressed() -> void:
|
||||
add_bind_button(null).pressed.emit()
|
||||
1
ui/menus/OptionsMenu/keybind_entry.gd.uid
Normal file
1
ui/menus/OptionsMenu/keybind_entry.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://y2pxkfjn0wa2
|
||||
34
ui/menus/OptionsMenu/keybind_entry.tscn
Normal file
34
ui/menus/OptionsMenu/keybind_entry.tscn
Normal file
@@ -0,0 +1,34 @@
|
||||
[gd_scene format=3 uid="uid://cb8irvp2y2p6g"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://y2pxkfjn0wa2" path="res://ui/menus/OptionsMenu/keybind_entry.gd" id="1_it8q2"]
|
||||
|
||||
[node name="KeybindEntry" type="HBoxContainer" unique_id=2041313667]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("1_it8q2")
|
||||
|
||||
[node name="ActionName" type="Label" parent="." unique_id=1413481849]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Action Name"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Buttons" type="GridContainer" parent="." unique_id=312221019]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
columns = 4
|
||||
|
||||
[node name="AddBindButton" type="Button" parent="Buttons" unique_id=329539958]
|
||||
custom_minimum_size = Vector2(80, 80)
|
||||
layout_mode = 2
|
||||
text = "+"
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[connection signal="pressed" from="Buttons/AddBindButton" to="." method="_on_add_bind_button_pressed"]
|
||||
53
ui/menus/OptionsMenu/keybind_options.gd
Normal file
53
ui/menus/OptionsMenu/keybind_options.gd
Normal file
@@ -0,0 +1,53 @@
|
||||
extends VBoxContainer
|
||||
class_name KeybindsOptionsMenu
|
||||
|
||||
@export var keybind_entry_scene: PackedScene
|
||||
@export var keybind_popup: PackedScene
|
||||
var keybind_boxes: Array[KeybindEntry] = []
|
||||
var key_event: InputEvent
|
||||
var selected_entry: KeybindEntry
|
||||
var listening_for_key: bool = false
|
||||
var ui_layer: CanvasLayer
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
#for index: int in Data.keymaps.size():
|
||||
# var map: PlayerKeymap = Data.keymaps[index]
|
||||
# var button: Button = Button.new()
|
||||
# button.text = map.title
|
||||
# button.pressed.connect(set_keymap.bind(index))
|
||||
# $HBoxContainer.add_child(button)
|
||||
load_keybind_labels()
|
||||
|
||||
|
||||
func set_keymap(keymap_index: int) -> void:
|
||||
Data.player_keymap = Data.keymaps[keymap_index]
|
||||
Data.player_keymap.apply()
|
||||
load_keybind_labels()
|
||||
|
||||
|
||||
func load_keybind_labels() -> void:
|
||||
for box: KeybindEntry in keybind_boxes:
|
||||
box.queue_free()
|
||||
keybind_boxes.clear()
|
||||
for action: StringName in InputMap.get_actions():
|
||||
if !action.begins_with("ui_"):
|
||||
var entry: KeybindEntry = keybind_entry_scene.instantiate() as KeybindEntry
|
||||
entry.set_action_name(action)
|
||||
if InputMap.action_get_events(action).size() > 0:
|
||||
for event: InputEvent in InputMap.action_get_events(action):
|
||||
entry.add_bind_button(event)
|
||||
keybind_boxes.append(entry)
|
||||
entry.bind_button_pressed.connect(_on_keybind_button_pressed.bind(entry))
|
||||
$ScrollContainer/VBoxContainer.add_child(entry)
|
||||
|
||||
|
||||
func _on_keybind_button_pressed(button: Button, keybind_entry: KeybindEntry) -> void:
|
||||
var popup: KeybindPopup = keybind_popup.instantiate()
|
||||
popup.event_detected.connect(keybind_entry.set_button_bind.bind(button))
|
||||
ui_layer.add_child(popup)
|
||||
|
||||
|
||||
func save() -> void:
|
||||
for entry: KeybindEntry in keybind_boxes:
|
||||
Data.keymap_data.add_binding(entry.to_array())
|
||||
1
ui/menus/OptionsMenu/keybind_options.gd.uid
Normal file
1
ui/menus/OptionsMenu/keybind_options.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cxm67e833baex
|
||||
26
ui/menus/OptionsMenu/keybind_options.tscn
Normal file
26
ui/menus/OptionsMenu/keybind_options.tscn
Normal file
@@ -0,0 +1,26 @@
|
||||
[gd_scene format=3 uid="uid://bf2nosqt5f82e"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cxm67e833baex" path="res://ui/menus/OptionsMenu/keybind_options.gd" id="1_oxg0p"]
|
||||
[ext_resource type="PackedScene" uid="uid://cb8irvp2y2p6g" path="res://ui/menus/OptionsMenu/keybind_entry.tscn" id="2_ayiik"]
|
||||
[ext_resource type="PackedScene" uid="uid://clsdko6ttudu8" path="res://ui/menus/OptionsMenu/keybind_popup.tscn" id="3_h1scm"]
|
||||
|
||||
[node name="Keybinds" type="VBoxContainer" unique_id=52837668]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_oxg0p")
|
||||
keybind_entry_scene = ExtResource("2_ayiik")
|
||||
keybind_popup = ExtResource("3_h1scm")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=606716856]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="." unique_id=1857275092]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer" unique_id=851587234]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
15
ui/menus/OptionsMenu/keybind_popup.gd
Normal file
15
ui/menus/OptionsMenu/keybind_popup.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
class_name KeybindPopup
|
||||
extends Control
|
||||
|
||||
signal event_detected(event: InputEvent)
|
||||
|
||||
var found_event: bool = false
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if found_event:
|
||||
return
|
||||
if event is InputEventKey or event is InputEventMouseButton or event is InputEventJoypadButton:
|
||||
get_viewport().set_input_as_handled()
|
||||
found_event = true
|
||||
event_detected.emit(event)
|
||||
queue_free()
|
||||
1
ui/menus/OptionsMenu/keybind_popup.gd.uid
Normal file
1
ui/menus/OptionsMenu/keybind_popup.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d25hjwjdwv35i
|
||||
38
ui/menus/OptionsMenu/keybind_popup.tscn
Normal file
38
ui/menus/OptionsMenu/keybind_popup.tscn
Normal file
@@ -0,0 +1,38 @@
|
||||
[gd_scene format=3 uid="uid://clsdko6ttudu8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d25hjwjdwv35i" path="res://ui/menus/OptionsMenu/keybind_popup.gd" id="1_m5i0b"]
|
||||
|
||||
[node name="KeybindPopup" type="Control" unique_id=439413596]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_m5i0b")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=122093359]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 0.54902)
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=658884725]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -99.0
|
||||
offset_top = -13.0
|
||||
offset_right = 99.0
|
||||
offset_bottom = 13.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "LABEL_BIND_KEY"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
69
ui/menus/OptionsMenu/keymap_data.gd
Normal file
69
ui/menus/OptionsMenu/keymap_data.gd
Normal file
@@ -0,0 +1,69 @@
|
||||
class_name KeymapData
|
||||
extends RefCounted
|
||||
|
||||
var title: String = "default"
|
||||
var map: Dictionary[String, Array]
|
||||
|
||||
|
||||
func add_binding(bind_array: Array) -> void:
|
||||
var x: int = bind_array.size() - 1
|
||||
var arr: Array
|
||||
for i: int in x:
|
||||
arr.append(bind_array[i + 1])
|
||||
map[bind_array[0][0]] = arr
|
||||
|
||||
|
||||
static func event_from_array(array: Array) -> InputEvent:
|
||||
if array.size() < 2:
|
||||
return null
|
||||
if array[0] == "InputEventKey":
|
||||
var event: InputEventKey = InputEventKey.new()
|
||||
event.physical_keycode = array[1]
|
||||
return event
|
||||
if array[0] == "InputEventMouseButton":
|
||||
var event: InputEventMouseButton = InputEventMouseButton.new()
|
||||
event.button_index = array[1]
|
||||
return event
|
||||
if array[0] == "InputEventJoypadButton":
|
||||
var event: InputEventJoypadButton = InputEventJoypadButton.new()
|
||||
event.button_index = array[1]
|
||||
return event
|
||||
return null
|
||||
|
||||
|
||||
func apply() -> void:
|
||||
for action_string: String in map.keys():
|
||||
InputMap.action_erase_events(action_string)
|
||||
for binding: Array in map[action_string]:
|
||||
var event: InputEvent = event_from_array(binding)
|
||||
if event:
|
||||
InputMap.action_add_event(action_string, event)
|
||||
|
||||
|
||||
func save_to_disc() -> void:
|
||||
var dir: DirAccess = DirAccess.open("user://")
|
||||
if !dir.dir_exists("keymaps"):
|
||||
dir.make_dir("keymaps")
|
||||
var save_file: FileAccess = FileAccess.open("user://keymaps/default", FileAccess.WRITE)
|
||||
var dict: Dictionary = {
|
||||
"title" = title,
|
||||
"map" = map,
|
||||
}
|
||||
var json_string: String = JSON.stringify(dict)
|
||||
save_file.store_line(json_string)
|
||||
|
||||
|
||||
static func load_from_disk() -> KeymapData:
|
||||
if FileAccess.file_exists("user://keymaps/default"):
|
||||
var save_file: FileAccess = FileAccess.open("user://keymaps/default", FileAccess.READ)
|
||||
var json_string: String = save_file.get_line()
|
||||
var json: JSON = JSON.new()
|
||||
var parse_result: Error = json.parse(json_string)
|
||||
if parse_result == OK:
|
||||
var dict: Dictionary = json.data
|
||||
var keymap: KeymapData = KeymapData.new()
|
||||
keymap.title = dict["title"]
|
||||
for key: String in dict["map"].keys():
|
||||
keymap.map[key] = dict["map"][key]
|
||||
return keymap
|
||||
return KeymapData.new()
|
||||
1
ui/menus/OptionsMenu/keymap_data.gd.uid
Normal file
1
ui/menus/OptionsMenu/keymap_data.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dui1k2e4q6cl
|
||||
49
ui/menus/OptionsMenu/options_menu.gd
Normal file
49
ui/menus/OptionsMenu/options_menu.gd
Normal file
@@ -0,0 +1,49 @@
|
||||
class_name OptionsMenu
|
||||
extends Control
|
||||
|
||||
@export var gameplay: GameplayOptionsMenu
|
||||
@export var graphics: GraphicsOptionsMenu
|
||||
@export var keybinds: KeybindsOptionsMenu
|
||||
@export var audio: AudioOptionsMenu
|
||||
var game_manager: GameManager
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
set_tab_locale()
|
||||
keybinds.ui_layer = game_manager.UILayer
|
||||
|
||||
|
||||
func set_tab_locale() -> void:
|
||||
gameplay.name = tr("OPTIONS_TAB_GAMEPLAY")
|
||||
graphics.name = tr("OPTIONS_TAB_GRAPHICS")
|
||||
keybinds.name = tr("OPTIONS_TAB_KEYBINDS")
|
||||
audio.name = tr("OPTIONS_TAB_AUDIO")
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("Pause"):
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_cancel_pressed() -> void:
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_confirm_pressed() -> void:
|
||||
gameplay.save()
|
||||
graphics.save()
|
||||
keybinds.save()
|
||||
Data.graphics.apply_graphical_settings(get_viewport())
|
||||
Data.graphics.save_profile_to_disk()
|
||||
Data.audio.apply_audio_settings()
|
||||
Data.audio.save_profile_to_disk()
|
||||
Data.preferences.save_profile_to_disk()
|
||||
Data.keymap_data.apply()
|
||||
Data.keymap_data.save_to_disc()
|
||||
#Data.player_keymap.save_profile_to_disk()
|
||||
#Data.player_controller_keymap.append_input_map()
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_button_hovered() -> void:
|
||||
$AudioStreamPlayer.play()
|
||||
1
ui/menus/OptionsMenu/options_menu.gd.uid
Normal file
1
ui/menus/OptionsMenu/options_menu.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://48rvmybi18wj
|
||||
78
ui/menus/OptionsMenu/options_menu.tscn
Normal file
78
ui/menus/OptionsMenu/options_menu.tscn
Normal file
@@ -0,0 +1,78 @@
|
||||
[gd_scene format=3 uid="uid://clulh7v8c7h85"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://48rvmybi18wj" path="res://ui/menus/OptionsMenu/options_menu.gd" id="1_bievw"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjk7jf0bau5lv" path="res://ui/menus/OptionsMenu/gameplay_options.tscn" id="3_25wuw"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmd4mawasoc11" path="res://ui/menus/OptionsMenu/graphics_options.tscn" id="4_ckcvq"]
|
||||
[ext_resource type="PackedScene" uid="uid://bf2nosqt5f82e" path="res://ui/menus/OptionsMenu/keybind_options.tscn" id="5_4k33c"]
|
||||
[ext_resource type="PackedScene" uid="uid://bwc45ogto8thn" path="res://ui/menus/OptionsMenu/audio_options.tscn" id="6_4vs8p"]
|
||||
[ext_resource type="AudioStream" uid="uid://cp6ph4ra7u5rk" path="res://ui/drop_003.ogg" id="6_hhyef"]
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_5otwj"]
|
||||
random_pitch = 1.1
|
||||
streams_count = 1
|
||||
stream_0/stream = ExtResource("6_hhyef")
|
||||
|
||||
[node name="OptionsMenu" type="PanelContainer" unique_id=891478447 node_paths=PackedStringArray("gameplay", "graphics", "keybinds", "audio")]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 30.0
|
||||
offset_top = 30.0
|
||||
offset_right = -30.0
|
||||
offset_bottom = -30.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_bievw")
|
||||
gameplay = NodePath("VBoxContainer/TabContainer/Gameplay")
|
||||
graphics = NodePath("VBoxContainer/TabContainer/Graphics")
|
||||
keybinds = NodePath("VBoxContainer/TabContainer/Keybinds")
|
||||
audio = NodePath("VBoxContainer/TabContainer/Audio")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1706117892]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="VBoxContainer" unique_id=1945339047]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
current_tab = 0
|
||||
|
||||
[node name="Gameplay" parent="VBoxContainer/TabContainer" unique_id=1603835818 instance=ExtResource("3_25wuw")]
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 0
|
||||
|
||||
[node name="Graphics" parent="VBoxContainer/TabContainer" unique_id=1564378673 instance=ExtResource("4_ckcvq")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 1
|
||||
|
||||
[node name="Keybinds" parent="VBoxContainer/TabContainer" unique_id=854093688 instance=ExtResource("5_4k33c")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 2
|
||||
|
||||
[node name="Audio" parent="VBoxContainer/TabContainer" unique_id=783102281 instance=ExtResource("6_4vs8p")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 3
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer" unique_id=481503461]
|
||||
layout_mode = 2
|
||||
alignment = 2
|
||||
|
||||
[node name="Cancel" type="Button" parent="VBoxContainer/HBoxContainer" unique_id=1274004537]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_CANCEL"
|
||||
|
||||
[node name="Confirm" type="Button" parent="VBoxContainer/HBoxContainer" unique_id=716108741]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_CONFIRM"
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=103920719]
|
||||
stream = SubResource("AudioStreamRandomizer_5otwj")
|
||||
volume_db = -9.937
|
||||
bus = &"SFX"
|
||||
|
||||
[connection signal="mouse_entered" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_button_hovered"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_cancel_pressed"]
|
||||
[connection signal="mouse_entered" from="VBoxContainer/HBoxContainer/Confirm" to="." method="_on_button_hovered"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Confirm" to="." method="_on_confirm_pressed"]
|
||||
54
ui/menus/PauseMenu/pause_menu.gd
Normal file
54
ui/menus/PauseMenu/pause_menu.gd
Normal file
@@ -0,0 +1,54 @@
|
||||
class_name PauseMenu extends Control
|
||||
|
||||
signal closed
|
||||
signal quit_to_main_menu_pressed
|
||||
signal quit_to_desktop_pressed
|
||||
|
||||
var options_menu_scene: PackedScene = preload("res://UI/Menus/OptionsMenu/options_menu.tscn")
|
||||
var confirmation_popup_scene: PackedScene = preload("res://Scenes/Menus/confirmation_popup.tscn")
|
||||
var game_manager: GameManager
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("Pause"):
|
||||
accept_event()
|
||||
_on_resume_pressed()
|
||||
|
||||
|
||||
func _on_resume_pressed() -> void:
|
||||
closed.emit()
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_options_pressed() -> void:
|
||||
var menu: OptionsMenu = options_menu_scene.instantiate()
|
||||
menu.game_manager = game_manager
|
||||
add_child(menu)
|
||||
|
||||
|
||||
func _on_quit_to_main_menu_pressed() -> void:
|
||||
var popup: ConfirmationPopup = confirmation_popup_scene.instantiate() as ConfirmationPopup
|
||||
popup.set_popup("Are you sure you want to quit and return to main menu?", "Yes", "No")
|
||||
popup.completed.connect(return_to_menu)
|
||||
add_child(popup)
|
||||
|
||||
|
||||
func return_to_menu(confirmation: bool) -> void:
|
||||
if confirmation:
|
||||
quit_to_main_menu_pressed.emit()
|
||||
|
||||
|
||||
func _on_quit_to_desktop_pressed() -> void:
|
||||
var popup: ConfirmationPopup = confirmation_popup_scene.instantiate() as ConfirmationPopup
|
||||
popup.set_popup("Are you sure you want to quit?", "Yes", "No")
|
||||
popup.completed.connect(quit_game)
|
||||
add_child(popup)
|
||||
|
||||
|
||||
func quit_game(confirmation: bool) -> void:
|
||||
if confirmation:
|
||||
quit_to_desktop_pressed.emit()
|
||||
|
||||
|
||||
func _on_button_mouse_entered() -> void:
|
||||
$AudioStreamPlayer.play()
|
||||
1
ui/menus/PauseMenu/pause_menu.gd.uid
Normal file
1
ui/menus/PauseMenu/pause_menu.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cjyyepxaf4xl8
|
||||
74
ui/menus/PauseMenu/pause_menu.tscn
Normal file
74
ui/menus/PauseMenu/pause_menu.tscn
Normal file
@@ -0,0 +1,74 @@
|
||||
[gd_scene format=3 uid="uid://buvgdem68wtev"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cjyyepxaf4xl8" path="res://ui/menus/PauseMenu/pause_menu.gd" id="2_4pn2l"]
|
||||
[ext_resource type="AudioStream" uid="uid://cp6ph4ra7u5rk" path="res://ui/drop_003.ogg" id="3_0bid7"]
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_n6ixr"]
|
||||
random_pitch = 1.1
|
||||
streams_count = 1
|
||||
stream_0/stream = ExtResource("3_0bid7")
|
||||
|
||||
[node name="Control" type="Control" unique_id=1157017318]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("2_4pn2l")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1723382929]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.278431, 0.278431, 0.278431, 0.545098)
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=1006913241]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer" unique_id=1192605916]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Resume" type="Button" parent="PanelContainer/VBoxContainer" unique_id=1026126243]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_RESUME"
|
||||
|
||||
[node name="Options" type="Button" parent="PanelContainer/VBoxContainer" unique_id=1050921293]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_OPTIONS"
|
||||
|
||||
[node name="QuitToMainMenu" type="Button" parent="PanelContainer/VBoxContainer" unique_id=356852954]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_MAIN_MENU"
|
||||
|
||||
[node name="QuitToDesktop" type="Button" parent="PanelContainer/VBoxContainer" unique_id=11070618]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_QUIT"
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1218417780]
|
||||
stream = SubResource("AudioStreamRandomizer_n6ixr")
|
||||
volume_db = -11.261
|
||||
bus = &"SFX"
|
||||
|
||||
[connection signal="mouse_entered" from="PanelContainer/VBoxContainer/Resume" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/Resume" to="." method="_on_resume_pressed"]
|
||||
[connection signal="mouse_entered" from="PanelContainer/VBoxContainer/Options" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/Options" to="." method="_on_options_pressed"]
|
||||
[connection signal="mouse_entered" from="PanelContainer/VBoxContainer/QuitToMainMenu" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/QuitToMainMenu" to="." method="_on_quit_to_main_menu_pressed"]
|
||||
[connection signal="mouse_entered" from="PanelContainer/VBoxContainer/QuitToDesktop" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/QuitToDesktop" to="." method="_on_quit_to_desktop_pressed"]
|
||||
39
ui/menus/RadioMenu/choose_cassette_screen.gd
Normal file
39
ui/menus/RadioMenu/choose_cassette_screen.gd
Normal file
@@ -0,0 +1,39 @@
|
||||
class_name ChooseCassetteScreen extends Control
|
||||
|
||||
signal cassette_chosen(cassette: Cassette)
|
||||
|
||||
@export var choice_buttons: VBoxContainer
|
||||
@export var cassette_desc: cassetteDescriptionUI
|
||||
@export var cassette_name_label: Label
|
||||
|
||||
var choices: Array[Cassette] = []
|
||||
var chosen_cassette: Cassette = null
|
||||
var side_a: bool = true
|
||||
|
||||
|
||||
func add_cassettes(cassettes: Array[Cassette]) -> void:
|
||||
var x: int = 0
|
||||
for cassette: Cassette in cassettes:
|
||||
var button: Button = Button.new()
|
||||
button.text = tr(cassette.display_name)
|
||||
button.pressed.connect(choose_cassette.bind(x))
|
||||
choices.append(cassette)
|
||||
choice_buttons.add_child(button)
|
||||
x += 1
|
||||
choose_cassette(0)
|
||||
|
||||
|
||||
func choose_cassette(choice: int) -> void:
|
||||
chosen_cassette = choices[choice]
|
||||
cassette_name_label.text = tr(chosen_cassette.display_name)
|
||||
choose_side(side_a)
|
||||
|
||||
|
||||
func choose_side(side_a_chosen: bool) -> void:
|
||||
side_a = side_a_chosen
|
||||
cassette_desc.set_cassette(chosen_cassette, side_a)
|
||||
|
||||
|
||||
func _on_confirm_button_pressed() -> void:
|
||||
cassette_chosen.emit(chosen_cassette)
|
||||
queue_free()
|
||||
1
ui/menus/RadioMenu/choose_cassette_screen.gd.uid
Normal file
1
ui/menus/RadioMenu/choose_cassette_screen.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://nc0df5y8tll7
|
||||
81
ui/menus/RadioMenu/choose_cassette_screen.tscn
Normal file
81
ui/menus/RadioMenu/choose_cassette_screen.tscn
Normal file
@@ -0,0 +1,81 @@
|
||||
[gd_scene format=3 uid="uid://bcvjgl0s1wp8y"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://nc0df5y8tll7" path="res://ui/menus/RadioMenu/choose_cassette_screen.gd" id="1_y4oar"]
|
||||
[ext_resource type="PackedScene" uid="uid://cmlpmr78tmo6p" path="res://ui/cassette_description_ui.tscn" id="2_3npvv"]
|
||||
|
||||
[node name="ChooseCardScreen" type="Control" unique_id=1927453152 node_paths=PackedStringArray("choice_buttons")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_y4oar")
|
||||
choice_buttons = NodePath("PanelContainer/Content/HBoxContainer/ChoicesVBox")
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=1752212475]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.03
|
||||
anchor_top = 0.03
|
||||
anchor_right = 0.97
|
||||
anchor_bottom = 0.97
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Content" type="VBoxContainer" parent="PanelContainer" unique_id=1298216398]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ScreenTitleLabel" type="Label" parent="PanelContainer/Content" unique_id=829360403]
|
||||
layout_mode = 2
|
||||
text = "LABEL_CHOOSE_CARD"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/Content" unique_id=970485434]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="ChoicesVBox" type="VBoxContainer" parent="PanelContainer/Content/HBoxContainer" unique_id=2067688065]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/Content/HBoxContainer" unique_id=1254645687]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 2.0
|
||||
|
||||
[node name="NameLabel" type="Label" parent="PanelContainer/Content/HBoxContainer/VBoxContainer" unique_id=207760313]
|
||||
auto_translate_mode = 2
|
||||
layout_mode = 2
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/Content/HBoxContainer/VBoxContainer" unique_id=634615252]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="TowerButton" type="Button" parent="PanelContainer/Content/HBoxContainer/VBoxContainer/HBoxContainer" unique_id=1824675004]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_VIEW_TOWER"
|
||||
|
||||
[node name="WeaponButton" type="Button" parent="PanelContainer/Content/HBoxContainer/VBoxContainer/HBoxContainer" unique_id=91256030]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_VIEW_WEAPON"
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="PanelContainer/Content/HBoxContainer/VBoxContainer" unique_id=72383687]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="ConfirmButton" type="Button" parent="PanelContainer/Content/HBoxContainer/VBoxContainer" unique_id=1105450397]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
text = "BUTTON_FINALIZE_CARD_CHOICE"
|
||||
|
||||
[node name="DescriptionVBox" parent="PanelContainer/Content/HBoxContainer" unique_id=261851820 instance=ExtResource("2_3npvv")]
|
||||
layout_mode = 2
|
||||
|
||||
[connection signal="pressed" from="PanelContainer/Content/HBoxContainer/VBoxContainer/HBoxContainer/TowerButton" to="." method="choose_side" binds= [true]]
|
||||
[connection signal="pressed" from="PanelContainer/Content/HBoxContainer/VBoxContainer/HBoxContainer/WeaponButton" to="." method="choose_side" binds= [false]]
|
||||
[connection signal="pressed" from="PanelContainer/Content/HBoxContainer/VBoxContainer/ConfirmButton" to="." method="_on_confirm_button_pressed"]
|
||||
49
ui/menus/WaveViewer/wave_viewer.gd
Normal file
49
ui/menus/WaveViewer/wave_viewer.gd
Normal file
@@ -0,0 +1,49 @@
|
||||
class_name WaveViewer
|
||||
extends Control
|
||||
|
||||
signal closed()
|
||||
|
||||
@export var wave_vbox: VBoxContainer
|
||||
@export var enemy_row_scene: PackedScene
|
||||
@export var enemy_icon_tex: TextureRect
|
||||
@export var enemy_name_label: Label
|
||||
@export var enemy_desc_label: RichTextLabel
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("Pause") or event.is_action_pressed("Show Wave Preview"):
|
||||
queue_free()
|
||||
closed.emit()
|
||||
get_viewport().set_input_as_handled()
|
||||
|
||||
|
||||
func set_waves(waves: Array[WaveConfig], starting_wave_number: int) -> void:
|
||||
var i: int = starting_wave_number
|
||||
for wave: WaveConfig in waves:
|
||||
var enemy_row: EnemyRow = enemy_row_scene.instantiate() as EnemyRow
|
||||
enemy_row.enemy_clicked.connect(set_enemy_desc)
|
||||
wave_vbox.add_child(enemy_row)
|
||||
enemy_row.set_wave(i)
|
||||
i += 1
|
||||
|
||||
var enemy_dict: Dictionary[Enemy, int] = {}
|
||||
|
||||
for enemy_group: EnemyGroup in wave.enemy_groups:
|
||||
if !enemy_dict.has(enemy_group.enemy):
|
||||
enemy_dict[enemy_group.enemy] = 0
|
||||
enemy_dict[enemy_group.enemy] += enemy_group.count
|
||||
|
||||
for enemy: Enemy in enemy_dict.keys():
|
||||
enemy_row.add_enemy_tag(enemy, enemy_dict[enemy])
|
||||
set_enemy_desc(waves[0].enemy_groups.keys()[0].enemy)
|
||||
|
||||
|
||||
func set_enemy_desc(enemy: Enemy) -> void:
|
||||
enemy_name_label.text = tr(enemy.title)
|
||||
enemy_icon_tex.texture = enemy.icon
|
||||
enemy_desc_label.text = tr(enemy.description)
|
||||
|
||||
|
||||
func _on_button_2_pressed() -> void:
|
||||
closed.emit()
|
||||
queue_free()
|
||||
1
ui/menus/WaveViewer/wave_viewer.gd.uid
Normal file
1
ui/menus/WaveViewer/wave_viewer.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ps6sgjd0b5qr
|
||||
89
ui/menus/WaveViewer/wave_viewer.tscn
Normal file
89
ui/menus/WaveViewer/wave_viewer.tscn
Normal file
@@ -0,0 +1,89 @@
|
||||
[gd_scene format=3 uid="uid://ct6gic4shy5qw"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ps6sgjd0b5qr" path="res://ui/menus/WaveViewer/wave_viewer.gd" id="1_0v4fq"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5hp43bm07b8a" path="res://ui/menus/GameEndScreen/enemy_row.tscn" id="2_lbx3o"]
|
||||
[ext_resource type="Texture2D" uid="uid://3ywtwfpuuknr" path="res://assets/textures/leapfrog.png" id="2_tptaq"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_0v4fq"]
|
||||
content_margin_left = 2.0
|
||||
content_margin_top = 2.0
|
||||
content_margin_right = 2.0
|
||||
content_margin_bottom = 2.0
|
||||
|
||||
[node name="WaveViewer" type="Control" unique_id=499270441 node_paths=PackedStringArray("wave_vbox", "enemy_icon_tex", "enemy_name_label", "enemy_desc_label")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_0v4fq")
|
||||
wave_vbox = NodePath("PanelContainer/VBoxContainer/HBoxContainer/ScrollContainer/Waves")
|
||||
enemy_row_scene = ExtResource("2_lbx3o")
|
||||
enemy_icon_tex = NodePath("PanelContainer/VBoxContainer/HBoxContainer/EnemyDescription/TextureRect")
|
||||
enemy_name_label = NodePath("PanelContainer/VBoxContainer/HBoxContainer/EnemyDescription/Label")
|
||||
enemy_desc_label = NodePath("PanelContainer/VBoxContainer/HBoxContainer/EnemyDescription/RichTextLabel")
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=788649331]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.05
|
||||
anchor_top = 0.05
|
||||
anchor_right = 0.95
|
||||
anchor_bottom = 0.95
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer" unique_id=579941125]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer" unique_id=402227846]
|
||||
layout_mode = 2
|
||||
text = "TITLE_WAVE_VIEWER"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer" unique_id=1508928028]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="PanelContainer/VBoxContainer/HBoxContainer" unique_id=719335415]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 2.0
|
||||
|
||||
[node name="Waves" type="VBoxContainer" parent="PanelContainer/VBoxContainer/HBoxContainer/ScrollContainer" unique_id=1502502154]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="EnemyDescription" type="VBoxContainer" parent="PanelContainer/VBoxContainer/HBoxContainer" unique_id=2098653550]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HBoxContainer/EnemyDescription" unique_id=2117809796]
|
||||
layout_mode = 2
|
||||
text = "Big dawg"
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/HBoxContainer/EnemyDescription" unique_id=1623597859]
|
||||
custom_minimum_size = Vector2(64, 64)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2_tptaq")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="PanelContainer/VBoxContainer/HBoxContainer/EnemyDescription" unique_id=975689037]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_styles/normal = SubResource("StyleBoxEmpty_0v4fq")
|
||||
text = "this dawg is so big itll make your big meaty nuts fall off from how fucking scared you are. this dog will rip your balls off. this dog will make you cum on yourself. you'll be so scared you'll cum on yourself. and horny"
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="PanelContainer/VBoxContainer" unique_id=1208475978]
|
||||
layout_mode = 2
|
||||
alignment = 2
|
||||
|
||||
[node name="Button2" type="Button" parent="PanelContainer/VBoxContainer/HBoxContainer2" unique_id=1478517318]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_CLOSE"
|
||||
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainer2/Button2" to="." method="_on_button_2_pressed"]
|
||||
Reference in New Issue
Block a user