aboutsummaryrefslogtreecommitdiff
path: root/game/src/SaveLoadMenu/SavePanelButton.gd
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2023-06-03 20:37:10 +0200
committer Spartan322 <Megacake1234@gmail.com>2023-06-03 20:37:10 +0200
commitcef940108fe15752c3ef66f43f5169403fa2f71d (patch)
treefe4de5a05830e3bddeae78f74f729503b7cee1e9 /game/src/SaveLoadMenu/SavePanelButton.gd
parent73e29d02e48739aba5ca5db1b9575c67e795400f (diff)
Reorganize the file structure of the files in `game/src`
Diffstat (limited to 'game/src/SaveLoadMenu/SavePanelButton.gd')
-rw-r--r--game/src/SaveLoadMenu/SavePanelButton.gd41
1 files changed, 0 insertions, 41 deletions
diff --git a/game/src/SaveLoadMenu/SavePanelButton.gd b/game/src/SaveLoadMenu/SavePanelButton.gd
deleted file mode 100644
index 5fe4917..0000000
--- a/game/src/SaveLoadMenu/SavePanelButton.gd
+++ /dev/null
@@ -1,41 +0,0 @@
-@tool
-extends LobbyPanelButton
-
-signal request_to_delete
-
-@export_group("Nodes")
-@export var country_flag : TextureRect
-@export var date_label : Label
-@export var delete_button : BaseButton
-
-var resource : SaveResource:
- get:
- return resource
- set(value):
- if resource != null:
- resource.changed.disconnect(_resource_changed)
- resource = value
- if resource != null:
- resource.changed.connect(_resource_changed)
- _resource_changed()
-
-func get_text() -> StringName:
- return resource.save_name
-
-func set_text(value : StringName) -> void:
- if resource != null:
- resource.save_name = value
-
-func _ready():
- _resource_changed()
-
-func _is_start_date() -> bool:
- return false
-
-func _resource_changed() -> void:
- if resource == null: return
- name_label.text = resource.save_name
- date_label.text = Time.get_datetime_string_from_unix_time(resource.get_save_file_time(), true)
-
-func _on_delete_button_pressed() -> void:
- request_to_delete.emit()