update ui
This commit was merged in pull request #31.
This commit is contained in:
@@ -5,6 +5,11 @@ var unlocked_collectibles_ids: Array[StringName] = []
|
||||
var saved_photos: Array[String] = []
|
||||
var audio_bus_volumes: Dictionary[String, float] = {}
|
||||
|
||||
var anti_aliasing: bool = true
|
||||
var window_mode_index: int = 0
|
||||
var resolution_x: int = 1920
|
||||
var resolution_y: int = 1080
|
||||
|
||||
func to_dictionary() -> Dictionary:
|
||||
var serialized_collectible_ids: Array[String] = []
|
||||
for collectible_id in unlocked_collectibles_ids:
|
||||
@@ -14,6 +19,10 @@ func to_dictionary() -> Dictionary:
|
||||
"unlocked_collectibles_ids": serialized_collectible_ids,
|
||||
"saved_photos": saved_photos,
|
||||
"audio_bus_volumes": audio_bus_volumes,
|
||||
"anti_aliasing": anti_aliasing,
|
||||
"window_mode_index": window_mode_index,
|
||||
"resolution_x": resolution_x,
|
||||
"resolution_y": resolution_y,
|
||||
}
|
||||
|
||||
static func from_dictionary(data: Dictionary) -> SaveGameData:
|
||||
@@ -31,4 +40,16 @@ static func from_dictionary(data: Dictionary) -> SaveGameData:
|
||||
for bus_name in data["audio_bus_volumes"]:
|
||||
save_game_data.audio_bus_volumes[str(bus_name)] = float(data["audio_bus_volumes"][bus_name])
|
||||
|
||||
if data.has("anti_aliasing"):
|
||||
save_game_data.anti_aliasing = bool(data["anti_aliasing"])
|
||||
|
||||
if data.has("window_mode_index"):
|
||||
save_game_data.window_mode_index = int(data["window_mode_index"])
|
||||
|
||||
if data.has("resolution_x"):
|
||||
save_game_data.resolution_x = int(data["resolution_x"])
|
||||
|
||||
if data.has("resolution_y"):
|
||||
save_game_data.resolution_y = int(data["resolution_y"])
|
||||
|
||||
return save_game_data
|
||||
|
||||
Reference in New Issue
Block a user