initial commit

This commit is contained in:
2024-04-02 23:33:30 +11:00
commit 5f9db2d250
93 changed files with 2282 additions and 0 deletions

View File

@ -0,0 +1,39 @@
extends PanelContainer
@export var profile_name: LineEdit
@export var enter_button: TextureButton
var save: SaveFile
func _ready() -> void:
save = SaveFile.load_profile_from_disk()
if save.catfish_name:
profile_name.text = save.catfish_name
enter_button.visible = true
func _on_texture_button_pressed() -> void:
get_tree().quit()
func load_game() -> void:
if profile_name.text.length() > 0:
save.catfish_name = profile_name.text
save.save_to_disk()
get_tree().change_scene_to_file("res://Quinnsoft94/desktop.tscn")
func _on_line_edit_text_submitted(new_text: String) -> void:
load_game()
func _on_line_edit_text_changed(new_text: String) -> void:
if new_text.length() > 0:
enter_button.visible = true
else:
enter_button.visible = false
func _on_enter_button_pressed() -> void:
load_game()

View File

@ -0,0 +1,176 @@
[gd_scene load_steps=16 format=3 uid="uid://ig66qdnq62p0"]
[ext_resource type="Texture2D" uid="uid://c80yh0lidbpn0" path="res://Assets/OffButton/off_button.png" id="1_s7hhf"]
[ext_resource type="Script" path="res://Menus/MainMenu/main_menu.gd" id="1_xav2y"]
[ext_resource type="Texture2D" uid="uid://c26qgf2pbob32" path="res://Assets/OffButton/off_button_pushed.png" id="2_5troo"]
[ext_resource type="Texture2D" uid="uid://8m458cpunhg6" path="res://Assets/logo.png" id="2_ks1kr"]
[ext_resource type="Texture2D" uid="uid://d324adwo1gdj2" path="res://Assets/OffButton/off_button_hover.png" id="3_78wfw"]
[ext_resource type="Texture2D" uid="uid://tui0tcoga17s" path="res://Assets/line.png" id="3_fyi56"]
[ext_resource type="Texture2D" uid="uid://06lxb843ndgp" path="res://Assets/ocean_bg.png" id="4_fob30"]
[ext_resource type="Texture2D" uid="uid://co5knl5f3lui3" path="res://Assets/catfish.png" id="5_lh7pm"]
[ext_resource type="Texture2D" uid="uid://clfbenn5fu1la" path="res://Assets/EnterButton/enter.png" id="6_0i1jn"]
[ext_resource type="Texture2D" uid="uid://bpq6b6sctivo5" path="res://Assets/EnterButton/enter_pushed.png" id="7_ggmnc"]
[ext_resource type="Texture2D" uid="uid://tlq6dn0rco4g" path="res://Assets/EnterButton/enter_hover.png" id="8_6a0ri"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rxxt7"]
bg_color = Color(0.129412, 0.196078, 0.65098, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_143si"]
bg_color = Color(0.352941, 0.494118, 0.862745, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5sn22"]
bg_color = Color(0.180392, 0.337255, 0.721569, 1)
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ha25n"]
[node name="MainMenu" type="PanelContainer" node_paths=PackedStringArray("profile_name", "enter_button")]
texture_filter = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_rxxt7")
script = ExtResource("1_xav2y")
profile_name = NodePath("VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer/MarginContainer/HBoxContainer/LineEdit")
enter_button = NodePath("VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer/MarginContainer/HBoxContainer/TextureButton")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
size_flags_stretch_ratio = 4.66
theme_override_constants/margin_top = 110
[node name="Content" type="PanelContainer" parent="VBoxContainer/MarginContainer"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_143si")
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/MarginContainer/Content"]
layout_mode = 2
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer/MarginContainer/Content/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_right = 32
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer2"]
layout_mode = 2
size_flags_horizontal = 3
alignment = 1
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer2/VBoxContainer"]
texture_filter = 1
custom_minimum_size = Vector2(256, 256)
layout_mode = 2
size_flags_horizontal = 8
texture = ExtResource("2_ks1kr")
stretch_mode = 5
[node name="Label" type="Label" parent="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer2/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "To begin, type your username"
horizontal_alignment = 2
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/MarginContainer/Content/HBoxContainer"]
texture_filter = 1
layout_mode = 2
texture = ExtResource("3_fyi56")
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/MarginContainer/Content/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 32
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer"]
layout_mode = 2
size_flags_horizontal = 2
size_flags_vertical = 4
theme_override_styles/panel = SubResource("StyleBoxFlat_5sn22")
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer/MarginContainer"]
layout_mode = 2
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer/MarginContainer/HBoxContainer"]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture = ExtResource("4_fob30")
stretch_mode = 5
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer/MarginContainer/HBoxContainer/TextureRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("5_lh7pm")
[node name="LineEdit" type="LineEdit" parent="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
expand_to_text_length = true
[node name="TextureButton" type="TextureButton" parent="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer/MarginContainer/HBoxContainer"]
visible = false
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture_normal = ExtResource("6_0i1jn")
texture_pressed = ExtResource("7_ggmnc")
texture_hover = ExtResource("8_6a0ri")
stretch_mode = 5
[node name="Footer" type="PanelContainer" parent="VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxEmpty_ha25n")
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/Footer"]
layout_mode = 2
size_flags_vertical = 0
theme_override_constants/margin_top = 16
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Footer/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 430
alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Footer/MarginContainer/HBoxContainer"]
layout_mode = 2
[node name="TextureButton" type="TextureButton" parent="VBoxContainer/Footer/MarginContainer/HBoxContainer/HBoxContainer"]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture_normal = ExtResource("1_s7hhf")
texture_pressed = ExtResource("2_5troo")
texture_hover = ExtResource("3_78wfw")
stretch_mode = 5
[node name="Label" type="Label" parent="VBoxContainer/Footer/MarginContainer/HBoxContainer/HBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = " Turn off computer"
[node name="Label" type="Label" parent="VBoxContainer/Footer/MarginContainer/HBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 18
text = "After you log on, you cannot add or change accounts.
Just go play something else because I didn't put effort into this"
[connection signal="text_changed" from="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer/MarginContainer/HBoxContainer/LineEdit" to="." method="_on_line_edit_text_changed"]
[connection signal="text_submitted" from="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer/MarginContainer/HBoxContainer/LineEdit" to="." method="_on_line_edit_text_submitted"]
[connection signal="pressed" from="VBoxContainer/MarginContainer/Content/HBoxContainer/MarginContainer/PanelContainer/MarginContainer/HBoxContainer/TextureButton" to="." method="_on_enter_button_pressed"]
[connection signal="pressed" from="VBoxContainer/Footer/MarginContainer/HBoxContainer/HBoxContainer/TextureButton" to="." method="_on_texture_button_pressed"]

View File

@ -0,0 +1,17 @@
class_name MessagePreview extends MarginContainer
signal open_message()
@export var pfp: TextureRect
@export var fish_name_label: Label
@export var message_label: Label
func setup(profile: FishProfile, message: String):
pfp.texture = profile.picture
fish_name_label.text = profile.fish_name
message_label.text = message
func _on_button_pressed() -> void:
open_message.emit()

View File

@ -0,0 +1,87 @@
[gd_scene load_steps=5 format=3 uid="uid://co43b1v8r5md5"]
[ext_resource type="Script" path="res://Menus/Messages/message_preview.gd" id="1_7tq4e"]
[ext_resource type="StyleBox" uid="uid://bhwii0745mi6s" path="res://Assets/darkpanel.tres" id="2_ig7jg"]
[ext_resource type="Texture2D" uid="uid://06lxb843ndgp" path="res://Assets/ocean_bg.png" id="3_2mx8o"]
[ext_resource type="Texture2D" uid="uid://ct3mqh62m2c36" path="res://Fish/Goldfish/goldfish.png" id="4_7xgia"]
[node name="MarginContainer" type="MarginContainer" node_paths=PackedStringArray("pfp", "fish_name_label", "message_label")]
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 96.0
grow_horizontal = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
script = ExtResource("1_7tq4e")
pfp = NodePath("Button/PanelContainer/MarginContainer/Control/TextureRect/TextureRect")
fish_name_label = NodePath("Button/PanelContainer/MarginContainer/Control/MarginContainer/VBoxContainer/Name")
message_label = NodePath("Button/PanelContainer/MarginContainer/Control/MarginContainer/VBoxContainer/Message")
[node name="Button" type="Button" parent="."]
custom_minimum_size = Vector2(0, 84)
layout_mode = 2
flat = true
[node name="PanelContainer" type="PanelContainer" parent="Button"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme_override_styles/panel = ExtResource("2_ig7jg")
[node name="MarginContainer" type="MarginContainer" parent="Button/PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
[node name="Control" type="HBoxContainer" parent="Button/PanelContainer/MarginContainer"]
layout_mode = 2
[node name="TextureRect" type="TextureRect" parent="Button/PanelContainer/MarginContainer/Control"]
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture = ExtResource("3_2mx8o")
expand_mode = 1
stretch_mode = 5
[node name="TextureRect" type="TextureRect" parent="Button/PanelContainer/MarginContainer/Control/TextureRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("4_7xgia")
stretch_mode = 5
[node name="MarginContainer" type="MarginContainer" parent="Button/PanelContainer/MarginContainer/Control"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 4
[node name="VBoxContainer" type="VBoxContainer" parent="Button/PanelContainer/MarginContainer/Control/MarginContainer"]
layout_mode = 2
[node name="Name" type="Label" parent="Button/PanelContainer/MarginContainer/Control/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 2
theme_override_font_sizes/font_size = 24
text = "GOLDY"
[node name="Message" type="Label" parent="Button/PanelContainer/MarginContainer/Control/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 16
text = "message preview"
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]

View File

@ -0,0 +1,10 @@
class_name MessageMenu extends ScrollContainer
@export var message_preview_scene: PackedScene
@export var vbox: VBoxContainer
var save: SaveFile
func _ready() -> void:
var message = message_preview_scene.instantiate() as MessagePreview
vbox.add_child(message)

View File

@ -0,0 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://db0bwtrlmfxbj"]
[ext_resource type="Script" path="res://Menus/Messages/messages_menu.gd" id="1_x4naa"]
[ext_resource type="PackedScene" uid="uid://co43b1v8r5md5" path="res://Menus/Messages/message_preview.tscn" id="2_ja6w2"]
[node name="Control" type="ScrollContainer" node_paths=PackedStringArray("vbox")]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
horizontal_scroll_mode = 0
script = ExtResource("1_x4naa")
message_preview_scene = ExtResource("2_ja6w2")
vbox = NodePath("VBoxContainer")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3

View File

@ -0,0 +1,124 @@
[gd_scene load_steps=19 format=3 uid="uid://wa62w2wb4pmr"]
[ext_resource type="Script" path="res://Menus/PlentifulFish/application.gd" id="1_yl22y"]
[ext_resource type="PackedScene" uid="uid://dge7ymn0yd7ry" path="res://Menus/Swipe/fish_card.tscn" id="2_uajjj"]
[ext_resource type="PackedScene" uid="uid://db0bwtrlmfxbj" path="res://Menus/Messages/messages_menu.tscn" id="3_42fn6"]
[ext_resource type="Resource" uid="uid://b7cyooj5na7ur" path="res://Fish/LeafySeaDragon/leafy_seadragon.tres" id="4_tkrdy"]
[ext_resource type="Resource" uid="uid://co03mjgi5q1xh" path="res://Fish/Goldfish/goldfish.tres" id="5_g7gvi"]
[ext_resource type="Resource" uid="uid://dun2uls53mmbq" path="res://Fish/Fishball/fishball.tres" id="6_6w8p5"]
[ext_resource type="Texture2D" uid="uid://06lxb843ndgp" path="res://Assets/ocean_bg.png" id="7_o2jv7"]
[ext_resource type="Texture2D" uid="uid://co5knl5f3lui3" path="res://Assets/catfish.png" id="8_7dnbn"]
[ext_resource type="StyleBox" uid="uid://bhwii0745mi6s" path="res://Assets/darkpanel.tres" id="9_d6aw3"]
[ext_resource type="Texture2D" uid="uid://csowwaiokaooa" path="res://Assets/fish_icon.png" id="10_jb5xi"]
[ext_resource type="Texture2D" uid="uid://cs3lmgnyy4xm5" path="res://Assets/fish_icon_invert.png" id="11_b8gwu"]
[ext_resource type="Texture2D" uid="uid://cm3wtlnnd1msu" path="res://Assets/message_icon.png" id="12_yhvua"]
[ext_resource type="Texture2D" uid="uid://40ri77fo6brh" path="res://Assets/message_icon_invert.png" id="13_yi281"]
[ext_resource type="Texture2D" uid="uid://con12semgp0f5" path="res://Assets/profile_icon.png" id="14_s36ga"]
[ext_resource type="Texture2D" uid="uid://c8sfk17x7ahgw" path="res://Assets/profile_icon_invert.png" id="15_t23q2"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_th770"]
bg_color = Color(0.768627, 0.533333, 0.458824, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a7vhj"]
bg_color = Color(0.611765, 0.392157, 0.321569, 1)
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_hehe3"]
[node name="PoF" type="PanelContainer" node_paths=PackedStringArray("player_name_text", "contents_page")]
custom_minimum_size = Vector2(600, 680)
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -300.0
offset_right = 300.0
offset_bottom = 400.0
grow_horizontal = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_th770")
script = ExtResource("1_yl22y")
player_name_text = NodePath("VBoxContainer/Header/HBoxContainer/PlayerName")
fish_card_scene = ExtResource("2_uajjj")
messages_scene = ExtResource("3_42fn6")
fish_profiles = Array[Resource("res://Resources/fish_profile.gd")]([ExtResource("4_tkrdy"), ExtResource("5_g7gvi"), ExtResource("6_6w8p5")])
contents_page = NodePath("VBoxContainer/Content")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
[node name="Header" type="PanelContainer" parent="VBoxContainer"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_a7vhj")
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Header"]
layout_mode = 2
alignment = 1
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Header/HBoxContainer"]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture = ExtResource("7_o2jv7")
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Header/HBoxContainer/TextureRect"]
texture_filter = 1
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("8_7dnbn")
[node name="PlayerName" type="Label" parent="VBoxContainer/Header/HBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 36
text = "cool name"
vertical_alignment = 1
[node name="Content" type="PanelContainer" parent="VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxEmpty_hehe3")
[node name="Footer" type="PanelContainer" parent="VBoxContainer"]
layout_mode = 2
theme_override_styles/panel = ExtResource("9_d6aw3")
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Footer"]
layout_mode = 2
alignment = 1
[node name="Fish" type="TextureButton" parent="VBoxContainer/Footer/HBoxContainer"]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture_normal = ExtResource("10_jb5xi")
texture_pressed = ExtResource("10_jb5xi")
texture_hover = ExtResource("11_b8gwu")
stretch_mode = 5
[node name="Messages" type="TextureButton" parent="VBoxContainer/Footer/HBoxContainer"]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture_normal = ExtResource("12_yhvua")
texture_pressed = ExtResource("12_yhvua")
texture_hover = ExtResource("13_yi281")
stretch_mode = 5
[node name="Profile" type="TextureButton" parent="VBoxContainer/Footer/HBoxContainer"]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture_normal = ExtResource("14_s36ga")
texture_pressed = ExtResource("14_s36ga")
texture_hover = ExtResource("15_t23q2")
stretch_mode = 5
[node name="Timer" type="Timer" parent="."]
wait_time = 15.0
one_shot = true
[connection signal="pressed" from="VBoxContainer/Footer/HBoxContainer/Fish" to="." method="_on_fish_pressed"]
[connection signal="pressed" from="VBoxContainer/Footer/HBoxContainer/Messages" to="." method="_on_messages_pressed"]
[connection signal="pressed" from="VBoxContainer/Footer/HBoxContainer/Profile" to="." method="_on_profile_pressed"]
[connection signal="timeout" from="Timer" to="." method="recycle_profiles"]

View File

@ -0,0 +1,69 @@
class_name Application extends PanelContainer
@export var application_name: String = "Plentiful Fish"
@export var player_name_text: Label
@export var fish_card_scene: PackedScene
@export var messages_scene: PackedScene
@export var fish_profiles: Array[FishProfile]
@export var discarded_fish_profiles: Array[FishProfile]
@export var contents_page: Control
var has_current_fish: bool = false
var save_file: SaveFile
var current_card: int = 0
var window: DEWindow
func setup_window_integration():
pass
func _ready() -> void:
player_name_text.text = save_file.catfish_name
_on_fish_pressed()
func load_profile() -> void:
if has_current_fish or fish_profiles.size() <= current_card:
return
var fish_card = fish_card_scene.instantiate() as FishCard
fish_card.set_display(fish_profiles[current_card])
fish_card.swiped.connect(process_fish_profile.bind(fish_card))
contents_page.add_child(fish_card)
has_current_fish = true
func process_fish_profile(outcome: bool, card: FishCard):
current_card += 1
has_current_fish = false
if outcome:
save_file.accepted_fish.append(card.profile)
else:
discarded_fish_profiles.append(card.profile)
if discarded_fish_profiles.size() > 0 and current_card >= fish_profiles.size():
$Timer.start()
load_profile()
func recycle_profiles() -> void:
fish_profiles = discarded_fish_profiles
current_card = 0
func _on_fish_pressed() -> void:
for node: Node in contents_page.get_children():
node.queue_free()
load_profile()
func _on_messages_pressed() -> void:
has_current_fish = false
for node: Node in contents_page.get_children():
node.queue_free()
var messages: MessageMenu = messages_scene.instantiate() as MessageMenu
contents_page.add_child(messages)
func _on_profile_pressed() -> void:
has_current_fish = false
for node: Node in contents_page.get_children():
node.queue_free()

33
Menus/Swipe/fish_card.gd Normal file
View File

@ -0,0 +1,33 @@
class_name FishCard extends PanelContainer
signal swiped(outcome: bool)
var profile: FishProfile
@export var pfp_display: TextureRect
@export var fish_label: Label
func set_display(new_profile: FishProfile):
profile = new_profile
pfp_display.texture = profile.picture
fish_label.text = profile.fish_name
func _on_no_pressed() -> void:
var tween = create_tween()
tween.set_ease(Tween.EASE_OUT)
tween.set_trans(Tween.TRANS_CUBIC)
var dest: Vector2 = position + Vector2(-600, 0)
tween.tween_property(self, "position", dest, 0.6)
tween.tween_callback(func(): swiped.emit(false))
tween.tween_callback(queue_free)
func _on_yes_pressed() -> void:
var tween = create_tween()
tween.set_ease(Tween.EASE_OUT)
tween.set_trans(Tween.TRANS_CUBIC)
var dest: Vector2 = position + Vector2(600, 0)
tween.tween_property(self, "position", dest, 0.6)
tween.tween_callback(func(): swiped.emit(true))
tween.tween_callback(queue_free)

View File

@ -0,0 +1,86 @@
[gd_scene load_steps=9 format=3 uid="uid://dge7ymn0yd7ry"]
[ext_resource type="StyleBox" uid="uid://bhwii0745mi6s" path="res://Assets/darkpanel.tres" id="1_bo5ug"]
[ext_resource type="Script" path="res://Menus/Swipe/fish_card.gd" id="1_icnll"]
[ext_resource type="Texture2D" uid="uid://06lxb843ndgp" path="res://Assets/ocean_bg.png" id="1_up35p"]
[ext_resource type="Texture2D" uid="uid://cgpihcsrl4ejg" path="res://Fish/LeafySeaDragon/leafy_seadragon.png" id="2_coegx"]
[ext_resource type="Texture2D" uid="uid://cxw2anmc6julg" path="res://Assets/no.png" id="3_8ybbb"]
[ext_resource type="Texture2D" uid="uid://4id2ggp6enln" path="res://Assets/yes.png" id="4_uby25"]
[ext_resource type="Texture2D" uid="uid://cd4gpc06w68od" path="res://Assets/no_invert.png" id="5_5hf51"]
[ext_resource type="Texture2D" uid="uid://diwd4au18e2r1" path="res://Assets/yes_invert.png" id="7_v6le4"]
[node name="FishCard" type="PanelContainer" node_paths=PackedStringArray("pfp_display", "fish_label")]
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -128.0
offset_right = 128.0
offset_bottom = 539.0
grow_horizontal = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme_override_styles/panel = ExtResource("1_bo5ug")
script = ExtResource("1_icnll")
pfp_display = NodePath("Control/VBoxContainer/TextureRect/TextureRect")
fish_label = NodePath("Control/VBoxContainer/Label")
[node name="Control" type="MarginContainer" parent="."]
layout_mode = 2
theme_override_constants/margin_left = 32
theme_override_constants/margin_top = 16
theme_override_constants/margin_right = 32
theme_override_constants/margin_bottom = 16
[node name="VBoxContainer" type="VBoxContainer" parent="Control"]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="Control/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 48
text = "FISH NAME"
horizontal_alignment = 1
vertical_alignment = 1
[node name="TextureRect" type="TextureRect" parent="Control/VBoxContainer"]
texture_filter = 1
custom_minimum_size = Vector2(0, 300)
layout_mode = 2
texture = ExtResource("1_up35p")
stretch_mode = 5
[node name="TextureRect" type="TextureRect" parent="Control/VBoxContainer/TextureRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_coegx")
stretch_mode = 5
[node name="HBoxContainer" type="HBoxContainer" parent="Control/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 32
alignment = 1
[node name="NO" type="TextureButton" parent="Control/VBoxContainer/HBoxContainer"]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture_normal = ExtResource("3_8ybbb")
texture_pressed = ExtResource("3_8ybbb")
texture_hover = ExtResource("5_5hf51")
stretch_mode = 5
[node name="YES" type="TextureButton" parent="Control/VBoxContainer/HBoxContainer"]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
texture_normal = ExtResource("4_uby25")
texture_pressed = ExtResource("4_uby25")
texture_hover = ExtResource("7_v6le4")
stretch_mode = 5
[connection signal="pressed" from="Control/VBoxContainer/HBoxContainer/NO" to="." method="_on_no_pressed"]
[connection signal="pressed" from="Control/VBoxContainer/HBoxContainer/YES" to="." method="_on_yes_pressed"]