fixes extra typos and lost references
This commit is contained in:
49
ui/menus/wave_viewer/wave_viewer.gd
Normal file
49
ui/menus/wave_viewer/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/wave_viewer/wave_viewer.gd.uid
Normal file
1
ui/menus/wave_viewer/wave_viewer.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ps6sgjd0b5qr
|
||||
89
ui/menus/wave_viewer/wave_viewer.tscn
Normal file
89
ui/menus/wave_viewer/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/wave_viewer/wave_viewer.gd" id="1_0v4fq"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5hp43bm07b8a" path="res://ui/menus/game_end_screen/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