It's Cow Game! Version 2.04!
This commit is contained in:
commit
a9e1ed9ddd
3148 changed files with 95332 additions and 0 deletions
25
UI/MainMenu/DeleteSaveButton.gd
Normal file
25
UI/MainMenu/DeleteSaveButton.gd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
extends PanelContainer
|
||||
|
||||
signal clicked
|
||||
|
||||
var hovered = false
|
||||
var clickDown = false
|
||||
|
||||
func _ready():
|
||||
self_modulate = Color("d57c81")
|
||||
|
||||
func _on_mouse_entered():
|
||||
self_modulate = Color("c31525")
|
||||
hovered = true
|
||||
|
||||
func _on_mouse_exited():
|
||||
self_modulate = Color("d57c81")
|
||||
hovered = false
|
||||
clickDown = false
|
||||
|
||||
func _on_gui_input(event):
|
||||
if hovered and event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
clickDown = true
|
||||
if hovered and event is InputEventMouseButton and event.is_released() and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
if clickDown:
|
||||
clicked.emit()
|
||||
29
UI/MainMenu/DeleteSaveButton.tscn
Normal file
29
UI/MainMenu/DeleteSaveButton.tscn
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://b0ve5u00l8u0x"]
|
||||
|
||||
[ext_resource type="Script" path="res://UI/MainMenu/DeleteSaveButton.gd" id="1_c60iu"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o0chg"]
|
||||
bg_color = Color(1, 1, 1, 1)
|
||||
border_width_left = 6
|
||||
border_width_top = 6
|
||||
border_width_right = 6
|
||||
border_width_bottom = 6
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="DeleteSaveButton" type="PanelContainer"]
|
||||
custom_minimum_size = Vector2(80, 80)
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_o0chg")
|
||||
script = ExtResource("1_c60iu")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/line_spacing = 0
|
||||
theme_override_font_sizes/font_size = 49
|
||||
text = "X"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
|
||||
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
|
||||
50
UI/MainMenu/MainMenu.gd
Normal file
50
UI/MainMenu/MainMenu.gd
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
var currentTotalVol = SaveManager.get_global_value("totalVol", 0.5)
|
||||
SaveManager.set_global_value("totalVol", currentTotalVol)
|
||||
AudioServer.set_bus_volume_db(0, linear_to_db(currentTotalVol))
|
||||
|
||||
var savedMusicVol = SaveManager.get_global_value("musicVol", 1)
|
||||
AudioServer.set_bus_volume_db(1, linear_to_db(savedMusicVol))
|
||||
|
||||
var savedSFXVol = SaveManager.get_global_value("sfxVol", 1)
|
||||
AudioServer.set_bus_volume_db(2, linear_to_db(savedSFXVol))
|
||||
|
||||
if currentTotalVol > 0:
|
||||
%MuteButton.text = "Mute"
|
||||
else:
|
||||
%MuteButton.text = "Unmute"
|
||||
|
||||
SoundManager.play_menu_music()
|
||||
|
||||
func _on_enter_button_pressed():
|
||||
%SaveMenu.visible = true
|
||||
%InitialMenu.visible = false
|
||||
|
||||
%SavesDisplayer.update_save_displays()
|
||||
%SavesDisplayer.hide_delete_buttons()
|
||||
|
||||
func _on_save_back_button_pressed():
|
||||
%SaveMenu.visible = false
|
||||
%InitialMenu.visible = true
|
||||
|
||||
func _on_mute_button_pressed():
|
||||
var currentTotalVol = SaveManager.get_global_value("totalVol", 0.5)
|
||||
if currentTotalVol > 0:
|
||||
currentTotalVol = 0
|
||||
%MuteButton.text = "Unmute"
|
||||
else:
|
||||
currentTotalVol = 0.5
|
||||
%MuteButton.text = "Mute"
|
||||
SaveManager.set_global_value("totalVol", currentTotalVol)
|
||||
AudioServer.set_bus_volume_db(0, linear_to_db(currentTotalVol))
|
||||
|
||||
func _on_quit_button_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
func _on_discord_button_pressed():
|
||||
OS.shell_open("http://discord.gg/XC8sy7kCx2")
|
||||
|
||||
func _on_twitch_button_pressed():
|
||||
OS.shell_open("https://www.twitch.tv/pajamabee_vegan")
|
||||
248
UI/MainMenu/MainMenu.tscn
Normal file
248
UI/MainMenu/MainMenu.tscn
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
[gd_scene load_steps=22 format=3 uid="uid://dxpplnrcsyjgh"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ba25fbsflxkft" path="res://Skills/Arson/FireAnim/Fire1.png" id="1_4ocpc"]
|
||||
[ext_resource type="Script" path="res://UI/MainMenu/MainMenu.gd" id="1_h8q4o"]
|
||||
[ext_resource type="Texture2D" uid="uid://bltlvad5kdk1y" path="res://Objects/Faire/FerrisWheel/Horizon.png" id="2_5fnse"]
|
||||
[ext_resource type="Texture2D" uid="uid://dufwp4sp2kyuv" path="res://Skills/Arson/FireAnim/Fire2.png" id="2_85awq"]
|
||||
[ext_resource type="Texture2D" uid="uid://b6a4awj22skbe" path="res://Skills/Arson/FireAnim/Fire3.png" id="3_caxwe"]
|
||||
[ext_resource type="Script" path="res://Utils/PlayOnReady.gd" id="4_4a6ua"]
|
||||
[ext_resource type="Texture2D" uid="uid://bryqti0obuaqw" path="res://Player/cow.png" id="5_uyk2m"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnmjxip5nsvj5" path="res://NPCs/Pigeon/Lesbian/lesbianpigeon1.png" id="8_r6286"]
|
||||
[ext_resource type="Texture2D" uid="uid://bdp7fi33vu04n" path="res://NPCs/Pigeon/Genderfluid/genderfluidpigeon1.png" id="9_uqwjt"]
|
||||
[ext_resource type="Texture2D" uid="uid://dhccv6ii4x7g4" path="res://NPCs/Pigeon/Ace/acepigeon1.png" id="10_6goq3"]
|
||||
[ext_resource type="PackedScene" uid="uid://yxsmdsi4wcym" path="res://UI/MainMenu/SavesDisplayer.tscn" id="11_6gsgq"]
|
||||
[ext_resource type="Theme" uid="uid://cbrsouaob5adl" path="res://UI/MainMenu/MainMenuButton.tres" id="11_ot6u3"]
|
||||
[ext_resource type="Texture2D" uid="uid://1dt3kxxhyfmx" path="res://UI/MainMenu/SocialButtons/DiscordButton.png" id="13_1b52j"]
|
||||
[ext_resource type="Texture2D" uid="uid://ddod3bdf7vyan" path="res://UI/MainMenu/SocialButtons/DiscordButtonHover.png" id="14_gec61"]
|
||||
[ext_resource type="Texture2D" uid="uid://ds4bybu0xidnf" path="res://UI/MainMenu/SocialButtons/TwitchButton.png" id="15_r27uj"]
|
||||
[ext_resource type="Texture2D" uid="uid://c28qbcevfclyf" path="res://UI/MainMenu/SocialButtons/TwitchButtonHover.png" id="16_ivwbn"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_ib660"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_4ocpc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_85awq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_caxwe")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l5y6w"]
|
||||
bg_color = Color(0.666667, 0.337255, 0.690196, 1)
|
||||
border_width_left = 8
|
||||
border_width_top = 8
|
||||
border_width_right = 8
|
||||
border_width_bottom = 8
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 8
|
||||
corner_radius_bottom_right = 8
|
||||
corner_radius_bottom_left = 8
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_syxs1"]
|
||||
bg_color = Color(0.74902, 0.427451, 0.772549, 1)
|
||||
border_width_left = 8
|
||||
border_width_top = 8
|
||||
border_width_right = 8
|
||||
border_width_bottom = 8
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 8
|
||||
corner_radius_bottom_right = 8
|
||||
corner_radius_bottom_left = 8
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tp0n4"]
|
||||
bg_color = Color(0.729412, 0.270588, 0.654902, 1)
|
||||
border_width_left = 8
|
||||
border_width_top = 8
|
||||
border_width_right = 8
|
||||
border_width_bottom = 8
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 8
|
||||
corner_radius_bottom_right = 8
|
||||
corner_radius_bottom_left = 8
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1vxv3"]
|
||||
bg_color = Color(0.760784, 0.552941, 0.776471, 1)
|
||||
border_width_left = 8
|
||||
border_width_top = 8
|
||||
border_width_right = 8
|
||||
border_width_bottom = 8
|
||||
border_color = Color(0.392157, 0.392157, 0.392157, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 8
|
||||
corner_radius_bottom_right = 8
|
||||
corner_radius_bottom_left = 8
|
||||
|
||||
[node name="MainMenu" type="Node2D"]
|
||||
script = ExtResource("1_h8q4o")
|
||||
|
||||
[node name="Decorations" type="Node2D" parent="."]
|
||||
|
||||
[node name="Horizon" type="Sprite2D" parent="Decorations"]
|
||||
position = Vector2(445, 368)
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = ExtResource("2_5fnse")
|
||||
|
||||
[node name="Fire" type="AnimatedSprite2D" parent="Decorations"]
|
||||
position = Vector2(328, 550)
|
||||
scale = Vector2(2.98889, 2.95556)
|
||||
sprite_frames = SubResource("SpriteFrames_ib660")
|
||||
script = ExtResource("4_4a6ua")
|
||||
|
||||
[node name="Fire2" type="AnimatedSprite2D" parent="Decorations"]
|
||||
visible = false
|
||||
position = Vector2(160, 464)
|
||||
scale = Vector2(2.98889, 2.95556)
|
||||
sprite_frames = SubResource("SpriteFrames_ib660")
|
||||
script = ExtResource("4_4a6ua")
|
||||
|
||||
[node name="Cow" type="Sprite2D" parent="Decorations"]
|
||||
position = Vector2(691, 568)
|
||||
rotation = 0.106465
|
||||
scale = Vector2(2.69309, 2.5642)
|
||||
texture = ExtResource("5_uyk2m")
|
||||
|
||||
[node name="Lesbianpigeon2" type="Sprite2D" parent="Decorations"]
|
||||
position = Vector2(764.25, 503.25)
|
||||
scale = Vector2(1.695, 1.543)
|
||||
texture = ExtResource("8_r6286")
|
||||
|
||||
[node name="Genderfluidpigeon1" type="Sprite2D" parent="Decorations"]
|
||||
position = Vector2(66, 578)
|
||||
texture = ExtResource("9_uqwjt")
|
||||
flip_h = true
|
||||
|
||||
[node name="Progresspigeon1" type="Sprite2D" parent="Decorations"]
|
||||
position = Vector2(497, 580)
|
||||
texture = ExtResource("10_6goq3")
|
||||
|
||||
[node name="TitleLabel" type="Label" parent="."]
|
||||
offset_right = 880.0
|
||||
offset_bottom = 166.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 94
|
||||
text = "Cow Life Sim RPG"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="VersionName" type="Label" parent="."]
|
||||
offset_top = 129.0
|
||||
offset_right = 879.0
|
||||
offset_bottom = 181.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 35
|
||||
text = "Launch Update!"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="SaveMenu" type="CanvasLayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="SavesDisplayer" parent="SaveMenu" instance=ExtResource("11_6gsgq")]
|
||||
unique_name_in_owner = true
|
||||
offset_left = 24.0
|
||||
offset_top = 202.0
|
||||
offset_right = 531.0
|
||||
offset_bottom = 568.0
|
||||
|
||||
[node name="Button" type="Button" parent="SaveMenu"]
|
||||
offset_left = 648.0
|
||||
offset_top = 350.0
|
||||
offset_right = 820.0
|
||||
offset_bottom = 417.0
|
||||
focus_mode = 0
|
||||
theme = ExtResource("11_ot6u3")
|
||||
theme_override_font_sizes/font_size = 37
|
||||
text = "Back"
|
||||
|
||||
[node name="DeleteSaves" type="Button" parent="SaveMenu"]
|
||||
offset_left = 674.0
|
||||
offset_top = 559.0
|
||||
offset_right = 874.0
|
||||
offset_bottom = 614.0
|
||||
focus_mode = 0
|
||||
theme = ExtResource("11_ot6u3")
|
||||
theme_override_font_sizes/font_size = 26
|
||||
text = "Toggle Delete"
|
||||
|
||||
[node name="InitialMenu" type="CanvasLayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="EnterButton" type="Button" parent="InitialMenu"]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -245.0
|
||||
offset_top = -94.0
|
||||
offset_right = 243.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
focus_mode = 0
|
||||
theme = ExtResource("11_ot6u3")
|
||||
theme_override_font_sizes/font_size = 48
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_l5y6w")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_syxs1")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_tp0n4")
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_1vxv3")
|
||||
text = "Start Your Cow Life"
|
||||
|
||||
[node name="QuitButton" type="Button" parent="InitialMenu"]
|
||||
offset_left = 12.0
|
||||
offset_top = 560.0
|
||||
offset_right = 123.0
|
||||
offset_bottom = 611.0
|
||||
focus_mode = 0
|
||||
theme = ExtResource("11_ot6u3")
|
||||
theme_override_font_sizes/font_size = 23
|
||||
text = "Quit"
|
||||
|
||||
[node name="DiscordButton" type="TextureButton" parent="InitialMenu"]
|
||||
offset_left = 253.0
|
||||
offset_top = 562.0
|
||||
offset_right = 333.0
|
||||
offset_bottom = 642.0
|
||||
scale = Vector2(0.6, 0.6)
|
||||
texture_normal = ExtResource("13_1b52j")
|
||||
texture_pressed = ExtResource("13_1b52j")
|
||||
texture_hover = ExtResource("14_gec61")
|
||||
|
||||
[node name="TwitchButton" type="TextureButton" parent="InitialMenu"]
|
||||
offset_left = 312.0
|
||||
offset_top = 562.0
|
||||
offset_right = 392.0
|
||||
offset_bottom = 642.0
|
||||
scale = Vector2(0.6, 0.6)
|
||||
texture_normal = ExtResource("15_r27uj")
|
||||
texture_pressed = ExtResource("15_r27uj")
|
||||
texture_hover = ExtResource("16_ivwbn")
|
||||
|
||||
[node name="MuteButton" type="Button" parent="InitialMenu"]
|
||||
unique_name_in_owner = true
|
||||
offset_left = 132.0
|
||||
offset_top = 560.0
|
||||
offset_right = 243.0
|
||||
offset_bottom = 611.0
|
||||
focus_mode = 0
|
||||
theme = ExtResource("11_ot6u3")
|
||||
theme_override_font_sizes/font_size = 23
|
||||
text = "Mute"
|
||||
|
||||
[connection signal="pressed" from="SaveMenu/Button" to="." method="_on_save_back_button_pressed"]
|
||||
[connection signal="pressed" from="SaveMenu/DeleteSaves" to="SaveMenu/SavesDisplayer" method="_on_delete_saves_pressed"]
|
||||
[connection signal="pressed" from="InitialMenu/EnterButton" to="." method="_on_enter_button_pressed"]
|
||||
[connection signal="pressed" from="InitialMenu/QuitButton" to="." method="_on_quit_button_pressed"]
|
||||
[connection signal="pressed" from="InitialMenu/DiscordButton" to="." method="_on_discord_button_pressed"]
|
||||
[connection signal="pressed" from="InitialMenu/TwitchButton" to="." method="_on_twitch_button_pressed"]
|
||||
[connection signal="pressed" from="InitialMenu/MuteButton" to="." method="_on_mute_button_pressed"]
|
||||
2018
UI/MainMenu/MainMenuButton.tres
Normal file
2018
UI/MainMenu/MainMenuButton.tres
Normal file
File diff suppressed because one or more lines are too long
42
UI/MainMenu/SaveDisplay.gd
Normal file
42
UI/MainMenu/SaveDisplay.gd
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
extends PanelContainer
|
||||
|
||||
signal clicked
|
||||
|
||||
var hovered = false
|
||||
var clickDown = false
|
||||
|
||||
func set_cow_picture(picturePath):
|
||||
%Cow.texture = load(picturePath)
|
||||
|
||||
func new_game_mode():
|
||||
%SaveInfo.visible = false
|
||||
%NewGameLabel.visible = true
|
||||
|
||||
func save_exists():
|
||||
%SaveInfo.visible = true
|
||||
%NewGameLabel.visible = false
|
||||
|
||||
func set_save_num(number):
|
||||
%SaveNumber.text = " " + str(number) + " "
|
||||
|
||||
func set_total_level(totalLevel):
|
||||
%TotalLevel.text = "Total Level: " + str(totalLevel)
|
||||
|
||||
func set_quest_point_count(questPoints):
|
||||
%QuestPointCount.text = "Quest Points: " + str(questPoints)
|
||||
|
||||
func _on_mouse_entered():
|
||||
self_modulate = Color("9aff9a")
|
||||
hovered = true
|
||||
|
||||
func _on_mouse_exited():
|
||||
self_modulate = Color("ffffff")
|
||||
hovered = false
|
||||
clickDown = false
|
||||
|
||||
func _on_gui_input(event):
|
||||
if hovered and event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
clickDown = true
|
||||
if hovered and event is InputEventMouseButton and event.is_released() and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
if clickDown:
|
||||
clicked.emit()
|
||||
92
UI/MainMenu/SaveDisplay.tscn
Normal file
92
UI/MainMenu/SaveDisplay.tscn
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bukgtexir23qe"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bryqti0obuaqw" path="res://Player/cow.png" id="1_7shed"]
|
||||
[ext_resource type="Script" path="res://UI/MainMenu/SaveDisplay.gd" id="1_b5gh6"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pmevf"]
|
||||
bg_color = Color(0.4, 0.678431, 0.419608, 1)
|
||||
border_width_left = 6
|
||||
border_width_top = 6
|
||||
border_width_right = 6
|
||||
border_width_bottom = 6
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="SaveDisplayer" type="PanelContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_right = -466.0
|
||||
offset_bottom = -503.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_pmevf")
|
||||
script = ExtResource("1_b5gh6")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SaveNumber" type="Label" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/outline_size = 13
|
||||
theme_override_font_sizes/font_size = 74
|
||||
text = " 3 "
|
||||
vertical_alignment = 3
|
||||
|
||||
[node name="NewGameLabel" type="Label" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/outline_size = 13
|
||||
theme_override_font_sizes/font_size = 38
|
||||
text = "New Game "
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="SaveInfo" type="VBoxContainer" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="TotalLevel" type="Label" parent="HBoxContainer/SaveInfo"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/outline_size = 8
|
||||
theme_override_font_sizes/font_size = 28
|
||||
text = "Total Level: 999"
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="QuestPointCount" type="Label" parent="HBoxContainer/SaveInfo"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/outline_size = 8
|
||||
theme_override_font_sizes/font_size = 28
|
||||
text = "Quest Points: 3"
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
theme_override_constants/margin_right = 8
|
||||
|
||||
[node name="Cow" type="TextureRect" parent="HBoxContainer/MarginContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
texture = ExtResource("1_7shed")
|
||||
expand_mode = 2
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_right = 80
|
||||
|
||||
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
|
||||
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
|
||||
85
UI/MainMenu/SavesDisplayer.gd
Normal file
85
UI/MainMenu/SavesDisplayer.gd
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
extends Control
|
||||
|
||||
var dragged = false
|
||||
var dragTimer = 1.2
|
||||
|
||||
var deleting = false
|
||||
|
||||
func _process(delta):
|
||||
if dragged:
|
||||
dragTimer -= delta
|
||||
if dragTimer <= 0:
|
||||
set_cow_pictures("res://Player/cow.png")
|
||||
dragged = false
|
||||
|
||||
func set_cow_pictures(picturePath):
|
||||
var displays = $SavesDisplayingDiv.get_children()
|
||||
for i in range(displays.size()):
|
||||
var currentDisplay = displays[i]
|
||||
currentDisplay.set_cow_picture(picturePath)
|
||||
|
||||
func save_clicked(saveIndex):
|
||||
var prefix = "player" + str(saveIndex + 1)
|
||||
SaveManager.set_save_paths(prefix)
|
||||
|
||||
get_tree().change_scene_to_file("res://main_game.tscn")
|
||||
|
||||
func delete_save_clicked(saveIndex):
|
||||
var prefix = "player" + str(saveIndex + 1)
|
||||
SaveManager.set_save_paths(prefix)
|
||||
|
||||
SaveManager.delete_save()
|
||||
update_save_displays()
|
||||
|
||||
func hide_delete_buttons():
|
||||
deleting = false
|
||||
var deleteButtons = $DeleteSaveButtons.get_children()
|
||||
for i in range(deleteButtons.size()):
|
||||
var currentDisplay = deleteButtons[i]
|
||||
currentDisplay.visible = false
|
||||
|
||||
func show_delete_buttons():
|
||||
deleting = true
|
||||
var deleteButtons = $DeleteSaveButtons.get_children()
|
||||
for i in range(deleteButtons.size()):
|
||||
var currentDisplay = deleteButtons[i]
|
||||
currentDisplay.visible = true
|
||||
currentDisplay.clicked.connect(delete_save_clicked.bind(i))
|
||||
|
||||
func update_save_displays():
|
||||
var displays = $SavesDisplayingDiv.get_children()
|
||||
for i in range(displays.size()):
|
||||
var currentDisplay = displays[i]
|
||||
currentDisplay.set_save_num(i + 1)
|
||||
|
||||
var prefix = "player" + str(i + 1)
|
||||
var savePath = "user://" + prefix + ".cfg"
|
||||
|
||||
SaveManager.set_save_paths(prefix)
|
||||
SaveManager.load_skills()
|
||||
var totalLevel = LevelManager.get_total_level()
|
||||
currentDisplay.set_total_level(totalLevel)
|
||||
|
||||
var config = ConfigFile.new()
|
||||
config.load(savePath)
|
||||
|
||||
if config.has_section("variables"):
|
||||
currentDisplay.save_exists()
|
||||
else:
|
||||
currentDisplay.new_game_mode()
|
||||
|
||||
var questPoints = config.get_value("variables", "questPoints", 0)
|
||||
currentDisplay.set_quest_point_count(questPoints)
|
||||
|
||||
currentDisplay.clicked.connect(save_clicked.bind(i))
|
||||
|
||||
func _on_delete_saves_pressed():
|
||||
if !deleting:
|
||||
show_delete_buttons()
|
||||
else:
|
||||
hide_delete_buttons()
|
||||
|
||||
func _on_dragged(offset):
|
||||
dragged = true
|
||||
dragTimer = 1.2
|
||||
set_cow_pictures("res://Player/cowMouthOpen.png")
|
||||
41
UI/MainMenu/SavesDisplayer.tscn
Normal file
41
UI/MainMenu/SavesDisplayer.tscn
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://yxsmdsi4wcym"]
|
||||
|
||||
[ext_resource type="Script" path="res://UI/MainMenu/SavesDisplayer.gd" id="1_5uf7j"]
|
||||
[ext_resource type="PackedScene" uid="uid://bukgtexir23qe" path="res://UI/MainMenu/SaveDisplay.tscn" id="1_q4fau"]
|
||||
[ext_resource type="PackedScene" uid="uid://b0ve5u00l8u0x" path="res://UI/MainMenu/DeleteSaveButton.tscn" id="3_lvitw"]
|
||||
|
||||
[node name="SaveDisplayer" type="HSplitContainer"]
|
||||
offset_right = 520.0
|
||||
offset_bottom = 375.0
|
||||
theme_override_constants/separation = 0
|
||||
script = ExtResource("1_5uf7j")
|
||||
|
||||
[node name="SavesDisplayingDiv" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
|
||||
[node name="SaveDisplayer" parent="SavesDisplayingDiv" instance=ExtResource("1_q4fau")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SaveDisplayer2" parent="SavesDisplayingDiv" instance=ExtResource("1_q4fau")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SaveDisplayer3" parent="SavesDisplayingDiv" instance=ExtResource("1_q4fau")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="DeleteSaveButtons" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
theme_override_constants/separation = 48
|
||||
alignment = 1
|
||||
|
||||
[node name="DeleteSaveButton" parent="DeleteSaveButtons" instance=ExtResource("3_lvitw")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="DeleteSaveButton2" parent="DeleteSaveButtons" instance=ExtResource("3_lvitw")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="DeleteSaveButton3" parent="DeleteSaveButtons" instance=ExtResource("3_lvitw")]
|
||||
layout_mode = 2
|
||||
|
||||
[connection signal="dragged" from="." to="." method="_on_dragged"]
|
||||
BIN
UI/MainMenu/SocialButtons/DiscordButton.png
Normal file
BIN
UI/MainMenu/SocialButtons/DiscordButton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 699 B |
34
UI/MainMenu/SocialButtons/DiscordButton.png.import
Normal file
34
UI/MainMenu/SocialButtons/DiscordButton.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://1dt3kxxhyfmx"
|
||||
path="res://.godot/imported/DiscordButton.png-f314efbffbf3fdb2d0359421323da747.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://UI/MainMenu/SocialButtons/DiscordButton.png"
|
||||
dest_files=["res://.godot/imported/DiscordButton.png-f314efbffbf3fdb2d0359421323da747.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
UI/MainMenu/SocialButtons/DiscordButtonHover.png
Normal file
BIN
UI/MainMenu/SocialButtons/DiscordButtonHover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 723 B |
34
UI/MainMenu/SocialButtons/DiscordButtonHover.png.import
Normal file
34
UI/MainMenu/SocialButtons/DiscordButtonHover.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ddod3bdf7vyan"
|
||||
path="res://.godot/imported/DiscordButtonHover.png-1130ca4ead23f877a78e8408a382bfb5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://UI/MainMenu/SocialButtons/DiscordButtonHover.png"
|
||||
dest_files=["res://.godot/imported/DiscordButtonHover.png-1130ca4ead23f877a78e8408a382bfb5.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
UI/MainMenu/SocialButtons/TwitchButton.png
Normal file
BIN
UI/MainMenu/SocialButtons/TwitchButton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 787 B |
34
UI/MainMenu/SocialButtons/TwitchButton.png.import
Normal file
34
UI/MainMenu/SocialButtons/TwitchButton.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ds4bybu0xidnf"
|
||||
path="res://.godot/imported/TwitchButton.png-11c8d48069410bd3befafaac79f0fe3f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://UI/MainMenu/SocialButtons/TwitchButton.png"
|
||||
dest_files=["res://.godot/imported/TwitchButton.png-11c8d48069410bd3befafaac79f0fe3f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
UI/MainMenu/SocialButtons/TwitchButtonHover.png
Normal file
BIN
UI/MainMenu/SocialButtons/TwitchButtonHover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 790 B |
34
UI/MainMenu/SocialButtons/TwitchButtonHover.png.import
Normal file
34
UI/MainMenu/SocialButtons/TwitchButtonHover.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c28qbcevfclyf"
|
||||
path="res://.godot/imported/TwitchButtonHover.png-d3b74de693b2bb3c33f4486eef9e55f6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://UI/MainMenu/SocialButtons/TwitchButtonHover.png"
|
||||
dest_files=["res://.godot/imported/TwitchButtonHover.png-d3b74de693b2bb3c33f4486eef9e55f6.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Loading…
Add table
Add a link
Reference in a new issue