challenge-editor/scene/save_and_load_mono.gd

35 lines
634 B
GDScript3
Raw Normal View History

2024-09-19 17:56:05 +08:00
extends NinePatchRect
var need_save:bool=true
2024-10-04 18:08:33 +08:00
func set_data(data:Dictionary):
%name.text=data["name"]
2024-10-10 18:09:32 +08:00
%date.text=Time.get_datetime_string_from_unix_time(data["time_unix"],true)
2024-10-04 18:08:33 +08:00
%place.text=Database.get_scene_name(data["now_scene"])
pass
2024-09-19 17:56:05 +08:00
func _ready() -> void:
if need_save:
$TextureRect3.show()
else:
$TextureRect3.hide()
2024-10-04 18:08:33 +08:00
signal cover
2024-09-19 17:56:05 +08:00
2024-10-04 18:08:33 +08:00
signal load
signal delete
func _on_load_pressed() -> void:
load.emit()
2024-09-19 17:56:05 +08:00
pass # Replace with function body.
2024-10-04 18:08:33 +08:00
func _on_cover_pressed() -> void:
cover.emit()
pass # Replace with function body.
func _on_delete_pressed() -> void:
delete.emit()
2024-09-19 17:56:05 +08:00
pass # Replace with function body.