fix font weirdness and other patches
This commit is contained in:
parent
0f6c3bb1a3
commit
cb69ef032e
18 changed files with 120 additions and 22 deletions
|
@ -110,7 +110,7 @@ func give_input_point_pos(name:String) -> Vector2:
|
|||
func _set_inout_type(label:Button, value):
|
||||
match typeof(value):
|
||||
TYPE_FLOAT:
|
||||
label.text = "◉"
|
||||
label.text = "🔘"
|
||||
label.add_theme_color_override("font_color", Color.ROYAL_BLUE)
|
||||
TYPE_BOOL:
|
||||
label.text = "◆"
|
||||
|
|
|
@ -13,6 +13,7 @@ var optionsVar:OptionButton
|
|||
var _workspace_ID:String
|
||||
var save_name: String = "My Save"
|
||||
var author_name: String = "Unnamed Author"
|
||||
var showtapesPath: String = "user://Showtapes/"
|
||||
var version: String = ProjectSettings.get_setting("application/config/version")
|
||||
var game_title: String = ProjectSettings.get_setting("application/config/name")
|
||||
var time_created: String = ""
|
||||
|
@ -97,8 +98,9 @@ func save_everything():
|
|||
|
||||
for child in holder.get_children():
|
||||
child = child.get_child(0)
|
||||
print(child._get_title() + ", " + child.nodePath)
|
||||
if child is not GL_Node:
|
||||
print(child.name)
|
||||
print(child)
|
||||
continue
|
||||
|
||||
var id = "SAVE_" + str(rng.randi())
|
||||
|
@ -113,7 +115,7 @@ func save_everything():
|
|||
# Save recording if it's a GL_Record and has enough data
|
||||
if child is GL_Record and child.recording != null:
|
||||
if child.recording.size() >= 3:
|
||||
var recording_file_path = "user://My Precious Save Files/" + str(_workspace_ID) + "/" + child.uuid + "_recording.tres"
|
||||
var recording_file_path = showtapesPath + str(_workspace_ID) + "/" + child.uuid + "_recording.tres"
|
||||
var recording_config = ConfigFile.new()
|
||||
recording_config.set_value("recording", "data", child.recording)
|
||||
var err = recording_config.save(recording_file_path)
|
||||
|
@ -132,7 +134,7 @@ func save_everything():
|
|||
|
||||
saveDict[id] = node_data
|
||||
|
||||
var save_dir = "user://My Precious Save Files/" + str(_workspace_ID)
|
||||
var save_dir = showtapesPath + str(_workspace_ID)
|
||||
DirAccess.make_dir_recursive_absolute(save_dir)
|
||||
var file_path = save_dir + "/node_workspace.tres"
|
||||
|
||||
|
@ -164,7 +166,7 @@ func save_everything():
|
|||
|
||||
|
||||
func load_everything():
|
||||
var file_path = "user://My Precious Save Files/" + str(_workspace_ID) + "/node_workspace.tres"
|
||||
var file_path = showtapesPath + str(_workspace_ID) + "/node_workspace.tres"
|
||||
var resource = ConfigFile.new()
|
||||
var err = resource.load(file_path)
|
||||
if err != OK:
|
||||
|
@ -204,7 +206,7 @@ func load_everything():
|
|||
node.rows = data[key].get("rows",{})
|
||||
node._update_visuals()
|
||||
if node is GL_Record:
|
||||
var recording_file = "user://My Precious Save Files/" + str(_workspace_ID) + "/" + node.uuid + "_recording.tres"
|
||||
var recording_file = showtapesPath + str(_workspace_ID) + "/" + node.uuid + "_recording.tres"
|
||||
var config = ConfigFile.new()
|
||||
if config.load(recording_file) == OK:
|
||||
node.recording = config.get_value("recording", "data", {})
|
||||
|
@ -224,7 +226,7 @@ func populate_workspace_options():
|
|||
optionsVar.clear()
|
||||
optionsVar.add_item("New Workspace")
|
||||
|
||||
var dir := DirAccess.open("user://My Precious Save Files")
|
||||
var dir := DirAccess.open(showtapesPath)
|
||||
if dir:
|
||||
dir.list_dir_begin()
|
||||
var name = dir.get_next()
|
||||
|
|
|
@ -76,6 +76,6 @@ func _set_audio_path(file: String):
|
|||
func find_audio_path() -> String:
|
||||
for node in get_tree().get_nodes_in_group("Node Map"):
|
||||
if node is GL_Node_Map:
|
||||
return "user://My Precious Save Files/" + node._workspace_ID + "/Audio"
|
||||
return "user://Showtapes/" + node._workspace_ID + "/Audio"
|
||||
printerr("Uhhhhh")
|
||||
return ""
|
||||
|
|
|
@ -7,6 +7,7 @@ extends GL_Node
|
|||
func _ready():
|
||||
super._ready()
|
||||
_set_title(identification)
|
||||
if (visual_name != ""): _set_title(visual_name)
|
||||
for i in names.size():
|
||||
match(types[i].to_lower()):
|
||||
"float":
|
||||
|
|
|
@ -63,9 +63,11 @@ func _set_rows():
|
|||
container.call_deferred("add_child",row)
|
||||
|
||||
func _create_node(name:String):
|
||||
var node = load("res://Scenes/Node Types/" + name + ".tscn").instantiate()
|
||||
var path = "res://Scenes/Node Types/" + name + ".tscn"
|
||||
var node = load(path).instantiate()
|
||||
get_parent().get_node("Holder").add_child(node)
|
||||
node = (node as Control).get_child(0) as GL_Node
|
||||
node.nodePath = path
|
||||
node.position = lastMousePos
|
||||
node._create_uuid()
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ func _sent_signals(anim_name: String, value):
|
|||
|
||||
match(anim_name):
|
||||
"Audio":
|
||||
print(value.value)
|
||||
if value is not GL_AudioType:
|
||||
return
|
||||
var path = (value as GL_AudioType).value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue