|
|
@ -20,12 +20,11 @@ signal close_save_list_ui |
|
|
|
signal toggle_save_icon_generation(toggled: bool) ## Enable/Disable the generation of a screenshot during save for the save icon. |
|
|
|
|
|
|
|
|
|
|
|
var _enable_save_icon_generation: bool = true |
|
|
|
var _game_data_resource: SaveGameDataResource = SaveGameDataResource.new() |
|
|
|
var _save_icon_size: Vector2i = Vector2i(896, 504) ## If Vector2.ZERO, uses the user's resolution |
|
|
|
var _save_level_data_component: SaveLevelDataComponent ## Contains the save paths and filenames |
|
|
|
|
|
|
|
var _enable_save_icon_generation: bool = true |
|
|
|
|
|
|
|
|
|
|
|
func _ready() -> void: |
|
|
|
quick_load.connect(quick_load_game) |
|
|
@ -184,10 +183,7 @@ func _take_save_screenshot(save_game_file_path: String) -> void: |
|
|
|
if !_enable_save_icon_generation: return |
|
|
|
|
|
|
|
var _icon_filepath: String = save_game_file_path.replace(".tres", ".png") |
|
|
|
|
|
|
|
# TODO: Hide the UI before taking the screenshot |
|
|
|
var _icon: Image = get_viewport().get_texture().get_image() |
|
|
|
# TODO: Show the UI after taking the screenshot |
|
|
|
|
|
|
|
if _save_icon_size != Vector2i.ZERO: |
|
|
|
_icon.resize(_save_icon_size.x, _save_icon_size.y) |
|
|
|