diff --git a/.godot/.gdignore b/.godot/.gdignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.godot/.gdignore @@ -0,0 +1 @@ + diff --git a/addons/godot_db_manager/assets/fnt/roboto_08.tres b/addons/godot_db_manager/assets/fnt/roboto_08.tres index f9804e3..1e833af 100644 --- a/addons/godot_db_manager/assets/fnt/roboto_08.tres +++ b/addons/godot_db_manager/assets/fnt/roboto_08.tres @@ -1,7 +1,7 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[resource] -size = 8 -font_data = ExtResource( 1 ) +[gd_resource type="FontFile" load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="FontFile" id=1] + +[resource] +size = 8 +font_data = ExtResource( 1 ) diff --git a/addons/godot_db_manager/assets/fnt/roboto_10.tres b/addons/godot_db_manager/assets/fnt/roboto_10.tres index 556e3ab..6979009 100644 --- a/addons/godot_db_manager/assets/fnt/roboto_10.tres +++ b/addons/godot_db_manager/assets/fnt/roboto_10.tres @@ -1,7 +1,7 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[resource] -size = 10 -font_data = ExtResource( 1 ) +[gd_resource type="FontFile" load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="FontFile" id=1] + +[resource] +size = 10 +font_data = ExtResource( 1 ) diff --git a/addons/godot_db_manager/assets/fnt/roboto_12.tres b/addons/godot_db_manager/assets/fnt/roboto_12.tres index 9f74f98..e3ade0b 100644 --- a/addons/godot_db_manager/assets/fnt/roboto_12.tres +++ b/addons/godot_db_manager/assets/fnt/roboto_12.tres @@ -1,7 +1,7 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[resource] -size = 12 -font_data = ExtResource( 1 ) +[gd_resource type="FontFile" load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="FontFile" id=1] + +[resource] +size = 12 +font_data = ExtResource( 1 ) diff --git a/addons/godot_db_manager/assets/fnt/roboto_14.tres b/addons/godot_db_manager/assets/fnt/roboto_14.tres index 63cb77f..99a59a5 100644 --- a/addons/godot_db_manager/assets/fnt/roboto_14.tres +++ b/addons/godot_db_manager/assets/fnt/roboto_14.tres @@ -1,7 +1,7 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[resource] -size = 14 -font_data = ExtResource( 1 ) +[gd_resource type="FontFile" load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="FontFile" id=1] + +[resource] +size = 14 +font_data = ExtResource( 1 ) diff --git a/addons/godot_db_manager/assets/fnt/roboto_16.tres b/addons/godot_db_manager/assets/fnt/roboto_16.tres index b8678a1..2af92ea 100644 --- a/addons/godot_db_manager/assets/fnt/roboto_16.tres +++ b/addons/godot_db_manager/assets/fnt/roboto_16.tres @@ -1,6 +1,6 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[resource] -font_data = ExtResource( 1 ) +[gd_resource type="FontFile" load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="FontFile" id=1] + +[resource] +font_data = ExtResource( 1 ) diff --git a/addons/godot_db_manager/assets/fnt/roboto_18.tres b/addons/godot_db_manager/assets/fnt/roboto_18.tres index e55e4bc..9229abc 100644 --- a/addons/godot_db_manager/assets/fnt/roboto_18.tres +++ b/addons/godot_db_manager/assets/fnt/roboto_18.tres @@ -1,7 +1,7 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[resource] -size = 18 -font_data = ExtResource( 1 ) +[gd_resource type="FontFile" load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="FontFile" id=1] + +[resource] +size = 18 +font_data = ExtResource( 1 ) diff --git a/addons/godot_db_manager/assets/fnt/roboto_20.tres b/addons/godot_db_manager/assets/fnt/roboto_20.tres index 4789496..f7fdb61 100644 --- a/addons/godot_db_manager/assets/fnt/roboto_20.tres +++ b/addons/godot_db_manager/assets/fnt/roboto_20.tres @@ -1,7 +1,7 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[resource] -size = 20 -font_data = ExtResource( 1 ) +[gd_resource type="FontFile" load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="FontFile" id=1] + +[resource] +size = 20 +font_data = ExtResource( 1 ) diff --git a/addons/godot_db_manager/assets/fnt/roboto_22.tres b/addons/godot_db_manager/assets/fnt/roboto_22.tres index 07da06d..903e6e1 100644 --- a/addons/godot_db_manager/assets/fnt/roboto_22.tres +++ b/addons/godot_db_manager/assets/fnt/roboto_22.tres @@ -1,7 +1,7 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[resource] -size = 22 -font_data = ExtResource( 1 ) +[gd_resource type="FontFile" load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="FontFile" id=1] + +[resource] +size = 22 +font_data = ExtResource( 1 ) diff --git a/addons/godot_db_manager/assets/fnt/roboto_24.tres b/addons/godot_db_manager/assets/fnt/roboto_24.tres index 3586843..f6b7ca2 100644 --- a/addons/godot_db_manager/assets/fnt/roboto_24.tres +++ b/addons/godot_db_manager/assets/fnt/roboto_24.tres @@ -1,7 +1,7 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[resource] -size = 24 -font_data = ExtResource( 1 ) +[gd_resource type="FontFile" load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="FontFile" id=1] + +[resource] +size = 24 +font_data = ExtResource( 1 ) diff --git a/addons/godot_db_manager/assets/fnt/roboto_26.tres b/addons/godot_db_manager/assets/fnt/roboto_26.tres index ffa7210..2391537 100644 --- a/addons/godot_db_manager/assets/fnt/roboto_26.tres +++ b/addons/godot_db_manager/assets/fnt/roboto_26.tres @@ -1,7 +1,7 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="DynamicFontData" id=1] - -[resource] -size = 26 -font_data = ExtResource( 1 ) +[gd_resource type="FontFile" load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/Roboto-Regular.ttf" type="FontFile" id=1] + +[resource] +size = 26 +font_data = ExtResource( 1 ) diff --git a/addons/godot_db_manager/core/GDDBConstants.gd b/addons/godot_db_manager/core/GDDBConstants.gd index 0f41b39..4b2f9b5 100644 --- a/addons/godot_db_manager/core/GDDBConstants.gd +++ b/addons/godot_db_manager/core/GDDBConstants.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBConstants """ class_name GDDBConstants -tool extends Node # GDDB signature diff --git a/addons/godot_db_manager/core/GDDBGlobals.gd b/addons/godot_db_manager/core/GDDBGlobals.gd index 8459006..24dfd1a 100644 --- a/addons/godot_db_manager/core/GDDBGlobals.gd +++ b/addons/godot_db_manager/core/GDDBGlobals.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBGlobals """ class_name GDDBGlobals -tool extends Node # a flag that tells if the tool's interface is active or not diff --git a/addons/godot_db_manager/core/GDDBTypes.gd b/addons/godot_db_manager/core/GDDBTypes.gd index 50da644..9cbd4cd 100644 --- a/addons/godot_db_manager/core/GDDBTypes.gd +++ b/addons/godot_db_manager/core/GDDBTypes.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBTypes """ class_name GDDBTypes -tool extends Node # Database loading errors diff --git a/addons/godot_db_manager/core/database.gd b/addons/godot_db_manager/core/database.gd index 5d0b806..1641209 100644 --- a/addons/godot_db_manager/core/database.gd +++ b/addons/godot_db_manager/core/database.gd @@ -188,11 +188,11 @@ func is_dirty() -> bool : # serialization func save_db() -> void : - if(m_db_name.empty()): + if(m_db_name.is_empty()): print("ERROR: GDDatabase::save_db() - current database doesn't have a name") return - if(m_db_filepath.empty()): + if(m_db_filepath.is_empty()): print("ERROR: GDDatabase::save_db() - current database doesn't have a path file") return @@ -257,7 +257,9 @@ func load_db() -> int : file.open(get_db_filepath(), File.READ) var content = file.get_as_text() file.close() - var dictionary = JSON.parse(content).result + var test_json_conv = JSON.new() + test_json_conv.parse(content).result + var dictionary = test_json_conv.get_data() # check the signature if(!dictionary.has(gddb_constants.c_gddb_signature)): diff --git a/addons/godot_db_manager/core/db_data.gd b/addons/godot_db_manager/core/db_data.gd index 3297b87..da9256d 100644 --- a/addons/godot_db_manager/core/db_data.gd +++ b/addons/godot_db_manager/core/db_data.gd @@ -1,40 +1,40 @@ -""" -GDDBData class -""" - -class_name GDDBData - -extends Object - -var m_prop_id : int = -1 -var m_row_idx : int = -1 -var m_data : String = "" - -# sets the property id -func set_prop_id(prop_id : int) -> void : - m_prop_id = prop_id - -# returns the property id -func get_prop_id() -> int : - return m_prop_id - -# sets the row index -func set_row_idx(row_idx : int) -> void : - m_row_idx = row_idx - -# returns the row index -func get_row_idx() -> int : - return m_row_idx - -# sets the data -func set_data(data : String) -> void : - m_data = data - -# returns the data -func get_data() -> String : - return m_data - -# dumps the data -func dump() -> String : - var dump_text = "prop_id: " + str(m_prop_id) + ", row_idx: " + str(m_row_idx) + ", data: " + m_data - return dump_text +""" +GDDBData class +""" + +class_name GDDBData + +extends Object + +var m_prop_id : int = -1 +var m_row_idx : int = -1 +var m_data : String = "" + +# sets the property id +func set_prop_id(prop_id : int) -> void : + m_prop_id = prop_id + +# returns the property id +func get_prop_id() -> int : + return m_prop_id + +# sets the row index +func set_row_idx(row_idx : int) -> void : + m_row_idx = row_idx + +# returns the row index +func get_row_idx() -> int : + return m_row_idx + +# sets the data +func set_data(data : String) -> void : + m_data = data + +# returns the data +func get_data() -> String : + return m_data + +# dumps the data +func dump() -> String : + var dump_text = "prop_id: " + str(m_prop_id) + ", row_idx: " + str(m_row_idx) + ", data: " + m_data + return dump_text diff --git a/addons/godot_db_manager/core/db_man.gd b/addons/godot_db_manager/core/db_man.gd index e73cc95..95f4982 100644 --- a/addons/godot_db_manager/core/db_man.gd +++ b/addons/godot_db_manager/core/db_man.gd @@ -1,141 +1,141 @@ -""" -GDDBMan class -""" - -class_name GDDBMan - -extends Object - -var m_databases = [] - -# adds a database -func add_database(db_name : String) -> int : - if(!can_add_db(db_name)): - print("ERROR: GDDBMan::add_database(" + db_name + ") already exists") - return gddb_constants.c_invalid_id - # print("GDDBMan::add_database(" + db_name + ")") - var db_id = generate_new_db_id() - var db = load(gddb_constants.c_addon_main_path + "core/database.gd").new() - db.set_db_id(db_id) - db.set_db_name(db_name) - m_databases.push_back(db) - return db_id - -# loads a database from a file -func load_database(filepath : String) -> int : - var db_id = generate_new_db_id() - var db = load(gddb_constants.c_addon_main_path + "core/database.gd").new() - db.set_db_id(db_id) - db.set_db_filepath(filepath) - - if(db.load_db() == gddb_types.e_db_invalid_file): - db.free() - return gddb_types.e_db_invalid_file - - elif(db.load_db() == gddb_types.e_db_invalid_ver): - db.free() - return gddb_types.e_db_invalid_ver - - m_databases.push_back(db) - return db_id - -# erases a database at index -# it does not erase the database file -func erase_db_at(idx : int) -> void : - if(idx < 0 || idx > m_databases.size() - 1): - print("ERROR: GDDBMan::erase_db_at(" + str(idx) + ") - index out of bounds") - - m_databases[idx].clear() - m_databases[idx].free() - m_databases.remove(idx) - -# erases a database by id -# it does not erase the database file -func erase_db_by_id(db_id : int) -> void : - var db_found = false - for idx in range(0, m_databases.size()): - if(m_databases[idx].get_db_id() == db_id): - m_databases[idx].clear() - m_databases[idx].free() - m_databases.remove(idx) - db_found = true - break - - if(!db_found): - print("ERROR: GDDBMan::erase_db_by_id(" + str(db_id) + ") - database not found") - -# erases a database by name -# it does not erase the database file -func erase_db_by_name(db_name : String) -> void : - var db_found = false - for idx in range(0, m_databases.size()): - if(m_databases[idx].get_db_name() == db_name): - m_databases[idx].clear() - m_databases[idx].free() - m_databases.remove(idx) - db_found = true - break - - if(!db_found): - print("ERROR: GDDBMan::erase_db_by_id(" + db_name + ") - database not found") - -# returns the databases count -func get_databases_count() -> int : - return m_databases.size() - -# returns a database at index -func get_db_at(idx : int) -> Object : - if(idx < 0 || idx >= m_databases.size()): - print("ERROR: GDDBMan::get_db_at(" + str(idx) + ") - invalid index") - return null - return m_databases[idx] - -# returns a database by an id -func get_db_by_id(db_id : int) -> Object : - for idx in range(0, m_databases.size()): - if(m_databases[idx].get_db_id() == db_id): - return m_databases[idx] - print("ERROR: GDDBMan::get_db_by_id(" + str(db_id) + ") - invalid id") - return null - -# returns a database by a name -func get_db_by_name(db_name : String) -> Object : - for idx in range(0, m_databases.size()): - if(m_databases[idx].get_db_name() == db_name): - return m_databases[idx] - return null - -# generates a new table id -func generate_new_db_id() -> int : - if(m_databases.size() == 0): - return 0 - return m_databases[m_databases.size()-1].get_db_id() + 1 - -# checks if a database already exists -func can_add_db(db_name : String) -> bool : - for idx in range(0, m_databases.size()): - if(m_databases[idx].get_db_name() == db_name): - print("ERROR: Database with name \"" + db_name + "\" already exists") - return false - return true - -# deletes all databases -func clear() -> void : - for idx in range(0, m_databases.size()): - m_databases[idx].clear() - m_databases[idx].free() - m_databases.clear() - -# dumps all databases -func dump(to_console : bool = false) -> String : - var dump_text = "\nDatabase manager - dump" - - dump_text += "\n====================================================================================" - for idx in range(0, m_databases.size()): - dump_text += m_databases[idx].dump() - dump_text += "====================================================================================" - - if(to_console): - print(dump_text) - - return dump_text +""" +GDDBMan class +""" + +class_name GDDBMan + +extends Object + +var m_databases = [] + +# adds a database +func add_database(db_name : String) -> int : + if(!can_add_db(db_name)): + print("ERROR: GDDBMan::add_database(" + db_name + ") already exists") + return gddb_constants.c_invalid_id + # print("GDDBMan::add_database(" + db_name + ")") + var db_id = generate_new_db_id() + var db = load(gddb_constants.c_addon_main_path + "core/database.gd").new() + db.set_db_id(db_id) + db.set_db_name(db_name) + m_databases.push_back(db) + return db_id + +# loads a database from a file +func load_database(filepath : String) -> int : + var db_id = generate_new_db_id() + var db = load(gddb_constants.c_addon_main_path + "core/database.gd").new() + db.set_db_id(db_id) + db.set_db_filepath(filepath) + + if(db.load_db() == gddb_types.e_db_invalid_file): + db.free() + return gddb_types.e_db_invalid_file + + elif(db.load_db() == gddb_types.e_db_invalid_ver): + db.free() + return gddb_types.e_db_invalid_ver + + m_databases.push_back(db) + return db_id + +# erases a database at index +# it does not erase the database file +func erase_db_at(idx : int) -> void : + if(idx < 0 || idx > m_databases.size() - 1): + print("ERROR: GDDBMan::erase_db_at(" + str(idx) + ") - index out of bounds") + + m_databases[idx].clear() + m_databases[idx].free() + m_databases.remove(idx) + +# erases a database by id +# it does not erase the database file +func erase_db_by_id(db_id : int) -> void : + var db_found = false + for idx in range(0, m_databases.size()): + if(m_databases[idx].get_db_id() == db_id): + m_databases[idx].clear() + m_databases[idx].free() + m_databases.remove(idx) + db_found = true + break + + if(!db_found): + print("ERROR: GDDBMan::erase_db_by_id(" + str(db_id) + ") - database not found") + +# erases a database by name +# it does not erase the database file +func erase_db_by_name(db_name : String) -> void : + var db_found = false + for idx in range(0, m_databases.size()): + if(m_databases[idx].get_db_name() == db_name): + m_databases[idx].clear() + m_databases[idx].free() + m_databases.remove(idx) + db_found = true + break + + if(!db_found): + print("ERROR: GDDBMan::erase_db_by_id(" + db_name + ") - database not found") + +# returns the databases count +func get_databases_count() -> int : + return m_databases.size() + +# returns a database at index +func get_db_at(idx : int) -> Object : + if(idx < 0 || idx >= m_databases.size()): + print("ERROR: GDDBMan::get_db_at(" + str(idx) + ") - invalid index") + return null + return m_databases[idx] + +# returns a database by an id +func get_db_by_id(db_id : int) -> Object : + for idx in range(0, m_databases.size()): + if(m_databases[idx].get_db_id() == db_id): + return m_databases[idx] + print("ERROR: GDDBMan::get_db_by_id(" + str(db_id) + ") - invalid id") + return null + +# returns a database by a name +func get_db_by_name(db_name : String) -> Object : + for idx in range(0, m_databases.size()): + if(m_databases[idx].get_db_name() == db_name): + return m_databases[idx] + return null + +# generates a new table id +func generate_new_db_id() -> int : + if(m_databases.size() == 0): + return 0 + return m_databases[m_databases.size()-1].get_db_id() + 1 + +# checks if a database already exists +func can_add_db(db_name : String) -> bool : + for idx in range(0, m_databases.size()): + if(m_databases[idx].get_db_name() == db_name): + print("ERROR: Database with name \"" + db_name + "\" already exists") + return false + return true + +# deletes all databases +func clear() -> void : + for idx in range(0, m_databases.size()): + m_databases[idx].clear() + m_databases[idx].free() + m_databases.clear() + +# dumps all databases +func dump(to_console : bool = false) -> String : + var dump_text = "\nDatabase manager - dump" + + dump_text += "\n====================================================================================" + for idx in range(0, m_databases.size()): + dump_text += m_databases[idx].dump() + dump_text += "====================================================================================" + + if(to_console): + print(dump_text) + + return dump_text diff --git a/addons/godot_db_manager/core/db_table.gd b/addons/godot_db_manager/core/db_table.gd index 2f25215..568ed23 100644 --- a/addons/godot_db_manager/core/db_table.gd +++ b/addons/godot_db_manager/core/db_table.gd @@ -122,7 +122,7 @@ func add_table_prop(prop_name : String, table_name : String) -> int : func link_tables_props() -> void : for idx in range(0, m_props.size()): var custom_prop_type = m_props[idx].get_prop_custom_type() - if(!custom_prop_type.empty()): + if(!custom_prop_type.is_empty()): var table = m_parent_database.get_table_by_name(custom_prop_type) m_props[idx].set_prop_type(gddb_types.e_prop_types_count + table.get_table_id()) m_props[idx].set_prop_custom_type("") @@ -396,7 +396,7 @@ func get_dictionary_at_row_idx(row_idx : int) -> Dictionary : dict[data_prop_name] = m_data[idx].get_data() prop_idx += 1 - if(dict.empty()): + if(dict.is_empty()): print("ERROR: GDDBDTable::get_data_at_row_idx(" + str(row_idx) + ") - invalid row index") return dict diff --git a/addons/godot_db_manager/data_label.gd b/addons/godot_db_manager/data_label.gd index 70b8c48..58992ca 100644 --- a/addons/godot_db_manager/data_label.gd +++ b/addons/godot_db_manager/data_label.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBDataLabel """ class_name GDDBDataLabel -tool extends Label signal resize_property @@ -27,7 +27,7 @@ func _input(event : InputEvent) -> void : var evLocal = $resize_ctrl.make_input_local(event) if event is InputEventMouseButton : - if(event.button_index == BUTTON_LEFT): + if(event.button_index == MOUSE_BUTTON_LEFT): if(event.pressed): var rect = Rect2(Vector2(0, 0), $resize_ctrl.get_size()) var inside = rect.has_point(evLocal.position) diff --git a/addons/godot_db_manager/data_label.tscn b/addons/godot_db_manager/data_label.tscn index f852b02..c5045a2 100644 --- a/addons/godot_db_manager/data_label.tscn +++ b/addons/godot_db_manager/data_label.tscn @@ -1,17 +1,17 @@ [gd_scene load_steps=5 format=2] [ext_resource path="res://addons/godot_db_manager/data_label.gd" type="Script" id=1] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="DynamicFont" id=2] -[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture" id=3] -[ext_resource path="res://addons/godot_db_manager/assets/tex/debug.png" type="Texture" id=4] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="FontFile" id=2] +[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture2D" id=3] +[ext_resource path="res://addons/godot_db_manager/assets/tex/debug.png" type="Texture2D" id=4] [node name="lbl" type="Label"] anchor_right = 0.167 -margin_right = -0.300018 -margin_bottom = 11.52 -rect_min_size = Vector2( 150, 32 ) +offset_right = -0.300018 +offset_bottom = 11.52 +custom_minimum_size = Vector2( 150, 32 ) mouse_filter = 0 -custom_fonts/font = ExtResource( 2 ) +theme_override_fonts/font = ExtResource( 2 ) text = "ID" valign = 1 script = ExtResource( 1 ) @@ -34,7 +34,7 @@ __meta__ = { anchor_left = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -3.0 +offset_left = -3.0 mouse_filter = 0 mouse_default_cursor_shape = 10 texture = ExtResource( 3 ) diff --git a/addons/godot_db_manager/db_editor.gd b/addons/godot_db_manager/db_editor.gd index df90a55..94e8b27 100644 --- a/addons/godot_db_manager/db_editor.gd +++ b/addons/godot_db_manager/db_editor.gd @@ -1,11 +1,11 @@ +@tool """ class GDDBEditor """ class_name GDDBEditor -tool -extends Tabs +extends TabBar var m_name = "" var m_database = null @@ -14,23 +14,23 @@ var m_filepath = "" # Called when the node enters the scene tree for the first time. func _ready() -> void : - set_tab_align(Tabs.ALIGN_LEFT) - set_tab_close_display_policy(Tabs.CLOSE_BUTTON_SHOW_ALWAYS) + set_tab_alignment(TabBar.ALIGN_LEFT) + set_tab_close_display_policy(TabBar.CLOSE_BUTTON_SHOW_ALWAYS) - $tables_list.connect("resize_tables_list", self, "on_resize_the_table_list") - $tables_list.connect("add_table", self, "on_add_table") - $tables_list.connect("edit_table_name", self, "on_edit_table") - $tables_list.connect("delete_table", self, "on_delete_table") - $tables_list.connect("select_table", self, "on_select_table") + $tables_list.connect("resize_tables_list", Callable(self, "on_resize_the_table_list")) + $tables_list.connect("add_table", Callable(self, "on_add_table")) + $tables_list.connect("edit_table_name", Callable(self, "on_edit_table")) + $tables_list.connect("delete_table", Callable(self, "on_delete_table")) + $tables_list.connect("select_table", Callable(self, "on_select_table")) - $table_editor.connect("set_dirty", self, "on_set_dirty") + $table_editor.connect("set_dirty", Callable(self, "on_set_dirty")) - $delete_table_dlg.connect("delete_table", self, "on_confirm_delete_table") + $delete_table_dlg.connect("delete_table", Callable(self, "on_confirm_delete_table")) - $new_table_dlg.connect("cancel_dialog", self, "on_close_new_table_dlg") - $new_table_dlg.get_close_button().connect("pressed", self, "on_close_new_table_dlg") + $new_table_dlg.connect("cancel_dialog", Callable(self, "on_close_new_table_dlg")) + $new_table_dlg.get_close_button().connect("pressed", Callable(self, "on_close_new_table_dlg")) - $error_dlg.connect("confirmed", self, "on_retry_create_table") + $error_dlg.connect("confirmed", Callable(self, "on_retry_create_table")) # resizing the tables list func on_resize_the_table_list(diff_x : float) -> void : @@ -56,7 +56,7 @@ func on_resize_the_table_list(diff_x : float) -> void : # overrides the member from base class func set_name(ctrl_name) -> void : m_name = ctrl_name - .set_name(ctrl_name) + super.set_name(ctrl_name) # sets the database; for easy access func set_database(db) -> void : @@ -92,9 +92,9 @@ func get_db_name() -> String : func set_dirty(dirty) -> void : if(dirty): var title = m_name + "*" - .set_name(title) + super.set_name(title) else: - .set_name(m_name) + super.set_name(m_name) # called when the user presses the "add_table" button from the "tables_list/tables_header" func on_add_table() -> void : @@ -102,13 +102,13 @@ func on_add_table() -> void : $new_table_dlg.set_dld_type(gddb_types.e_new_dlg_type_new) $new_table_dlg.set_table_id(gddb_constants.c_invalid_id) $new_table_dlg.set_init_name("") - $new_table_dlg.connect("create_new_table", self, "on_create_table") + $new_table_dlg.connect("create_new_table", Callable(self, "on_create_table")) $new_table_dlg.popup_centered() # called when the user accepts the name of the table in the "new_table_dlg" func on_create_table(table_name : String) -> void : # print("GDDBEditor::on_create_table(" + table_name + ")") - $new_table_dlg.disconnect("create_new_table", self, "on_create_table") + $new_table_dlg.disconnect("create_new_table", Callable(self, "on_create_table")) var table_id = m_database.add_table(table_name) if(table_id == gddb_constants.c_invalid_id): $error_dlg.set_text("Table with the name \"" + table_name + "\" already exists" ) @@ -132,7 +132,7 @@ func on_edit_table(table_id : int, table_name : String) -> void : $new_table_dlg.set_dld_type(gddb_types.e_new_dlg_type_edit) $new_table_dlg.set_table_id(table_id) $new_table_dlg.set_init_name(table_name) - $new_table_dlg.connect("create_new_table", self, "on_table_name_edited") + $new_table_dlg.connect("create_new_table", Callable(self, "on_table_name_edited")) $new_table_dlg.popup_centered() # gets called when canceling the new_table_dlg @@ -140,9 +140,9 @@ func on_close_new_table_dlg() -> void : # print("GDDBEditor::on_close_new_table_dlg()") var dlg_type = $new_table_dlg.get_dlg_type() if(dlg_type == gddb_types.e_new_dlg_type_new): - $new_table_dlg.disconnect("create_new_table", self, "on_create_table") + $new_table_dlg.disconnect("create_new_table", Callable(self, "on_create_table")) elif(dlg_type == gddb_types.e_new_dlg_type_edit): - $new_table_dlg.disconnect("create_new_table", self, "on_table_name_edited") + $new_table_dlg.disconnect("create_new_table", Callable(self, "on_table_name_edited")) # called when the user presses the "delete_table" from the "tables/list/table" func on_delete_table(table_id : int) -> void : @@ -155,7 +155,7 @@ func on_delete_table(table_id : int) -> void : # called when the user accepts the name of the table in the "new_table_dlg" func on_table_name_edited(table_name : String) -> void : # print("GDDBEditor::on_table_name_edited(" + table_name + ")") - $new_table_dlg.disconnect("create_new_table", self, "on_table_name_edited") + $new_table_dlg.disconnect("create_new_table", Callable(self, "on_table_name_edited")) var table_id = $new_table_dlg.get_table_id() if(!m_database.edit_table_name(table_name, table_id)): $error_dlg.set_text("Table with the name \"" + table_name + "\" already exists" ) @@ -198,7 +198,7 @@ func save_database() -> void: # returns true if the database can be saved, otherwise false func can_save_database() -> bool: - return !m_database.get_db_filepath().empty() + return !m_database.get_db_filepath().is_empty() # sets the database's path func set_database_filepath(filepath : String) -> void: diff --git a/addons/godot_db_manager/db_editor.tscn b/addons/godot_db_manager/db_editor.tscn index 9893d62..bf68af3 100644 --- a/addons/godot_db_manager/db_editor.tscn +++ b/addons/godot_db_manager/db_editor.tscn @@ -8,10 +8,10 @@ [ext_resource path="res://addons/godot_db_manager/dlgs/delete_table_dlg.tscn" type="PackedScene" id=6] [ext_resource path="res://addons/godot_db_manager/debug/dbg.tscn" type="PackedScene" id=7] -[node name="db_editor" type="Tabs"] +[node name="db_editor" type="TabBar"] anchor_right = 1.0 anchor_bottom = 1.0 -tab_align = 0 +tab_alignment = 0 tab_close_display_policy = 2 script = ExtResource( 1 ) __meta__ = { @@ -21,11 +21,11 @@ __meta__ = { [node name="tables_list" parent="." instance=ExtResource( 2 )] anchor_right = 0.0 -margin_right = 170.0 -rect_min_size = Vector2( 180, 30 ) +offset_right = 170.0 +custom_minimum_size = Vector2( 180, 30 ) [node name="table_editor" parent="." instance=ExtResource( 4 )] -margin_left = 181.0 +offset_left = 181.0 [node name="dbg" parent="." instance=ExtResource( 7 )] visible = false diff --git a/addons/godot_db_manager/db_interface.gd b/addons/godot_db_manager/db_interface.gd index 4e6a95f..fc1d2e6 100644 --- a/addons/godot_db_manager/db_interface.gd +++ b/addons/godot_db_manager/db_interface.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBInterface """ class_name GDDBInterface -tool extends Control var m_db_manager = null @@ -15,20 +15,20 @@ func _ready() -> void: m_db_manager = load(gddb_constants.c_addon_main_path + "core/db_man.gd").new() # menu connections - $dlg/menu.connect("new_database", self, "on_menu_new_database") - $dlg/menu.connect("load_database", self, "on_menu_load_database") - $dlg/menu.connect("save_database", self, "on_menu_save_database") - $dlg/menu.connect("save_database_as", self, "on_menu_save_database_as") + $dlg/menu.connect("new_database", Callable(self, "on_menu_new_database")) + $dlg/menu.connect("load_database", Callable(self, "on_menu_load_database")) + $dlg/menu.connect("save_database", Callable(self, "on_menu_save_database")) + $dlg/menu.connect("save_database_as", Callable(self, "on_menu_save_database_as")) # dialod notifications - $dlg.connect("about_to_show", self, "on_about_to_show") - $dlg.get_close_button().connect("pressed", self, "on_close") + $dlg.connect("about_to_popup", Callable(self, "on_about_to_show")) + $dlg.get_close_button().connect("pressed", Callable(self, "on_close")) # new database connections - $dlg/new_db_dlg.connect("create_new_db", self, "on_new_database") + $dlg/new_db_dlg.connect("create_new_db", Callable(self, "on_new_database")) # save / load connections - $dlg/load_db_dlg.connect("file_selected", self, "on_file_selected") + $dlg/load_db_dlg.connect("file_selected", Callable(self, "on_file_selected")) # Called when the node is about to be shown. func on_about_to_show() -> void : @@ -44,7 +44,7 @@ func on_menu_new_database() -> void: # called when loading a database from the menu func on_menu_load_database() -> void: - $dlg/load_db_dlg.set_mode(FileDialog.MODE_OPEN_FILE) + $dlg/load_db_dlg.set_mode(FileDialog.FILE_MODE_OPEN_FILE) $dlg/load_db_dlg.set_title("Load Database ...") $dlg/load_db_dlg.set_current_file("") $dlg/load_db_dlg.popup_centered() @@ -61,7 +61,7 @@ func on_menu_save_database() -> void: # called when saving a database as another from the menu func on_menu_save_database_as(): # print("on_menu_save_database_as") - $dlg/load_db_dlg.set_mode(FileDialog.MODE_SAVE_FILE) + $dlg/load_db_dlg.set_mode(FileDialog.FILE_MODE_SAVE_FILE) $dlg/load_db_dlg.set_title("Save Database As ...") var currnet_tab = $dlg/databases.get_current_tab_control() @@ -81,7 +81,7 @@ func on_new_database(db_name : String) -> void: var db = m_db_manager.get_db_by_id(db_id) # print("new DB added: " + str(db)) - var db_editor = load(gddb_constants.c_addon_main_path + "db_editor.tscn").instance() + var db_editor = load(gddb_constants.c_addon_main_path + "db_editor.tscn").instantiate() $dlg/databases.add_child(db_editor) db_editor.set_name(db_name) db.set_dirty(true) @@ -96,7 +96,7 @@ func on_new_database(db_name : String) -> void: func on_file_selected(filepath : String) -> void: # print("GDDBInterface::on_file_selected(" + filepath + ")") - if($dlg/load_db_dlg.get_mode() == FileDialog.MODE_SAVE_FILE): + if($dlg/load_db_dlg.get_mode() == FileDialog.FILE_MODE_SAVE_FILE): var filepath_low = filepath.to_lower() # check for the file extension @@ -117,7 +117,7 @@ func on_file_selected(filepath : String) -> void: save_database_as(filepath) - elif($dlg/load_db_dlg.get_mode() == FileDialog.MODE_OPEN_FILE): + elif($dlg/load_db_dlg.get_mode() == FileDialog.FILE_MODE_OPEN_FILE): load_database(filepath) # saves a database to a given file path @@ -144,7 +144,7 @@ func load_database(filepath : String) -> void: db.set_dirty(false) # print("new DB added: " + str(db)) - var db_editor = load(gddb_constants.c_addon_main_path + "db_editor.tscn").instance() + var db_editor = load(gddb_constants.c_addon_main_path + "db_editor.tscn").instantiate() $dlg/databases.add_child(db_editor) db_editor.set_name(db.get_db_name()) db_editor.set_database(db) diff --git a/addons/godot_db_manager/db_interface.tscn b/addons/godot_db_manager/db_interface.tscn index 1f37fd7..02e46d2 100644 --- a/addons/godot_db_manager/db_interface.tscn +++ b/addons/godot_db_manager/db_interface.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=7 format=2] [ext_resource path="res://addons/godot_db_manager/debug/dbg.tscn" type="PackedScene" id=1] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="DynamicFont" id=2] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="FontFile" id=2] [ext_resource path="res://addons/godot_db_manager/dlgs/error_dlg.tscn" type="PackedScene" id=3] [ext_resource path="res://addons/godot_db_manager/db_interface.gd" type="Script" id=4] [ext_resource path="res://addons/godot_db_manager/dlgs/new_db_dlg.tscn" type="PackedScene" id=5] @@ -14,11 +14,11 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="dlg" type="WindowDialog" parent="."] +[node name="dlg" type="Window" parent="."] visible = true -margin_right = 1147.0 -margin_bottom = 768.0 -popup_exclusive = true +offset_right = 1147.0 +offset_bottom = 768.0 +exclusive = true window_title = "Godot Database Manager" resizable = true __meta__ = { @@ -30,9 +30,9 @@ __meta__ = { [node name="databases" type="TabContainer" parent="dlg"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_top = 30.0 -custom_fonts/font = ExtResource( 2 ) -tab_align = 0 +offset_top = 30.0 +theme_override_fonts/font = ExtResource( 2 ) +tab_alignment = 0 drag_to_rearrange_enabled = true __meta__ = { "_edit_use_anchors_": false @@ -40,23 +40,23 @@ __meta__ = { [node name="new_db_dlg" parent="dlg" instance=ExtResource( 5 )] visible = false -margin_right = 3.832 +offset_right = 3.832 [node name="error_dlg" parent="dlg" instance=ExtResource( 3 )] visible = false anchor_right = 0.187 anchor_bottom = 0.136 -margin_right = 0.469986 -margin_bottom = -0.0800018 +offset_right = 0.469986 +offset_bottom = -0.0800018 [node name="load_db_dlg" type="FileDialog" parent="dlg"] anchor_right = 0.349 anchor_bottom = 0.418 -margin_right = -0.309998 -margin_bottom = 0.209991 +offset_right = -0.309998 +offset_bottom = 0.209991 window_title = "Open a File" mode = 0 -filters = PoolStringArray( "*.json" ) +filters = PackedStringArray( "*.json" ) __meta__ = { "_edit_use_anchors_": false } diff --git a/addons/godot_db_manager/db_manager.gd b/addons/godot_db_manager/db_manager.gd index 17c29ea..9e31374 100644 --- a/addons/godot_db_manager/db_manager.gd +++ b/addons/godot_db_manager/db_manager.gd @@ -1,33 +1,33 @@ -""" -class GDDBManager -""" - -class_name GDDBManager - -tool -extends EditorPlugin - -var DBInterface = preload("./db_interface.tscn") -var db_interface : Node - -func _enter_tree(): - add_autoload_singleton("gddb_constants", "res://addons/godot_db_manager/core/GDDBConstants.gd") - add_autoload_singleton("gddb_types", "res://addons/godot_db_manager/core/GDDBTypes.gd") - add_autoload_singleton("gddb_globals", "res://addons/godot_db_manager/core/GDDBGlobals.gd") - - # Initialization of the plugin goes here - db_interface = DBInterface.instance() - - get_editor_interface().get_base_control().add_child(db_interface) - add_tool_menu_item("Godot Database Manager", self, "open_config") - -func _exit_tree(): - # Clean-up of the plugin goes here - remove_tool_menu_item("Godot Database Manager") - if(db_interface): - db_interface.queue_free() - -func open_config(UD): - var window = db_interface.get_node("dlg") as WindowDialog - if(window): - window.popup_centered() +@tool +""" +class GDDBManager +""" + +class_name GDDBManager + +extends EditorPlugin + +var DBInterface = preload("./db_interface.tscn") +var db_interface : Node + +func _enter_tree(): + add_autoload_singleton("gddb_constants", "res://addons/godot_db_manager/core/GDDBConstants.gd") + add_autoload_singleton("gddb_types", "res://addons/godot_db_manager/core/GDDBTypes.gd") + add_autoload_singleton("gddb_globals", "res://addons/godot_db_manager/core/GDDBGlobals.gd") + + # Initialization of the plugin goes here + db_interface = DBInterface.instantiate() + + get_editor_interface().get_base_control().add_child(db_interface) + add_tool_menu_item("Godot Database Manager", self, "open_config") + +func _exit_tree(): + # Clean-up of the plugin goes here + remove_tool_menu_item("Godot Database Manager") + if(db_interface): + db_interface.queue_free() + +func open_config(UD): + var window = db_interface.get_node("dlg") as Window + if(window): + window.popup_centered() diff --git a/addons/godot_db_manager/debug/dbg.tscn b/addons/godot_db_manager/debug/dbg.tscn index 77e6b25..db539e9 100644 --- a/addons/godot_db_manager/debug/dbg.tscn +++ b/addons/godot_db_manager/debug/dbg.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://addons/godot_db_manager/assets/tex/debug.png" type="Texture" id=1] +[ext_resource path="res://addons/godot_db_manager/assets/tex/debug.png" type="Texture2D" id=1] [node name="dbg" type="Control"] anchor_right = 1.0 @@ -11,14 +11,14 @@ __meta__ = { } [node name="1" type="Control" parent="."] -margin_right = 40.0 -margin_bottom = 40.0 +offset_right = 40.0 +offset_bottom = 40.0 mouse_filter = 2 __meta__ = { "_edit_use_anchors_": false } -[node name="Sprite" type="Sprite" parent="1"] +[node name="Sprite2D" type="Sprite2D" parent="1"] scale = Vector2( 4, 4 ) texture = ExtResource( 1 ) centered = false @@ -28,14 +28,14 @@ region_rect = Rect2( 2, 50, 10, 10 ) [node name="2" type="Control" parent="."] anchor_left = 1.0 anchor_right = 1.0 -margin_left = -40.0 -margin_bottom = 40.0 +offset_left = -40.0 +offset_bottom = 40.0 mouse_filter = 2 __meta__ = { "_edit_use_anchors_": false } -[node name="Sprite" type="Sprite" parent="2"] +[node name="Sprite2D" type="Sprite2D" parent="2"] scale = Vector2( 4, 4 ) texture = ExtResource( 1 ) centered = false @@ -45,14 +45,14 @@ region_rect = Rect2( 2, 50, 10, 10 ) [node name="3" type="Control" parent="."] anchor_top = 1.0 anchor_bottom = 1.0 -margin_top = -40.0 -margin_right = 40.0 +offset_top = -40.0 +offset_right = 40.0 mouse_filter = 2 __meta__ = { "_edit_use_anchors_": false } -[node name="Sprite" type="Sprite" parent="3"] +[node name="Sprite2D" type="Sprite2D" parent="3"] scale = Vector2( 4, 4 ) texture = ExtResource( 1 ) centered = false @@ -64,14 +64,14 @@ anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -40.0 -margin_top = -40.0 +offset_left = -40.0 +offset_top = -40.0 mouse_filter = 2 __meta__ = { "_edit_use_anchors_": false } -[node name="Sprite" type="Sprite" parent="4"] +[node name="Sprite2D" type="Sprite2D" parent="4"] scale = Vector2( 4, 4 ) texture = ExtResource( 1 ) centered = false diff --git a/addons/godot_db_manager/dlgs/data_dlg.gd b/addons/godot_db_manager/dlgs/data_dlg.gd index 22309ea..8d3b681 100644 --- a/addons/godot_db_manager/dlgs/data_dlg.gd +++ b/addons/godot_db_manager/dlgs/data_dlg.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBDataPanel """ class_name GDDBDataPanel -tool extends PopupPanel signal select_data @@ -16,8 +16,8 @@ var m_table = null # Called when the node enters the scene tree for the first time. func _ready(): - connect("about_to_show", self, "on_about_to_show") - $ItemList.connect("item_selected", self, "on_item_selected") + connect("about_to_popup", Callable(self, "on_about_to_show")) + $ItemList.connect("item_selected", Callable(self, "on_item_selected")) # sets property id func set_prop_id(prop_id : int) -> void : diff --git a/addons/godot_db_manager/dlgs/data_dlg.tscn b/addons/godot_db_manager/dlgs/data_dlg.tscn index 803dcaf..d6cc3de 100644 --- a/addons/godot_db_manager/dlgs/data_dlg.tscn +++ b/addons/godot_db_manager/dlgs/data_dlg.tscn @@ -1,25 +1,25 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://addons/godot_db_manager/dlgs/data_dlg.gd" type="Script" id=1] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="DynamicFont" id=2] - -[node name="data_dlg" type="PopupPanel"] -anchor_right = 0.285625 -anchor_bottom = 0.351111 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ItemList" type="ItemList" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 4.0 -margin_right = -4.0 -margin_bottom = -4.0 -custom_fonts/font = ExtResource( 2 ) -items = [ "ababab", null, false, "cdcdcd", null, false, "efefef", null, false ] -__meta__ = { -"_edit_use_anchors_": false -} +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://addons/godot_db_manager/dlgs/data_dlg.gd" type="Script" id=1] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="FontFile" id=2] + +[node name="data_dlg" type="PopupPanel"] +anchor_right = 0.285625 +anchor_bottom = 0.351111 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ItemList" type="ItemList" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 4.0 +offset_top = 4.0 +offset_right = -4.0 +offset_bottom = -4.0 +theme_override_fonts/font = ExtResource( 2 ) +items = [ "ababab", null, false, "cdcdcd", null, false, "efefef", null, false ] +__meta__ = { +"_edit_use_anchors_": false +} diff --git a/addons/godot_db_manager/dlgs/delete_prop_dlg.gd b/addons/godot_db_manager/dlgs/delete_prop_dlg.gd index cd80523..925e921 100644 --- a/addons/godot_db_manager/dlgs/delete_prop_dlg.gd +++ b/addons/godot_db_manager/dlgs/delete_prop_dlg.gd @@ -1,41 +1,41 @@ -""" -class GDDBDeletePropDlg -""" - -class_name GDDBDeletePropDlg - -tool -extends WindowDialog - -signal delete_prop - -var m_prop_id = gddb_constants.c_invalid_id - -# Called when the node enters the scene tree for the first time. -func _ready() -> void : - $v_layout/buttons/ok_btn.connect("pressed", self, "on_ok_btn_pressed") - $v_layout/buttons/cancel_btn.connect("pressed", self, "on_cancel_btn_pressed") - -# sets the property id -func set_prop_id(prop_id : int) -> void : - m_prop_id = prop_id - -# returns the property id -func get_prop_id() -> int : - return m_prop_id - -func set_prop_name(prop_name : String) -> void: - var text = "Delete property with name \"" + prop_name + "\" ?" - $v_layout/prop_info/prop_lbl.set_text(text) - -# returns the table id -func get_table_id() -> int : - return m_prop_id - -# called when the OK button is pressed -func on_ok_btn_pressed() -> void : - emit_signal("delete_prop") - hide() - -func on_cancel_btn_pressed() -> void: - hide() +@tool +""" +class GDDBDeletePropDlg +""" + +class_name GDDBDeletePropDlg + +extends Window + +signal delete_prop + +var m_prop_id = gddb_constants.c_invalid_id + +# Called when the node enters the scene tree for the first time. +func _ready() -> void : + $v_layout/buttons/ok_btn.connect("pressed", Callable(self, "on_ok_btn_pressed")) + $v_layout/buttons/cancel_btn.connect("pressed", Callable(self, "on_cancel_btn_pressed")) + +# sets the property id +func set_prop_id(prop_id : int) -> void : + m_prop_id = prop_id + +# returns the property id +func get_prop_id() -> int : + return m_prop_id + +func set_prop_name(prop_name : String) -> void: + var text = "Delete property with name \"" + prop_name + "\" ?" + $v_layout/prop_info/prop_lbl.set_text(text) + +# returns the table id +func get_table_id() -> int : + return m_prop_id + +# called when the OK button is pressed +func on_ok_btn_pressed() -> void : + emit_signal("delete_prop") + hide() + +func on_cancel_btn_pressed() -> void: + hide() diff --git a/addons/godot_db_manager/dlgs/delete_prop_dlg.tscn b/addons/godot_db_manager/dlgs/delete_prop_dlg.tscn index 30a69a2..7f3e263 100644 --- a/addons/godot_db_manager/dlgs/delete_prop_dlg.tscn +++ b/addons/godot_db_manager/dlgs/delete_prop_dlg.tscn @@ -1,66 +1,66 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://addons/godot_db_manager/dlgs/delete_prop_dlg.gd" type="Script" id=1] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_14.tres" type="DynamicFont" id=2] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="DynamicFont" id=3] - -[node name="delete_prop_dlg" type="WindowDialog"] -visible = true -anchor_right = 0.257 -anchor_bottom = 0.084 -margin_right = 0.799988 -margin_bottom = 0.399994 -focus_next = NodePath("v_layout/buttons/ok_btn") -focus_mode = 1 -custom_fonts/title_font = ExtResource( 2 ) -popup_exclusive = true -window_title = "Delete property" -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="v_layout" type="VBoxContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -custom_constants/separation = 10 -alignment = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="prop_info" type="HBoxContainer" parent="v_layout"] -margin_top = 13.0 -margin_right = 412.0 -margin_bottom = 30.0 -alignment = 1 - -[node name="prop_lbl" type="Label" parent="v_layout/prop_info"] -margin_left = 152.0 -margin_right = 259.0 -margin_bottom = 17.0 -custom_fonts/font = ExtResource( 2 ) -text = "Property name: " - -[node name="buttons" type="HBoxContainer" parent="v_layout"] -margin_top = 40.0 -margin_right = 412.0 -margin_bottom = 61.0 -custom_constants/separation = 50 -alignment = 1 - -[node name="ok_btn" type="Button" parent="v_layout/buttons"] -margin_left = 81.0 -margin_right = 181.0 -margin_bottom = 21.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 3 ) -text = "OK" - -[node name="cancel_btn" type="Button" parent="v_layout/buttons"] -margin_left = 231.0 -margin_right = 331.0 -margin_bottom = 21.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 3 ) -text = "Cancel" +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://addons/godot_db_manager/dlgs/delete_prop_dlg.gd" type="Script" id=1] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_14.tres" type="FontFile" id=2] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="FontFile" id=3] + +[node name="delete_prop_dlg" type="Window"] +visible = true +anchor_right = 0.257 +anchor_bottom = 0.084 +offset_right = 0.799988 +offset_bottom = 0.399994 +focus_next = NodePath("v_layout/buttons/ok_btn") +focus_mode = 1 +theme_override_fonts/title_font = ExtResource( 2 ) +exclusive = true +window_title = "Delete property" +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="v_layout" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme_override_constants/separation = 10 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="prop_info" type="HBoxContainer" parent="v_layout"] +offset_top = 13.0 +offset_right = 412.0 +offset_bottom = 30.0 +alignment = 1 + +[node name="prop_lbl" type="Label" parent="v_layout/prop_info"] +offset_left = 152.0 +offset_right = 259.0 +offset_bottom = 17.0 +theme_override_fonts/font = ExtResource( 2 ) +text = "Property name: " + +[node name="buttons" type="HBoxContainer" parent="v_layout"] +offset_top = 40.0 +offset_right = 412.0 +offset_bottom = 61.0 +theme_override_constants/separation = 50 +alignment = 1 + +[node name="ok_btn" type="Button" parent="v_layout/buttons"] +offset_left = 81.0 +offset_right = 181.0 +offset_bottom = 21.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 3 ) +text = "OK" + +[node name="cancel_btn" type="Button" parent="v_layout/buttons"] +offset_left = 231.0 +offset_right = 331.0 +offset_bottom = 21.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 3 ) +text = "Cancel" diff --git a/addons/godot_db_manager/dlgs/delete_table_dlg.gd b/addons/godot_db_manager/dlgs/delete_table_dlg.gd index bc8c003..c841510 100644 --- a/addons/godot_db_manager/dlgs/delete_table_dlg.gd +++ b/addons/godot_db_manager/dlgs/delete_table_dlg.gd @@ -1,37 +1,37 @@ -""" -class GDDBDeleteTableDlg -""" - -class_name GDDBDeleteTableDlg - -tool -extends WindowDialog - -signal delete_table - -var m_table_id = gddb_constants.c_invalid_id - -# Called when the node enters the scene tree for the first time. -func _ready(): - $v_layout/buttons/ok_btn.connect("pressed", self, "on_ok_btn_pressed") - $v_layout/buttons/cancel_btn.connect("pressed", self, "on_cancel_btn_pressed") - -# sets the table id -func set_table_id(table_id : int) -> void: - m_table_id = table_id - -func set_table_name(table_name : String) -> void: - var text = "Delete table with name \"" + table_name + "\" ?" - $v_layout/table_info/table_lbl.set_text(text) - -# returns the table id -func get_table_id() -> int: - return m_table_id - -# called when the OK button is pressed -func on_ok_btn_pressed() -> void: - emit_signal("delete_table") - hide() - -func on_cancel_btn_pressed() -> void: - hide() +@tool +""" +class GDDBDeleteTableDlg +""" + +class_name GDDBDeleteTableDlg + +extends Window + +signal delete_table + +var m_table_id = gddb_constants.c_invalid_id + +# Called when the node enters the scene tree for the first time. +func _ready(): + $v_layout/buttons/ok_btn.connect("pressed", Callable(self, "on_ok_btn_pressed")) + $v_layout/buttons/cancel_btn.connect("pressed", Callable(self, "on_cancel_btn_pressed")) + +# sets the table id +func set_table_id(table_id : int) -> void: + m_table_id = table_id + +func set_table_name(table_name : String) -> void: + var text = "Delete table with name \"" + table_name + "\" ?" + $v_layout/table_info/table_lbl.set_text(text) + +# returns the table id +func get_table_id() -> int: + return m_table_id + +# called when the OK button is pressed +func on_ok_btn_pressed() -> void: + emit_signal("delete_table") + hide() + +func on_cancel_btn_pressed() -> void: + hide() diff --git a/addons/godot_db_manager/dlgs/delete_table_dlg.tscn b/addons/godot_db_manager/dlgs/delete_table_dlg.tscn index bbef72e..685435c 100644 --- a/addons/godot_db_manager/dlgs/delete_table_dlg.tscn +++ b/addons/godot_db_manager/dlgs/delete_table_dlg.tscn @@ -1,66 +1,66 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://addons/godot_db_manager/dlgs/delete_table_dlg.gd" type="Script" id=1] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_14.tres" type="DynamicFont" id=2] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="DynamicFont" id=3] - -[node name="delete_table_dlg" type="WindowDialog"] -visible = true -anchor_right = 0.257 -anchor_bottom = 0.084 -margin_right = 0.799988 -margin_bottom = 0.399994 -focus_next = NodePath("v_layout/buttons/ok_btn") -focus_mode = 1 -custom_fonts/title_font = ExtResource( 2 ) -popup_exclusive = true -window_title = "Delete table" -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="v_layout" type="VBoxContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -custom_constants/separation = 10 -alignment = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="table_info" type="HBoxContainer" parent="v_layout"] -margin_top = 13.0 -margin_right = 412.0 -margin_bottom = 30.0 -alignment = 1 - -[node name="table_lbl" type="Label" parent="v_layout/table_info"] -margin_left = 162.0 -margin_right = 249.0 -margin_bottom = 17.0 -custom_fonts/font = ExtResource( 2 ) -text = "Table name: " - -[node name="buttons" type="HBoxContainer" parent="v_layout"] -margin_top = 40.0 -margin_right = 412.0 -margin_bottom = 61.0 -custom_constants/separation = 50 -alignment = 1 - -[node name="ok_btn" type="Button" parent="v_layout/buttons"] -margin_left = 81.0 -margin_right = 181.0 -margin_bottom = 21.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 3 ) -text = "OK" - -[node name="cancel_btn" type="Button" parent="v_layout/buttons"] -margin_left = 231.0 -margin_right = 331.0 -margin_bottom = 21.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 3 ) -text = "Cancel" +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://addons/godot_db_manager/dlgs/delete_table_dlg.gd" type="Script" id=1] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_14.tres" type="FontFile" id=2] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="FontFile" id=3] + +[node name="delete_table_dlg" type="Window"] +visible = true +anchor_right = 0.257 +anchor_bottom = 0.084 +offset_right = 0.799988 +offset_bottom = 0.399994 +focus_next = NodePath("v_layout/buttons/ok_btn") +focus_mode = 1 +theme_override_fonts/title_font = ExtResource( 2 ) +exclusive = true +window_title = "Delete table" +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="v_layout" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme_override_constants/separation = 10 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="table_info" type="HBoxContainer" parent="v_layout"] +offset_top = 13.0 +offset_right = 412.0 +offset_bottom = 30.0 +alignment = 1 + +[node name="table_lbl" type="Label" parent="v_layout/table_info"] +offset_left = 162.0 +offset_right = 249.0 +offset_bottom = 17.0 +theme_override_fonts/font = ExtResource( 2 ) +text = "Table name: " + +[node name="buttons" type="HBoxContainer" parent="v_layout"] +offset_top = 40.0 +offset_right = 412.0 +offset_bottom = 61.0 +theme_override_constants/separation = 50 +alignment = 1 + +[node name="ok_btn" type="Button" parent="v_layout/buttons"] +offset_left = 81.0 +offset_right = 181.0 +offset_bottom = 21.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 3 ) +text = "OK" + +[node name="cancel_btn" type="Button" parent="v_layout/buttons"] +offset_left = 231.0 +offset_right = 331.0 +offset_bottom = 21.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 3 ) +text = "Cancel" diff --git a/addons/godot_db_manager/dlgs/edit_string_dlg.gd b/addons/godot_db_manager/dlgs/edit_string_dlg.gd index b313aeb..5a81399 100644 --- a/addons/godot_db_manager/dlgs/edit_string_dlg.gd +++ b/addons/godot_db_manager/dlgs/edit_string_dlg.gd @@ -1,59 +1,59 @@ -""" -class GDDBEditStringDlg -""" - -class_name GDDBEditStringDlg - -tool -extends WindowDialog - -signal string_edited - -var m_prop_id = gddb_constants.c_invalid_id -var m_row_idx = gddb_constants.c_invalid_id -var m_data_text = "" - -# Called when the node enters the scene tree for the first time. -func _ready(): - $v_layout/btns/ok_btn.connect("pressed", self, "on_ok_btn_pressed") - $v_layout/btns/cancel_btn.connect("pressed", self, "on_cancel_btn_pressed") - - $v_layout/text.connect("text_changed", self, "on_text_changed") - -# sets property id -func set_prop_id(prop_id : int) -> void: - m_prop_id = prop_id - -# returns property id -func get_prop_id() -> int : - return m_prop_id - -# sets row index -func set_row_idx(row_idx : int) -> void : - m_row_idx = row_idx - -# returns row index -func get_row_idx() -> int : - return m_row_idx - -# sets data text -func set_data_text(text : String) -> void : - m_data_text = text - $v_layout/text.set_text(text) - -# returns data text -func get_data_text() -> String : - return m_data_text - -# Called when the OK button is pressed -func on_ok_btn_pressed() -> void : - emit_signal("string_edited") - hide() - -# Called when the Cancel button is pressed -func on_cancel_btn_pressed() -> void : - hide() - -# Called when text is changed -func on_text_changed() -> void: - m_data_text = $v_layout/text.get_text() +@tool +""" +class GDDBEditStringDlg +""" + +class_name GDDBEditStringDlg + +extends Window + +signal string_edited + +var m_prop_id = gddb_constants.c_invalid_id +var m_row_idx = gddb_constants.c_invalid_id +var m_data_text = "" + +# Called when the node enters the scene tree for the first time. +func _ready(): + $v_layout/btns/ok_btn.connect("pressed", Callable(self, "on_ok_btn_pressed")) + $v_layout/btns/cancel_btn.connect("pressed", Callable(self, "on_cancel_btn_pressed")) + + $v_layout/text.connect("text_changed", Callable(self, "on_text_changed")) + +# sets property id +func set_prop_id(prop_id : int) -> void: + m_prop_id = prop_id + +# returns property id +func get_prop_id() -> int : + return m_prop_id + +# sets row index +func set_row_idx(row_idx : int) -> void : + m_row_idx = row_idx + +# returns row index +func get_row_idx() -> int : + return m_row_idx + +# sets data text +func set_data_text(text : String) -> void : + m_data_text = text + $v_layout/text.set_text(text) + +# returns data text +func get_data_text() -> String : + return m_data_text + +# Called when the OK button is pressed +func on_ok_btn_pressed() -> void : + emit_signal("string_edited") + hide() + +# Called when the Cancel button is pressed +func on_cancel_btn_pressed() -> void : + hide() + +# Called when text is changed +func on_text_changed() -> void: + m_data_text = $v_layout/text.get_text() diff --git a/addons/godot_db_manager/dlgs/edit_string_dlg.tscn b/addons/godot_db_manager/dlgs/edit_string_dlg.tscn index 9e500a3..4937df4 100644 --- a/addons/godot_db_manager/dlgs/edit_string_dlg.tscn +++ b/addons/godot_db_manager/dlgs/edit_string_dlg.tscn @@ -1,60 +1,60 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://addons/godot_db_manager/dlgs/edit_string_dlg.gd" type="Script" id=1] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_14.tres" type="DynamicFont" id=2] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="DynamicFont" id=3] - -[node name="edit_string_dlg" type="WindowDialog"] -anchor_right = 0.430625 -anchor_bottom = 0.423333 -focus_next = NodePath("v_layout/text") -custom_fonts/title_font = ExtResource( 3 ) -window_title = "Edit string" -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": true -} - -[node name="v_layout" type="VBoxContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="edit_text_btns" type="HBoxContainer" parent="v_layout"] -margin_right = 689.0 -margin_bottom = 30.0 -rect_min_size = Vector2( 0, 30 ) - -[node name="text" type="TextEdit" parent="v_layout"] -margin_top = 34.0 -margin_right = 689.0 -margin_bottom = 334.0 -rect_min_size = Vector2( 0, 300 ) -custom_fonts/font = ExtResource( 2 ) -caret_blink = true - -[node name="btns" type="HBoxContainer" parent="v_layout"] -margin_top = 338.0 -margin_right = 689.0 -margin_bottom = 368.0 -rect_min_size = Vector2( 0, 30 ) -custom_constants/separation = 200 -alignment = 1 - -[node name="ok_btn" type="Button" parent="v_layout/btns"] -margin_left = 144.0 -margin_right = 244.0 -margin_bottom = 30.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 3 ) -text = "OK" - -[node name="cancel_btn" type="Button" parent="v_layout/btns"] -margin_left = 444.0 -margin_right = 544.0 -margin_bottom = 30.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 3 ) -text = "Cancel" +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://addons/godot_db_manager/dlgs/edit_string_dlg.gd" type="Script" id=1] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_14.tres" type="FontFile" id=2] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="FontFile" id=3] + +[node name="edit_string_dlg" type="Window"] +anchor_right = 0.430625 +anchor_bottom = 0.423333 +focus_next = NodePath("v_layout/text") +theme_override_fonts/title_font = ExtResource( 3 ) +window_title = "Edit string" +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": true +} + +[node name="v_layout" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="edit_text_btns" type="HBoxContainer" parent="v_layout"] +offset_right = 689.0 +offset_bottom = 30.0 +custom_minimum_size = Vector2( 0, 30 ) + +[node name="text" type="TextEdit" parent="v_layout"] +offset_top = 34.0 +offset_right = 689.0 +offset_bottom = 334.0 +custom_minimum_size = Vector2( 0, 300 ) +theme_override_fonts/font = ExtResource( 2 ) +caret_blink = true + +[node name="btns" type="HBoxContainer" parent="v_layout"] +offset_top = 338.0 +offset_right = 689.0 +offset_bottom = 368.0 +custom_minimum_size = Vector2( 0, 30 ) +theme_override_constants/separation = 200 +alignment = 1 + +[node name="ok_btn" type="Button" parent="v_layout/btns"] +offset_left = 144.0 +offset_right = 244.0 +offset_bottom = 30.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 3 ) +text = "OK" + +[node name="cancel_btn" type="Button" parent="v_layout/btns"] +offset_left = 444.0 +offset_right = 544.0 +offset_bottom = 30.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 3 ) +text = "Cancel" diff --git a/addons/godot_db_manager/dlgs/error_dlg.tscn b/addons/godot_db_manager/dlgs/error_dlg.tscn index 803123f..e3700dd 100644 --- a/addons/godot_db_manager/dlgs/error_dlg.tscn +++ b/addons/godot_db_manager/dlgs/error_dlg.tscn @@ -1,11 +1,11 @@ -[gd_scene format=2] - -[node name="error_dlg" type="AcceptDialog"] -visible = true -anchor_right = 0.139 -anchor_bottom = 0.099 -margin_right = 0.599976 -margin_bottom = -0.100006 -popup_exclusive = true -window_title = "Error" -dialog_autowrap = true +[gd_scene format=2] + +[node name="error_dlg" type="AcceptDialog"] +visible = true +anchor_right = 0.139 +anchor_bottom = 0.099 +offset_right = 0.599976 +offset_bottom = -0.100006 +exclusive = true +window_title = "Error" +dialog_autowrap = true diff --git a/addons/godot_db_manager/dlgs/load_res_path_dlg.gd b/addons/godot_db_manager/dlgs/load_res_path_dlg.gd index bff2f55..5a7f908 100644 --- a/addons/godot_db_manager/dlgs/load_res_path_dlg.gd +++ b/addons/godot_db_manager/dlgs/load_res_path_dlg.gd @@ -1,76 +1,76 @@ -""" -class GDDBLoadResourcePathDlg -""" - -class_name GDDBLoadResourcePathDlg - -tool -extends FileDialog - -# TODO: put this list in a config file -const file_filters = [ - # Godot resource file types - "*.res, *.tres ; Godot resource file types", - - # Godot scene files - "*.scn, *.tscn, *escn ; Godot scene file types", - - # Code file types - "*.gd, *.cs, *.h, *.c, *.hpp, *.cpp ; Code file types", - - # Shader file types - "*.shader ; Shader file types", - - # material file types - "*.mat ; Material file types", - - # mesh file types - "*.dae, *.gltf, *.obj, *.fbx ; Mesh file types", - - # animation file types - "*.anim ; Animation file types", - - # font file types - "*.ttf, *.otf ; Font file types", - - # image file types - "*.png, *.jpg, *.jpeg, *.tiff, *.tga, *.bmp, *.webp, *.gif, *.hdr ; Images file types", - - # soung file types - "*.snd, *.wav, *.ogg, *.mp3 ; Sound file types", - - # video file types - "*.ogg, *.mpg, *.mpeg, *.avi, *.mov, *.mp4, *.webm ; Video file types", - - # text file types - "*.txt, *.csv, *.json, *.xml, *.cfg, *.ini ; Text file types", - - # document file types - "*.doc, *.docx, *.xls, *.xlsx, *.odt, *.ods, *.pdf ; Doc file types", - - # binary data file types - "*.dat, *.raw ; Binary data file types" -] - -var m_prop_id = gddb_constants.c_invalid_id -var m_row_idx = gddb_constants.c_invalid_id - -# Called when the node enters the scene tree for the first time. -func _ready(): - set_filters(PoolStringArray(file_filters)) - -# sets the property id -func set_prop_id(prop_id : int) -> void : - m_prop_id = prop_id - -# returns the property id -func get_prop_id() -> int : - return m_prop_id - -# sets the row index -func set_row_idx(row_idx : int) -> void : - m_row_idx = row_idx - -# returns the row index -func get_row_idx() -> int : - return m_row_idx +@tool +""" +class GDDBLoadResourcePathDlg +""" + +class_name GDDBLoadResourcePathDlg + +extends FileDialog + +# TODO: put this list in a config file +const file_filters = [ + # Godot resource file types + "*.res, *.tres ; Godot resource file types", + + # Godot scene files + "*.scn, *.tscn, *escn ; Godot scene file types", + + # Code file types + "*.gd, *.cs, *.h, *.c, *.hpp, *.cpp ; Code file types", + + # Shader file types + "*.shader ; Shader file types", + + # material file types + "*.mat ; Material file types", + + # mesh file types + "*.dae, *.gltf, *.obj, *.fbx ; Mesh file types", + + # animation file types + "*.anim ; Animation file types", + + # font file types + "*.ttf, *.otf ; Font file types", + + # image file types + "*.png, *.jpg, *.jpeg, *.tiff, *.tga, *.bmp, *.webp, *.gif, *.hdr ; Images file types", + + # soung file types + "*.snd, *.wav, *.ogg, *.mp3 ; Sound file types", + + # video file types + "*.ogg, *.mpg, *.mpeg, *.avi, *.mov, *.mp4, *.webm ; Video file types", + + # text file types + "*.txt, *.csv, *.json, *.xml, *.cfg, *.ini ; Text file types", + + # document file types + "*.doc, *.docx, *.xls, *.xlsx, *.odt, *.ods, *.pdf ; Doc file types", + + # binary data file types + "*.dat, *.raw ; Binary data file types" +] + +var m_prop_id = gddb_constants.c_invalid_id +var m_row_idx = gddb_constants.c_invalid_id + +# Called when the node enters the scene tree for the first time. +func _ready(): + set_filters(PackedStringArray(file_filters)) + +# sets the property id +func set_prop_id(prop_id : int) -> void : + m_prop_id = prop_id + +# returns the property id +func get_prop_id() -> int : + return m_prop_id + +# sets the row index +func set_row_idx(row_idx : int) -> void : + m_row_idx = row_idx + +# returns the row index +func get_row_idx() -> int : + return m_row_idx diff --git a/addons/godot_db_manager/dlgs/load_res_path_dlg.tscn b/addons/godot_db_manager/dlgs/load_res_path_dlg.tscn index 2d2e1e8..4f6444b 100644 --- a/addons/godot_db_manager/dlgs/load_res_path_dlg.tscn +++ b/addons/godot_db_manager/dlgs/load_res_path_dlg.tscn @@ -1,16 +1,16 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/godot_db_manager/dlgs/load_res_path_dlg.gd" type="Script" id=1] - -[node name="load_res_path_dlg" type="FileDialog"] -anchor_right = 0.404 -anchor_bottom = 0.431 -margin_right = -0.400024 -margin_bottom = 0.0999756 -window_title = "Open a File" -resizable = true -mode = 0 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://addons/godot_db_manager/dlgs/load_res_path_dlg.gd" type="Script" id=1] + +[node name="load_res_path_dlg" type="FileDialog"] +anchor_right = 0.404 +anchor_bottom = 0.431 +offset_right = -0.400024 +offset_bottom = 0.0999756 +window_title = "Open a File" +resizable = true +mode = 0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} diff --git a/addons/godot_db_manager/dlgs/new_db_dlg.gd b/addons/godot_db_manager/dlgs/new_db_dlg.gd index 02bbe29..7aae1fd 100644 --- a/addons/godot_db_manager/dlgs/new_db_dlg.gd +++ b/addons/godot_db_manager/dlgs/new_db_dlg.gd @@ -1,63 +1,63 @@ -""" -class GDDBNewDBDlg -""" - -class_name GDDBNewDBDlg - -tool -extends WindowDialog - -signal create_new_db - -var m_current_db_name = "" - -# Called when the node enters the scene tree for the first time. -func _ready() -> void : - $v_layout/buttons/ok_btn.connect("pressed", self, "on_ok_btn_pressed") - $v_layout/buttons/cancel_btn.connect("pressed", self, "on_cancel_btn_pressed") - connect("about_to_show", self, "on_about_to_show") - $v_layout/db_info/db_edt.connect("text_changed", self, "on_text_changed") - $v_layout/db_info/db_edt.connect("text_entered", self, "on_text_confirmed") - -# Called when the node is about to be shown. -func on_about_to_show() -> void : - m_current_db_name = "" - $v_layout/db_info/db_edt.set_text(m_current_db_name) - -# called everytime the text is changed -func on_text_changed(new_text: String) -> void : - var change_text = true - if(!gddb_globals.check_db_name(new_text)): - change_text = false - else: - if(new_text.length() > gddb_constants.c_max_db_name_len): - change_text = false - else: - change_text = true - - if(change_text): - m_current_db_name = $v_layout/db_info/db_edt.get_text() - else: - $v_layout/db_info/db_edt.set_text(m_current_db_name) - $v_layout/db_info/db_edt.set_cursor_position(m_current_db_name.length()) - -# called when the user presses the ENTER key -func on_text_confirmed(text : String) -> void : - # print("GDDBNewDBDlg::on_text_confirmed(" + text + ")") - if(m_current_db_name.empty()): - return - handle_db_name() - hide() - -# called when the OK button is pressed -func on_ok_btn_pressed() -> void : - if(!m_current_db_name.empty()): - handle_db_name() - -# called when the Cancel button is pressed -func on_cancel_btn_pressed() -> void : - hide() - -# handles the name of the database -func handle_db_name() -> void : - emit_signal("create_new_db", m_current_db_name) +@tool +""" +class GDDBNewDBDlg +""" + +class_name GDDBNewDBDlg + +extends Window + +signal create_new_db + +var m_current_db_name = "" + +# Called when the node enters the scene tree for the first time. +func _ready() -> void : + $v_layout/buttons/ok_btn.connect("pressed", Callable(self, "on_ok_btn_pressed")) + $v_layout/buttons/cancel_btn.connect("pressed", Callable(self, "on_cancel_btn_pressed")) + connect("about_to_popup", Callable(self, "on_about_to_show")) + $v_layout/db_info/db_edt.connect("text_changed", Callable(self, "on_text_changed")) + $v_layout/db_info/db_edt.connect("text_submitted", Callable(self, "on_text_confirmed")) + +# Called when the node is about to be shown. +func on_about_to_show() -> void : + m_current_db_name = "" + $v_layout/db_info/db_edt.set_text(m_current_db_name) + +# called everytime the text is changed +func on_text_changed(new_text: String) -> void : + var change_text = true + if(!gddb_globals.check_db_name(new_text)): + change_text = false + else: + if(new_text.length() > gddb_constants.c_max_db_name_len): + change_text = false + else: + change_text = true + + if(change_text): + m_current_db_name = $v_layout/db_info/db_edt.get_text() + else: + $v_layout/db_info/db_edt.set_text(m_current_db_name) + $v_layout/db_info/db_edt.set_caret_column(m_current_db_name.length()) + +# called when the user presses the ENTER key +func on_text_confirmed(text : String) -> void : + # print("GDDBNewDBDlg::on_text_confirmed(" + text + ")") + if(m_current_db_name.is_empty()): + return + handle_db_name() + hide() + +# called when the OK button is pressed +func on_ok_btn_pressed() -> void : + if(!m_current_db_name.is_empty()): + handle_db_name() + +# called when the Cancel button is pressed +func on_cancel_btn_pressed() -> void : + hide() + +# handles the name of the database +func handle_db_name() -> void : + emit_signal("create_new_db", m_current_db_name) diff --git a/addons/godot_db_manager/dlgs/new_db_dlg.tscn b/addons/godot_db_manager/dlgs/new_db_dlg.tscn index ae94b6c..b2eeb94 100644 --- a/addons/godot_db_manager/dlgs/new_db_dlg.tscn +++ b/addons/godot_db_manager/dlgs/new_db_dlg.tscn @@ -1,82 +1,82 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_14.tres" type="DynamicFont" id=1] -[ext_resource path="res://addons/godot_db_manager/dlgs/new_db_dlg.gd" type="Script" id=2] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="DynamicFont" id=3] - -[node name="new_db_dlg" type="WindowDialog"] -visible = true -anchor_right = 0.257 -anchor_bottom = 0.1 -margin_right = 0.799988 -focus_next = NodePath("v_layout/db_info/db_edt") -focus_mode = 2 -custom_fonts/title_font = ExtResource( 1 ) -popup_exclusive = true -window_title = "New database (max 16 characters)" -script = ExtResource( 2 ) -__meta__ = { -"_edit_horizontal_guides_": [ 90.0781 ], -"_edit_use_anchors_": false -} - -[node name="v_layout" type="VBoxContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -custom_constants/separation = 20 -alignment = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="db_info" type="HBoxContainer" parent="v_layout"] -margin_top = 11.0 -margin_right = 412.0 -margin_bottom = 38.0 -alignment = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="db_lbl" type="Label" parent="v_layout/db_info"] -margin_left = 18.0 -margin_top = 5.0 -margin_right = 89.0 -margin_bottom = 22.0 -custom_fonts/font = ExtResource( 1 ) -text = "DB name: " - -[node name="db_edt" type="LineEdit" parent="v_layout/db_info"] -margin_left = 93.0 -margin_right = 393.0 -margin_bottom = 27.0 -rect_min_size = Vector2( 300, 20 ) -custom_fonts/font = ExtResource( 1 ) -caret_blink = true -caret_blink_speed = 0.5 - -[node name="buttons" type="HBoxContainer" parent="v_layout"] -margin_top = 58.0 -margin_right = 412.0 -margin_bottom = 79.0 -custom_constants/separation = 80 -alignment = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ok_btn" type="Button" parent="v_layout/buttons"] -margin_left = 66.0 -margin_right = 166.0 -margin_bottom = 21.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 3 ) -text = "OK" - -[node name="cancel_btn" type="Button" parent="v_layout/buttons"] -margin_left = 246.0 -margin_right = 346.0 -margin_bottom = 21.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 3 ) -text = "Cancel" +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_14.tres" type="FontFile" id=1] +[ext_resource path="res://addons/godot_db_manager/dlgs/new_db_dlg.gd" type="Script" id=2] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="FontFile" id=3] + +[node name="new_db_dlg" type="Window"] +visible = true +anchor_right = 0.257 +anchor_bottom = 0.1 +offset_right = 0.799988 +focus_next = NodePath("v_layout/db_info/db_edt") +focus_mode = 2 +theme_override_fonts/title_font = ExtResource( 1 ) +exclusive = true +window_title = "New database (max 16 characters)" +script = ExtResource( 2 ) +__meta__ = { +"_edit_horizontal_guides_": [ 90.0781 ], +"_edit_use_anchors_": false +} + +[node name="v_layout" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme_override_constants/separation = 20 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="db_info" type="HBoxContainer" parent="v_layout"] +offset_top = 11.0 +offset_right = 412.0 +offset_bottom = 38.0 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="db_lbl" type="Label" parent="v_layout/db_info"] +offset_left = 18.0 +offset_top = 5.0 +offset_right = 89.0 +offset_bottom = 22.0 +theme_override_fonts/font = ExtResource( 1 ) +text = "DB name: " + +[node name="db_edt" type="LineEdit" parent="v_layout/db_info"] +offset_left = 93.0 +offset_right = 393.0 +offset_bottom = 27.0 +custom_minimum_size = Vector2( 300, 20 ) +theme_override_fonts/font = ExtResource( 1 ) +caret_blink = true +caret_blink_interval = 0.5 + +[node name="buttons" type="HBoxContainer" parent="v_layout"] +offset_top = 58.0 +offset_right = 412.0 +offset_bottom = 79.0 +theme_override_constants/separation = 80 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ok_btn" type="Button" parent="v_layout/buttons"] +offset_left = 66.0 +offset_right = 166.0 +offset_bottom = 21.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 3 ) +text = "OK" + +[node name="cancel_btn" type="Button" parent="v_layout/buttons"] +offset_left = 246.0 +offset_right = 346.0 +offset_bottom = 21.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 3 ) +text = "Cancel" diff --git a/addons/godot_db_manager/dlgs/new_table_dlg.gd b/addons/godot_db_manager/dlgs/new_table_dlg.gd index 15be470..6bde601 100644 --- a/addons/godot_db_manager/dlgs/new_table_dlg.gd +++ b/addons/godot_db_manager/dlgs/new_table_dlg.gd @@ -1,11 +1,11 @@ +@tool """ class GDDBNewDBDlg """ class_name GDDBNewTableDlg -tool -extends WindowDialog +extends Window signal create_new_table signal cancel_dialog @@ -16,10 +16,10 @@ var m_current_table_name = "" # Called when the node enters the scene tree for the first time. func _ready(): - $v_layout/buttons/ok_btn.connect("pressed", self, "on_ok_btn_pressed") - $v_layout/buttons/cancel_btn.connect("pressed", self, "on_cancel_btn_pressed") - $v_layout/table_info/table_edt.connect("text_changed", self, "on_text_changed") - $v_layout/table_info/table_edt.connect("text_entered", self, "on_text_confirmed") + $v_layout/buttons/ok_btn.connect("pressed", Callable(self, "on_ok_btn_pressed")) + $v_layout/buttons/cancel_btn.connect("pressed", Callable(self, "on_cancel_btn_pressed")) + $v_layout/table_info/table_edt.connect("text_changed", Callable(self, "on_text_changed")) + $v_layout/table_info/table_edt.connect("text_submitted", Callable(self, "on_text_confirmed")) m_current_table_name = "" # sets the type of the dialog @@ -58,18 +58,18 @@ func on_text_changed(new_text: String) -> void: m_current_table_name = $v_layout/table_info/table_edt.get_text() else: $v_layout/table_info/table_edt.set_text(m_current_table_name) - $v_layout/table_info/table_edt.set_cursor_position(m_current_table_name.length()) + $v_layout/table_info/table_edt.set_caret_column(m_current_table_name.length()) # called when the user presses the ENTER key func on_text_confirmed(text : String) -> void: - if(m_current_table_name.empty()): + if(m_current_table_name.is_empty()): return handle_table_name() hide() # called when the OK button is pressed func on_ok_btn_pressed() -> void: - if(!m_current_table_name.empty()): + if(!m_current_table_name.is_empty()): handle_table_name() hide() diff --git a/addons/godot_db_manager/dlgs/new_table_dlg.tscn b/addons/godot_db_manager/dlgs/new_table_dlg.tscn index 6b449a5..6114519 100644 --- a/addons/godot_db_manager/dlgs/new_table_dlg.tscn +++ b/addons/godot_db_manager/dlgs/new_table_dlg.tscn @@ -1,73 +1,73 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="DynamicFont" id=1] -[ext_resource path="res://addons/godot_db_manager/dlgs/new_table_dlg.gd" type="Script" id=2] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_14.tres" type="DynamicFont" id=3] - -[node name="new_table_dlg" type="WindowDialog"] -visible = true -anchor_right = 0.257 -anchor_bottom = 0.084 -margin_right = 0.799988 -margin_bottom = 0.399994 -focus_next = NodePath("v_layout/table_info/table_edt") -focus_mode = 1 -custom_fonts/title_font = ExtResource( 3 ) -popup_exclusive = true -window_title = "New table (max 16 characters)" -script = ExtResource( 2 ) - -[node name="v_layout" type="VBoxContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -custom_constants/separation = 10 -alignment = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="table_info" type="HBoxContainer" parent="v_layout"] -margin_top = 8.0 -margin_right = 412.0 -margin_bottom = 35.0 -alignment = 1 - -[node name="table_lbl" type="Label" parent="v_layout/table_info"] -margin_left = 10.0 -margin_top = 5.0 -margin_right = 97.0 -margin_bottom = 22.0 -custom_fonts/font = ExtResource( 3 ) -text = "Table name: " - -[node name="table_edt" type="LineEdit" parent="v_layout/table_info"] -margin_left = 101.0 -margin_right = 401.0 -margin_bottom = 27.0 -rect_min_size = Vector2( 300, 20 ) -custom_fonts/font = ExtResource( 3 ) -caret_blink = true -caret_blink_speed = 0.5 - -[node name="buttons" type="HBoxContainer" parent="v_layout"] -margin_top = 45.0 -margin_right = 412.0 -margin_bottom = 66.0 -custom_constants/separation = 80 -alignment = 1 - -[node name="ok_btn" type="Button" parent="v_layout/buttons"] -margin_left = 66.0 -margin_right = 166.0 -margin_bottom = 21.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 1 ) -text = "OK" - -[node name="cancel_btn" type="Button" parent="v_layout/buttons"] -margin_left = 246.0 -margin_right = 346.0 -margin_bottom = 21.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 1 ) -text = "Cancel" +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_12.tres" type="FontFile" id=1] +[ext_resource path="res://addons/godot_db_manager/dlgs/new_table_dlg.gd" type="Script" id=2] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_14.tres" type="FontFile" id=3] + +[node name="new_table_dlg" type="Window"] +visible = true +anchor_right = 0.257 +anchor_bottom = 0.084 +offset_right = 0.799988 +offset_bottom = 0.399994 +focus_next = NodePath("v_layout/table_info/table_edt") +focus_mode = 1 +theme_override_fonts/title_font = ExtResource( 3 ) +exclusive = true +window_title = "New table (max 16 characters)" +script = ExtResource( 2 ) + +[node name="v_layout" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme_override_constants/separation = 10 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="table_info" type="HBoxContainer" parent="v_layout"] +offset_top = 8.0 +offset_right = 412.0 +offset_bottom = 35.0 +alignment = 1 + +[node name="table_lbl" type="Label" parent="v_layout/table_info"] +offset_left = 10.0 +offset_top = 5.0 +offset_right = 97.0 +offset_bottom = 22.0 +theme_override_fonts/font = ExtResource( 3 ) +text = "Table name: " + +[node name="table_edt" type="LineEdit" parent="v_layout/table_info"] +offset_left = 101.0 +offset_right = 401.0 +offset_bottom = 27.0 +custom_minimum_size = Vector2( 300, 20 ) +theme_override_fonts/font = ExtResource( 3 ) +caret_blink = true +caret_blink_interval = 0.5 + +[node name="buttons" type="HBoxContainer" parent="v_layout"] +offset_top = 45.0 +offset_right = 412.0 +offset_bottom = 66.0 +theme_override_constants/separation = 80 +alignment = 1 + +[node name="ok_btn" type="Button" parent="v_layout/buttons"] +offset_left = 66.0 +offset_right = 166.0 +offset_bottom = 21.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 1 ) +text = "OK" + +[node name="cancel_btn" type="Button" parent="v_layout/buttons"] +offset_left = 246.0 +offset_right = 346.0 +offset_bottom = 21.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 1 ) +text = "Cancel" diff --git a/addons/godot_db_manager/menu.gd b/addons/godot_db_manager/menu.gd index 72a4798..098afb9 100644 --- a/addons/godot_db_manager/menu.gd +++ b/addons/godot_db_manager/menu.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBMenu """ class_name GDDBMenu -tool extends Control signal new_database @@ -29,18 +29,18 @@ var m_enable_save_as_db = false var m_check_autosave_on_load = false func _ready() -> void: - $layout/File.connect("about_to_show", self, "on_about_to_show_file_menu") + $layout/File.connect("about_to_popup", Callable(self, "on_about_to_show_file_menu")) $layout/File.get_popup().clear() $layout/File.get_popup().add_item("New DB", e_file_new_id) $layout/File.get_popup().add_item("Load DB", e_file_load_id) $layout/File.get_popup().add_item("Save DB", e_file_save_id) $layout/File.get_popup().add_item("Save DB As ...", e_file_save_as_id) - $layout/File.get_popup().connect("id_pressed", self, "on_file_id_pressed") + $layout/File.get_popup().connect("id_pressed", Callable(self, "on_file_id_pressed")) - $layout/Options.connect("about_to_show", self, "on_about_to_show_options_menu") + $layout/Options.connect("about_to_popup", Callable(self, "on_about_to_show_options_menu")) $layout/Options.get_popup().clear() $layout/Options.get_popup().add_check_item("Autosave on close", e_option_autosave_on_close_id) - $layout/Options.get_popup().connect("id_pressed", self, "on_options_id_pressed") + $layout/Options.get_popup().connect("id_pressed", Callable(self, "on_options_id_pressed")) # called before showing the file menu func on_about_to_show_file_menu() -> void: diff --git a/addons/godot_db_manager/menu.tscn b/addons/godot_db_manager/menu.tscn index f7628a9..73fbaf1 100644 --- a/addons/godot_db_manager/menu.tscn +++ b/addons/godot_db_manager/menu.tscn @@ -1,11 +1,11 @@ [gd_scene load_steps=3 format=2] [ext_resource path="res://addons/godot_db_manager/menu.gd" type="Script" id=1] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="DynamicFont" id=2] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="FontFile" id=2] [node name="menu" type="Control"] anchor_right = 1.0 -rect_min_size = Vector2( 0, 30 ) +custom_minimum_size = Vector2( 0, 30 ) script = ExtResource( 1 ) __meta__ = { "_edit_horizontal_guides_": [ 30.0 ], @@ -14,23 +14,23 @@ __meta__ = { } [node name="layout" type="HBoxContainer" parent="."] -margin_right = 1024.0 -margin_bottom = 30.0 +offset_right = 1024.0 +offset_bottom = 30.0 __meta__ = { "_edit_use_anchors_": false } [node name="File" type="MenuButton" parent="layout"] -margin_right = 40.0 -margin_bottom = 30.0 -custom_fonts/font = ExtResource( 2 ) +offset_right = 40.0 +offset_bottom = 30.0 +theme_override_fonts/font = ExtResource( 2 ) text = "File" items = [ "New DB", null, 0, false, false, 0, 0, null, "", false, "Load DB", null, 0, false, false, 1, 0, null, "", false, "Save DB", null, 0, false, false, 2, 0, null, "", false, "Save DB As ...", null, 0, false, false, 3, 0, null, "", false ] [node name="Options" type="MenuButton" parent="layout"] -margin_left = 44.0 -margin_right = 117.0 -margin_bottom = 30.0 -custom_fonts/font = ExtResource( 2 ) +offset_left = 44.0 +offset_right = 117.0 +offset_bottom = 30.0 +theme_override_fonts/font = ExtResource( 2 ) text = "Options" items = [ "Autosave on close", null, 1, false, false, 4, 0, null, "", false ] diff --git a/addons/godot_db_manager/table_cell.gd b/addons/godot_db_manager/table_cell.gd index ba738df..996a63b 100644 --- a/addons/godot_db_manager/table_cell.gd +++ b/addons/godot_db_manager/table_cell.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBTableCell """ class_name GDDBTableCell -tool extends Control signal edit_data @@ -20,16 +20,16 @@ var m_row_idx : int = -1 var m_text : String = "" func _ready() -> void : - $LineEdit.connect("text_changed", self, "on_text_changed") - $LineEdit/edit_btn.connect("pressed", self, "on_edit_string") + $LineEdit.connect("text_changed", Callable(self, "on_text_changed")) + $LineEdit/edit_btn.connect("pressed", Callable(self, "on_edit_string")) - $Button.connect("pressed", self, "on_button_pressed") + $Button.connect("pressed", Callable(self, "on_button_pressed")) $Button.set_clip_text(true) - $CheckBox.connect("toggled", self, "on_toggle_button") + $CheckBox.connect("toggled", Callable(self, "on_toggle_button")) func _exit_tree() -> void : - $LineEdit.disconnect("text_changed", self, "on_text_changed") + $LineEdit.disconnect("text_changed", Callable(self, "on_text_changed")) # sets the property id func set_prop_id(id : int) -> void : @@ -137,10 +137,10 @@ func on_edit_string() -> void : # called when edit the data func on_text_changed(new_text : String) -> void : - if(new_text.empty()): + if(new_text.is_empty()): m_text = "" $LineEdit.set_text(m_text) - $LineEdit.set_cursor_position(0) + $LineEdit.set_caret_column(0) return if(m_prop_type == gddb_types.e_prop_type_int): @@ -163,25 +163,25 @@ func check_integer(text : String) -> bool : is_negative = true # check if the current string is only "-" - if(text.empty()): + if(text.is_empty()): m_text = "-" $LineEdit.set_text(m_text) - $LineEdit.set_cursor_position(m_text.length()) + $LineEdit.set_caret_column(m_text.length()) return true - if(text.is_valid_integer()): + if(text.is_valid_int()): if(text.begins_with("0")): # a negative integer cannot start with "0" if(is_negative): m_text = "-" $LineEdit.set_text(m_text) - $LineEdit.set_cursor_position(1) + $LineEdit.set_caret_column(1) return true # a positive number starting with "0" can be only "0" m_text = "0" $LineEdit.set_text(m_text) - $LineEdit.set_cursor_position(1) + $LineEdit.set_caret_column(1) return true # don't add more "-" in front of the number @@ -195,11 +195,11 @@ func check_integer(text : String) -> bool : m_text = text $LineEdit.set_text(m_text) - $LineEdit.set_cursor_position(m_text.length()) + $LineEdit.set_caret_column(m_text.length()) return true $LineEdit.set_text(m_text) - $LineEdit.set_cursor_position(m_text.length()) + $LineEdit.set_caret_column(m_text.length()) return false func check_float(text : String) -> bool : @@ -210,12 +210,12 @@ func check_float(text : String) -> bool : || text.begins_with("09")): m_text = "0" $LineEdit.set_text(m_text) - $LineEdit.set_cursor_position(1) + $LineEdit.set_caret_column(1) return true m_text = text return true $LineEdit.set_text(m_text) - $LineEdit.set_cursor_position(m_text.length()) + $LineEdit.set_caret_column(m_text.length()) return false diff --git a/addons/godot_db_manager/table_cell.tscn b/addons/godot_db_manager/table_cell.tscn index bbc9456..8725d84 100644 --- a/addons/godot_db_manager/table_cell.tscn +++ b/addons/godot_db_manager/table_cell.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=7 format=2] -[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture" id=1] +[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture2D" id=1] [ext_resource path="res://addons/godot_db_manager/table_cell.gd" type="Script" id=2] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="DynamicFont" id=3] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="FontFile" id=3] [sub_resource type="AtlasTexture" id=1] atlas = ExtResource( 1 ) @@ -18,8 +18,8 @@ region = Rect2( 28, 28, 24, 24 ) [node name="table_cell" type="Control"] anchor_right = 1.0 -margin_bottom = 15.36 -rect_min_size = Vector2( 150, 32 ) +offset_bottom = 15.36 +custom_minimum_size = Vector2( 150, 32 ) script = ExtResource( 2 ) __meta__ = { "_edit_horizontal_guides_": [ 32.0 ], @@ -29,10 +29,10 @@ __meta__ = { [node name="LineEdit" type="LineEdit" parent="."] anchor_right = 1.0 anchor_bottom = 0.914286 -custom_fonts/font = ExtResource( 3 ) +theme_override_fonts/font = ExtResource( 3 ) text = "TESTING WWW" caret_blink = true -caret_blink_speed = 0.5 +caret_blink_interval = 0.5 __meta__ = { "_edit_use_anchors_": true } @@ -41,10 +41,10 @@ __meta__ = { anchor_left = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -29.0 -margin_top = 4.0 -margin_right = -5.0 -margin_bottom = -4.0 +offset_left = -29.0 +offset_top = 4.0 +offset_right = -5.0 +offset_bottom = -4.0 texture_normal = SubResource( 1 ) texture_pressed = SubResource( 2 ) texture_hover = SubResource( 3 ) @@ -56,7 +56,7 @@ __meta__ = { visible = false anchor_right = 1.0 anchor_bottom = 1.0 -custom_fonts/font = ExtResource( 3 ) +theme_override_fonts/font = ExtResource( 3 ) clip_text = true __meta__ = { "_edit_use_anchors_": false @@ -66,7 +66,7 @@ __meta__ = { visible = false anchor_right = 1.0 anchor_bottom = 1.0 -custom_fonts/font = ExtResource( 3 ) +theme_override_fonts/font = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": false } diff --git a/addons/godot_db_manager/table_editor.gd b/addons/godot_db_manager/table_editor.gd index 83cfff1..885f04a 100644 --- a/addons/godot_db_manager/table_editor.gd +++ b/addons/godot_db_manager/table_editor.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBTableEditor """ class_name GDDBTableEditor -tool extends Control signal set_dirty @@ -13,17 +13,17 @@ var m_parent_table = null # Called when the node enters the scene tree for the first time. func _ready() -> void: - $tabs/structure/header/new_property_btn.connect("pressed", self, "on_new_property_btn_pressed") - $tabs/data/add_data_btn.connect("pressed", self, "on_add_row_data_btn_pressed") + $tabs/structure/header/new_property_btn.connect("pressed", Callable(self, "on_new_property_btn_pressed")) + $tabs/data/add_data_btn.connect("pressed", Callable(self, "on_add_row_data_btn_pressed")) $tabs/data/add_data_btn.set_disabled(true) - $load_res_path_dlg.connect("file_selected", self, "on_select_res_path") + $load_res_path_dlg.connect("file_selected", Callable(self, "on_select_res_path")) - $data_dlg.connect("select_data", self, "on_select_data") + $data_dlg.connect("select_data", Callable(self, "on_select_data")) - $edit_string_dlg.connect("string_edited", self, "on_text_edited") + $edit_string_dlg.connect("string_edited", Callable(self, "on_text_edited")) - $delete_prop_dlg.connect("delete_prop", self, "on_confirm_delete_property") + $delete_prop_dlg.connect("delete_prop", Callable(self, "on_confirm_delete_property")) # called when resizing a property func on_resize_property(prop_id : int, diff_x : float) -> void : @@ -97,36 +97,36 @@ func on_new_property_btn_pressed() -> void: # adds a property to structure tab func add_prop_to_structure(prop_id : int, prop_type : int, prop_name : String) -> void: # print("GDDBTableEditor::add_prop_to_structure(" + str(prop_id) + ", " + str(prop_type) + ", " + prop_name + ")") - var prop = load(gddb_constants.c_addon_main_path + "table_property.tscn").instance() + var prop = load(gddb_constants.c_addon_main_path + "table_property.tscn").instantiate() $tabs/structure/scroll/properties.add_child(prop) prop.set_parent_table(m_parent_table) prop.setup(prop_id, prop_type, prop_name) - prop.connect("edit_property", self, "on_edit_property") - prop.connect("delete_property", self, "on_delete_property") - prop.connect("enable_autoincrement", self, "on_enable_prop_autoincrement") + prop.connect("edit_property", Callable(self, "on_edit_property")) + prop.connect("delete_property", Callable(self, "on_delete_property")) + prop.connect("enable_autoincrement", Callable(self, "on_enable_prop_autoincrement")) # adds a property to data tab func add_prop_to_data(prop_id : int, prop_type : int, prop_name : String, has_autoincrement : bool) -> void: - var prop = load(gddb_constants.c_addon_main_path + "data_label.tscn").instance() + var prop = load(gddb_constants.c_addon_main_path + "data_label.tscn").instantiate() $tabs/data/scroll/data_holder/data_header.add_child(prop) prop.set_prop_id(prop_id) prop.set_text(prop_name) - prop.connect("resize_property", self, "on_resize_property") + prop.connect("resize_property", Callable(self, "on_resize_property")) # add property to the existing rows for idx in range(0, $tabs/data/scroll/data_holder/data_container.get_child_count()): var row = $tabs/data/scroll/data_holder/data_container.get_child(idx) - var cell = load(gddb_constants.c_addon_main_path + "table_cell.tscn").instance() + var cell = load(gddb_constants.c_addon_main_path + "table_cell.tscn").instantiate() row.add_child(cell) cell.set_prop_id(prop_id) cell.set_row_idx(idx) cell.set_prop_type(prop_type) cell.set_text("") cell.enable_autoincrement(has_autoincrement) - cell.connect("edit_data", self, "on_edit_data") - cell.connect("choose_resource", self, "on_choose_resource") - cell.connect("choose_data", self, "on_choose_data") - cell.connect("edit_string", self, "on_edit_string") + cell.connect("edit_data", Callable(self, "on_edit_data")) + cell.connect("choose_resource", Callable(self, "on_choose_resource")) + cell.connect("choose_data", Callable(self, "on_choose_data")) + cell.connect("edit_string", Callable(self, "on_edit_string")) # called when the add data button is pressed func on_add_row_data_btn_pressed() -> void: @@ -139,7 +139,7 @@ func on_add_row_data_btn_pressed() -> void: var row = HBoxContainer.new() $tabs/data/scroll/data_holder/data_container.add_child(row) for idx in range(0, $tabs/structure/scroll/properties.get_child_count()): - var cell = load(gddb_constants.c_addon_main_path + "table_cell.tscn").instance() + var cell = load(gddb_constants.c_addon_main_path + "table_cell.tscn").instantiate() var prop = $tabs/structure/scroll/properties.get_child(idx) var db_prop = m_parent_table.get_prop_by_id(idx) row.add_child(cell) @@ -150,10 +150,10 @@ func on_add_row_data_btn_pressed() -> void: cell.enable_autoincrement(db_prop.has_autoincrement()) if(autoincrement): cell.set_text(str(row_idx+1)) - cell.connect("edit_data", self, "on_edit_data") - cell.connect("choose_resource", self, "on_choose_resource") - cell.connect("choose_data", self, "on_choose_data") - cell.connect("edit_string", self, "on_edit_string") + cell.connect("edit_data", Callable(self, "on_edit_data")) + cell.connect("choose_resource", Callable(self, "on_choose_resource")) + cell.connect("choose_data", Callable(self, "on_choose_data")) + cell.connect("edit_string", Callable(self, "on_edit_string")) emit_signal("set_dirty") @@ -173,12 +173,12 @@ func fill_properties() -> void: for idx in range(0, props_count): var db_prop = m_parent_table.get_prop_at(idx) add_prop_to_structure(db_prop.get_prop_id(), db_prop.get_prop_type(), db_prop.get_prop_name()) - var prop = load(gddb_constants.c_addon_main_path + "data_label.tscn").instance() + var prop = load(gddb_constants.c_addon_main_path + "data_label.tscn").instantiate() $tabs/data/scroll/data_holder/data_header.add_child(prop) prop.set_prop_id(db_prop.get_prop_id()) prop.set_prop_type(db_prop.get_prop_type()) prop.set_text(db_prop.get_prop_name()) - prop.connect("resize_property", self, "on_resize_property") + prop.connect("resize_property", Callable(self, "on_resize_property")) if(props_count > 0): $tabs/data/add_data_btn.set_disabled(false) @@ -198,7 +198,7 @@ func fill_data() -> void: #print("Prop type: " + str(db_prop.get_prop_type())) #print("Prop name: " + str(db_prop.get_prop_name())) - var cell = load(gddb_constants.c_addon_main_path + "table_cell.tscn").instance() + var cell = load(gddb_constants.c_addon_main_path + "table_cell.tscn").instantiate() var cell_data = data_row[jdx].get_data() var prop_type = db_prop.get_prop_type() @@ -215,10 +215,10 @@ func fill_data() -> void: cell.set_prop_type(prop_type) cell.set_text(cell_data) cell.enable_autoincrement(db_prop.has_autoincrement()) - cell.connect("edit_data", self, "on_edit_data") - cell.connect("choose_resource", self, "on_choose_resource") - cell.connect("choose_data", self, "on_choose_data") - cell.connect("edit_string", self, "on_edit_string") + cell.connect("edit_data", Callable(self, "on_edit_data")) + cell.connect("choose_resource", Callable(self, "on_choose_resource")) + cell.connect("choose_data", Callable(self, "on_choose_data")) + cell.connect("edit_string", Callable(self, "on_edit_string")) # links properties func link_props() -> void : @@ -312,7 +312,7 @@ func on_confirm_delete_property() -> void: for jdx in range(0, row.get_child_count()): var cell = row.get_child(jdx) if(cell.get_prop_id() == prop_id): - cell.disconnect("edit_data", self, "on_edit_data") + cell.disconnect("edit_data", Callable(self, "on_edit_data")) cell.queue_free() break diff --git a/addons/godot_db_manager/table_editor.tscn b/addons/godot_db_manager/table_editor.tscn index f2f1222..a9545ea 100644 --- a/addons/godot_db_manager/table_editor.tscn +++ b/addons/godot_db_manager/table_editor.tscn @@ -6,8 +6,8 @@ [ext_resource path="res://addons/godot_db_manager/dlgs/data_dlg.tscn" type="PackedScene" id=4] [ext_resource path="res://addons/godot_db_manager/dlgs/edit_string_dlg.tscn" type="PackedScene" id=5] [ext_resource path="res://addons/godot_db_manager/dlgs/delete_prop_dlg.tscn" type="PackedScene" id=6] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="DynamicFont" id=7] -[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture" id=8] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="FontFile" id=7] +[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture2D" id=8] [sub_resource type="AtlasTexture" id=1] atlas = ExtResource( 8 ) @@ -50,41 +50,41 @@ __meta__ = { [node name="tabs" type="TabContainer" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -custom_fonts/font = ExtResource( 7 ) +theme_override_fonts/font = ExtResource( 7 ) __meta__ = { "_edit_use_anchors_": false } -[node name="structure" type="Tabs" parent="tabs"] +[node name="structure" type="TabBar" parent="tabs"] visible = false anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 40.0 -margin_right = -4.0 -margin_bottom = -4.0 +offset_left = 4.0 +offset_top = 40.0 +offset_right = -4.0 +offset_bottom = -4.0 tab_close_display_policy = 2 [node name="header" type="HBoxContainer" parent="tabs/structure"] -margin_right = 892.0 -margin_bottom = 24.0 +offset_right = 892.0 +offset_bottom = 24.0 __meta__ = { "_edit_use_anchors_": false } [node name="new_property_btn" type="TextureButton" parent="tabs/structure/header"] -margin_right = 24.0 -margin_bottom = 24.0 +offset_right = 24.0 +offset_bottom = 24.0 texture_normal = SubResource( 1 ) texture_pressed = SubResource( 2 ) texture_hover = SubResource( 3 ) [node name="props_lbl" type="Label" parent="tabs/structure/header"] -margin_left = 28.0 -margin_top = 1.0 -margin_right = 114.0 -margin_bottom = 23.0 -custom_fonts/font = ExtResource( 7 ) +offset_left = 28.0 +offset_top = 1.0 +offset_right = 114.0 +offset_bottom = 23.0 +theme_override_fonts/font = ExtResource( 7 ) text = "Properties:" __meta__ = { "_edit_use_anchors_": false @@ -93,7 +93,7 @@ __meta__ = { [node name="scroll" type="ScrollContainer" parent="tabs/structure"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_top = 30.0 +offset_top = 30.0 __meta__ = { "_edit_use_anchors_": false } @@ -103,18 +103,18 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="data" type="Tabs" parent="tabs"] +[node name="data" type="TabBar" parent="tabs"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 40.0 -margin_right = -4.0 -margin_bottom = -4.0 +offset_left = 4.0 +offset_top = 40.0 +offset_right = -4.0 +offset_bottom = -4.0 tab_close_display_policy = 2 [node name="add_data_btn" type="TextureButton" parent="tabs/data"] -margin_right = 24.0 -margin_bottom = 24.0 +offset_right = 24.0 +offset_bottom = 24.0 disabled = true texture_normal = SubResource( 4 ) texture_pressed = SubResource( 5 ) @@ -127,31 +127,31 @@ __meta__ = { [node name="scroll" type="ScrollContainer" parent="tabs/data"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_top = 38.0 +offset_top = 38.0 __meta__ = { "_edit_use_anchors_": false } [node name="data_holder" type="VBoxContainer" parent="tabs/data/scroll"] -margin_bottom = 36.0 +offset_bottom = 36.0 __meta__ = { "_edit_use_anchors_": false } [node name="data_header" type="HBoxContainer" parent="tabs/data/scroll/data_holder"] -margin_bottom = 32.0 -rect_min_size = Vector2( 0, 32 ) -rect_clip_content = true +offset_bottom = 32.0 +custom_minimum_size = Vector2( 0, 32 ) +clip_contents = true [node name="data_container" type="VBoxContainer" parent="tabs/data/scroll/data_holder"] -margin_top = 36.0 -margin_bottom = 36.0 +offset_top = 36.0 +offset_bottom = 36.0 [node name="error_dlg" parent="." instance=ExtResource( 1 )] visible = false [node name="load_res_path_dlg" parent="." instance=ExtResource( 2 )] -filters = PoolStringArray( "*.res, *.tres ; Godot resource file types", "*.scn, *.tscn, *escn ; Godot scene file types", "*.gd, *.cs, *.h, *.c, *.hpp, *.cpp ; Code file types", "*.shader ; Shader file types", "*.mat ; Material file types", "*.dae, *.gltf, *.obj, *.fbx ; Mesh file types", "*.anim ; Animation file types", "*.ttf, *.otf ; Font file types", "*.png, *.jpg, *.jpeg, *.tiff, *.tga, *.bmp, *.webp, *.gif, *.hdr ; Images file types", "*.snd, *.wav, *.ogg, *.mp3 ; Sound file types", "*.ogg, *.mpg, *.mpeg, *.avi, *.mov, *.mp4, *.webm ; Video file types", "*.txt, *.csv, *.json, *.xml, *.cfg, *.ini ; Text file types", "*.doc, *.docx, *.xls, *.xlsx, *.odt, *.ods, *.pdf ; Doc file types", "*.dat, *.raw ; Binary data file types" ) +filters = PackedStringArray( "*.res, *.tres ; Godot resource file types", "*.scn, *.tscn, *escn ; Godot scene file types", "*.gd, *.cs, *.h, *.c, *.hpp, *.cpp ; Code file types", "*.shader ; Shader file types", "*.mat ; Material file types", "*.dae, *.gltf, *.obj, *.fbx ; Mesh file types", "*.anim ; Animation file types", "*.ttf, *.otf ; Font file types", "*.png, *.jpg, *.jpeg, *.tiff, *.tga, *.bmp, *.webp, *.gif, *.hdr ; Images file types", "*.snd, *.wav, *.ogg, *.mp3 ; Sound file types", "*.ogg, *.mpg, *.mpeg, *.avi, *.mov, *.mp4, *.webm ; Video file types", "*.txt, *.csv, *.json, *.xml, *.cfg, *.ini ; Text file types", "*.doc, *.docx, *.xls, *.xlsx, *.odt, *.ods, *.pdf ; Doc file types", "*.dat, *.raw ; Binary data file types" ) [node name="data_dlg" parent="." instance=ExtResource( 4 )] diff --git a/addons/godot_db_manager/table_item.gd b/addons/godot_db_manager/table_item.gd index 5bbcf75..42f505f 100644 --- a/addons/godot_db_manager/table_item.gd +++ b/addons/godot_db_manager/table_item.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBTableItem """ class_name GDDBTableItem -tool extends Control signal select_item @@ -18,9 +18,9 @@ var m_is_selected = false # Called when the node enters the scene tree for the first time. func _ready(): - $select_btn.connect("pressed", self, "on_select_btn_pressed") - $edit_table_btn.connect("pressed", self, "on_edit_table_btn_pressed") - $delete_table_btn.connect("pressed", self, "on_delete_table_btn_pressed") + $select_btn.connect("pressed", Callable(self, "on_select_btn_pressed")) + $edit_table_btn.connect("pressed", Callable(self, "on_edit_table_btn_pressed")) + $delete_table_btn.connect("pressed", Callable(self, "on_delete_table_btn_pressed")) $select.hide() # sets the table id diff --git a/addons/godot_db_manager/table_item.tscn b/addons/godot_db_manager/table_item.tscn index 151e9cf..bb0e4e3 100644 --- a/addons/godot_db_manager/table_item.tscn +++ b/addons/godot_db_manager/table_item.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=11 format=2] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="DynamicFont" id=1] -[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture" id=2] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="FontFile" id=1] +[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture2D" id=2] [ext_resource path="res://addons/godot_db_manager/table_item.gd" type="Script" id=3] -[ext_resource path="res://addons/godot_db_manager/assets/tex/debug.png" type="Texture" id=4] +[ext_resource path="res://addons/godot_db_manager/assets/tex/debug.png" type="Texture2D" id=4] [sub_resource type="AtlasTexture" id=1] atlas = ExtResource( 2 ) @@ -32,8 +32,8 @@ region = Rect2( 54, 28, 24, 24 ) [node name="table_item" type="Control"] anchor_right = 1.0 anchor_bottom = 0.021 -margin_bottom = 0.399998 -rect_min_size = Vector2( 180, 34 ) +offset_bottom = 0.399998 +custom_minimum_size = Vector2( 180, 34 ) script = ExtResource( 3 ) __meta__ = { "_edit_horizontal_guides_": [ 34.0 ], @@ -64,10 +64,10 @@ __meta__ = { [node name="table_name" type="Label" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -margin_right = -6.10352e-05 -margin_bottom = -4.0 -rect_min_size = Vector2( 100, 0 ) -custom_fonts/font = ExtResource( 1 ) +offset_right = -6.10352e-05 +offset_bottom = -4.0 +custom_minimum_size = Vector2( 100, 0 ) +theme_override_fonts/font = ExtResource( 1 ) text = "Table_999" valign = 1 __meta__ = { @@ -85,10 +85,10 @@ __meta__ = { anchor_left = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -56.0 -margin_top = 5.0 -margin_right = -32.0 -margin_bottom = -5.0 +offset_left = -56.0 +offset_top = 5.0 +offset_right = -32.0 +offset_bottom = -5.0 texture_normal = SubResource( 1 ) texture_pressed = SubResource( 2 ) texture_hover = SubResource( 3 ) @@ -100,10 +100,10 @@ __meta__ = { anchor_left = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -28.0 -margin_top = 5.0 -margin_right = -4.0 -margin_bottom = -5.0 +offset_left = -28.0 +offset_top = 5.0 +offset_right = -4.0 +offset_bottom = -5.0 texture_normal = SubResource( 4 ) texture_pressed = SubResource( 5 ) texture_hover = SubResource( 6 ) diff --git a/addons/godot_db_manager/table_property.gd b/addons/godot_db_manager/table_property.gd index d1d4da6..4cb7c74 100644 --- a/addons/godot_db_manager/table_property.gd +++ b/addons/godot_db_manager/table_property.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBTableProperty """ class_name GDDBTableProperty -tool extends Control signal delete_property @@ -19,20 +19,20 @@ var m_parent_table = null # Called when the node enters the scene tree for the first time. func _ready() -> void: - $prop_name.connect("text_changed", self, "on_name_changed") + $prop_name.connect("text_changed", Callable(self, "on_name_changed")) $prop_type.clear() for idx in range(0, gddb_types.e_prop_types_count): $prop_type.add_item(gddb_globals.get_data_name(idx), gddb_types.e_prop_type_bool + idx) $prop_type.select(0) - $prop_type.get_popup().connect("about_to_show", self, "on_about_to_show") - $prop_type.connect("item_selected", self, "on_type_changed") + $prop_type.get_popup().connect("about_to_popup", Callable(self, "on_about_to_show")) + $prop_type.connect("item_selected", Callable(self, "on_type_changed")) - $delete_button.connect("pressed", self, "on_delete_button_pressed") + $delete_button.connect("pressed", Callable(self, "on_delete_button_pressed")) $autoincrement_btn.hide() - $autoincrement_btn.connect("toggled", self, "on_set_autoincrement") + $autoincrement_btn.connect("toggled", Callable(self, "on_set_autoincrement")) # setup property func setup(prop_id : int, prop_type : int, prop_name : String) -> void: diff --git a/addons/godot_db_manager/table_property.tscn b/addons/godot_db_manager/table_property.tscn index eb10cf4..e210e3c 100644 --- a/addons/godot_db_manager/table_property.tscn +++ b/addons/godot_db_manager/table_property.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=7 format=2] -[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture" id=1] +[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture2D" id=1] [ext_resource path="res://addons/godot_db_manager/table_property.gd" type="Script" id=2] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="DynamicFont" id=3] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_18.tres" type="FontFile" id=3] [sub_resource type="AtlasTexture" id=1] atlas = ExtResource( 1 ) @@ -18,8 +18,8 @@ region = Rect2( 54, 28, 24, 24 ) [node name="table_property" type="Control"] anchor_right = 1.0 -margin_bottom = 15.36 -rect_min_size = Vector2( 900, 32 ) +offset_bottom = 15.36 +custom_minimum_size = Vector2( 900, 32 ) script = ExtResource( 2 ) __meta__ = { "_edit_horizontal_guides_": [ 32.0 ], @@ -27,10 +27,10 @@ __meta__ = { } [node name="delete_button" type="TextureButton" parent="."] -margin_left = 3.0 -margin_top = 4.0 -margin_right = 27.0 -margin_bottom = 28.0 +offset_left = 3.0 +offset_top = 4.0 +offset_right = 27.0 +offset_bottom = 28.0 texture_normal = SubResource( 1 ) texture_pressed = SubResource( 2 ) texture_hover = SubResource( 3 ) @@ -39,50 +39,50 @@ __meta__ = { } [node name="prop_name_label" type="Label" parent="."] -margin_left = 28.0 -margin_top = 2.0 -margin_right = 97.0 -margin_bottom = 24.0 -custom_fonts/font = ExtResource( 3 ) +offset_left = 28.0 +offset_top = 2.0 +offset_right = 97.0 +offset_bottom = 24.0 +theme_override_fonts/font = ExtResource( 3 ) text = " Name:" __meta__ = { "_edit_use_anchors_": false } [node name="prop_name" type="LineEdit" parent="."] -margin_left = 109.0 -margin_right = 409.0 -margin_bottom = 32.0 -rect_min_size = Vector2( 300, 0 ) -custom_fonts/font = ExtResource( 3 ) +offset_left = 109.0 +offset_right = 409.0 +offset_bottom = 32.0 +custom_minimum_size = Vector2( 300, 0 ) +theme_override_fonts/font = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": false } [node name="type_label" type="Label" parent="."] -margin_left = 413.0 -margin_top = 2.0 -margin_right = 473.0 -margin_bottom = 24.0 -custom_fonts/font = ExtResource( 3 ) +offset_left = 413.0 +offset_top = 2.0 +offset_right = 473.0 +offset_bottom = 24.0 +theme_override_fonts/font = ExtResource( 3 ) text = " Type:" [node name="prop_type" type="OptionButton" parent="."] -margin_left = 485.0 -margin_right = 735.0 -margin_bottom = 32.0 -rect_min_size = Vector2( 250, 0 ) -custom_fonts/font = ExtResource( 3 ) +offset_left = 485.0 +offset_right = 735.0 +offset_bottom = 32.0 +custom_minimum_size = Vector2( 250, 0 ) +theme_override_fonts/font = ExtResource( 3 ) text = "Bool" items = [ "Bool", null, false, 0, null, "Integer", null, false, 1, null, "Float", null, false, 2, null, "String", null, false, 3, null, "Resource", null, false, 4, null ] selected = 0 [node name="autoincrement_btn" type="CheckBox" parent="."] visible = false -margin_left = 740.0 -margin_right = 891.0 -margin_bottom = 32.0 -custom_fonts/font = ExtResource( 3 ) +offset_left = 740.0 +offset_right = 891.0 +offset_bottom = 32.0 +theme_override_fonts/font = ExtResource( 3 ) text = "Auto increment" __meta__ = { "_edit_use_anchors_": false diff --git a/addons/godot_db_manager/tables_header.gd b/addons/godot_db_manager/tables_header.gd index 18c4a5c..9c94b77 100644 --- a/addons/godot_db_manager/tables_header.gd +++ b/addons/godot_db_manager/tables_header.gd @@ -1,17 +1,17 @@ -""" -class GDDBTablesHeader -""" - -class_name GDDBTablesHeader - -tool -extends Control - -signal add_table - -# Called when the node enters the scene tree for the first time. -func _ready(): - $add_table_btn.connect("pressed", self, "on_add_table_btn_pressed") - -func on_add_table_btn_pressed(): - emit_signal("add_table") +@tool +""" +class GDDBTablesHeader +""" + +class_name GDDBTablesHeader + +extends Control + +signal add_table + +# Called when the node enters the scene tree for the first time. +func _ready(): + $add_table_btn.connect("pressed", Callable(self, "on_add_table_btn_pressed")) + +func on_add_table_btn_pressed(): + emit_signal("add_table") diff --git a/addons/godot_db_manager/tables_header.tscn b/addons/godot_db_manager/tables_header.tscn index 6ca7639..d98e8fd 100644 --- a/addons/godot_db_manager/tables_header.tscn +++ b/addons/godot_db_manager/tables_header.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=7 format=2] -[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_20.tres" type="DynamicFont" id=1] +[ext_resource path="res://addons/godot_db_manager/assets/fnt/roboto_20.tres" type="FontFile" id=1] [ext_resource path="res://addons/godot_db_manager/tables_header.gd" type="Script" id=2] -[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture" id=3] +[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture2D" id=3] [sub_resource type="AtlasTexture" id=1] atlas = ExtResource( 3 ) @@ -19,9 +19,9 @@ region = Rect2( 2, 28, 24, 24 ) [node name="tables_header" type="Control"] anchor_right = 0.188889 anchor_bottom = 0.019 -margin_right = 6.10352e-05 -margin_bottom = -0.4 -rect_min_size = Vector2( 170, 30 ) +offset_right = 6.10352e-05 +offset_bottom = -0.4 +custom_minimum_size = Vector2( 170, 30 ) script = ExtResource( 2 ) __meta__ = { "_edit_use_anchors_": true, @@ -29,10 +29,10 @@ __meta__ = { } [node name="add_table_btn" type="TextureButton" parent="."] -margin_left = 2.0 -margin_top = 2.0 -margin_right = 26.0 -margin_bottom = 26.0 +offset_left = 2.0 +offset_top = 2.0 +offset_right = 26.0 +offset_bottom = 26.0 texture_normal = SubResource( 1 ) texture_pressed = SubResource( 2 ) texture_hover = SubResource( 3 ) @@ -44,9 +44,9 @@ __meta__ = { anchor_left = 0.165 anchor_right = 1.0 anchor_bottom = 0.8 -margin_left = -0.0500259 -margin_right = -0.000152588 -custom_fonts/font = ExtResource( 1 ) +offset_left = -0.0500259 +offset_right = -0.000152588 +theme_override_fonts/font = ExtResource( 1 ) text = "Tables " align = 1 __meta__ = { @@ -56,8 +56,8 @@ __meta__ = { [node name="line" type="NinePatchRect" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -margin_top = 29.0 -margin_right = -0.000152588 +offset_top = 29.0 +offset_right = -0.000152588 texture = ExtResource( 3 ) region_rect = Rect2( 80, 2, 24, 2 ) __meta__ = { diff --git a/addons/godot_db_manager/tables_list.gd b/addons/godot_db_manager/tables_list.gd index 911421d..e0e1c67 100644 --- a/addons/godot_db_manager/tables_list.gd +++ b/addons/godot_db_manager/tables_list.gd @@ -1,10 +1,10 @@ +@tool """ class GDDBTablesList """ class_name GDDBTablesList -tool extends Control signal resize_tables_list @@ -24,7 +24,7 @@ func _ready() -> void: m_mouse_pos_pressed = Vector2() m_mouse_pressed = false - $tables_header.connect("add_table", self, "on_add_table") + $tables_header.connect("add_table", Callable(self, "on_add_table")) # called when the node gets an input func _input(event : InputEvent) -> void : @@ -34,7 +34,7 @@ func _input(event : InputEvent) -> void : var evLocal = $resize_ctrl.make_input_local(event) if event is InputEventMouseButton : - if(event.button_index == BUTTON_LEFT): + if(event.button_index == MOUSE_BUTTON_LEFT): if(event.pressed): var rect = Rect2(Vector2(0, 0), $resize_ctrl.get_size()) var inside = rect.has_point(evLocal.position) @@ -66,13 +66,13 @@ func on_add_table() -> void : # creates a table func create_table(db_table : Object, select_table : bool = true) -> void: # print("GDDBTablesList::create_table(" + str(db_table) + ")") - var table = load(gddb_constants.c_addon_main_path + "table_item.tscn").instance() + var table = load(gddb_constants.c_addon_main_path + "table_item.tscn").instantiate() var table_id = db_table.get_table_id() table.set_table_id(table_id) table.set_table_name(db_table.get_table_name()) - table.connect("select_item", self, "on_select_item") - table.connect("edit_table", self, "on_edit_table_name") - table.connect("delete_table", self, "on_delete_table") + table.connect("select_item", Callable(self, "on_select_item")) + table.connect("edit_table", Callable(self, "on_edit_table_name")) + table.connect("delete_table", Callable(self, "on_delete_table")) m_tables.push_back(table) $tables_container/tables.add_child(table) if(select_table): diff --git a/addons/godot_db_manager/tables_list.tscn b/addons/godot_db_manager/tables_list.tscn index a46b04e..72a63de 100644 --- a/addons/godot_db_manager/tables_list.tscn +++ b/addons/godot_db_manager/tables_list.tscn @@ -3,13 +3,13 @@ [ext_resource path="res://addons/godot_db_manager/tables_list.gd" type="Script" id=1] [ext_resource path="res://addons/godot_db_manager/tables_header.tscn" type="PackedScene" id=2] [ext_resource path="res://addons/godot_db_manager/debug/dbg.tscn" type="PackedScene" id=3] -[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture" id=4] +[ext_resource path="res://addons/godot_db_manager/assets/tex/gui.png" type="Texture2D" id=4] [node name="tables_list" type="Control"] anchor_right = 0.2 anchor_bottom = 1.0 -margin_right = -9.99991 -rect_min_size = Vector2( 180, 225 ) +offset_right = -9.99991 +custom_minimum_size = Vector2( 180, 225 ) script = ExtResource( 1 ) __meta__ = { "_edit_horizontal_guides_": [ 29.9686, 584.0 ], @@ -20,21 +20,21 @@ __meta__ = { [node name="tables_header" parent="." instance=ExtResource( 2 )] anchor_right = 1.0 anchor_bottom = 0.0 -margin_right = -9.15527e-05 -margin_bottom = 30.0 -rect_min_size = Vector2( 180, 30 ) +offset_right = -9.15527e-05 +offset_bottom = 30.0 +custom_minimum_size = Vector2( 180, 30 ) [node name="tables_container" type="ScrollContainer" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -margin_top = 32.0 -rect_min_size = Vector2( 180, 0 ) +offset_top = 32.0 +custom_minimum_size = Vector2( 180, 0 ) __meta__ = { "_edit_use_anchors_": false } [node name="tables" type="VBoxContainer" parent="tables_container"] -rect_clip_content = true +clip_contents = true __meta__ = { "_edit_use_anchors_": false } @@ -43,7 +43,7 @@ __meta__ = { anchor_left = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -3.0 +offset_left = -3.0 mouse_filter = 0 mouse_default_cursor_shape = 15 texture = ExtResource( 4 ) diff --git a/addons/lod/lod_cpu_particles.gd b/addons/lod/lod_cpu_particles.gd index e9c381e..86e6189 100644 --- a/addons/lod/lod_cpu_particles.gd +++ b/addons/lod/lod_cpu_particles.gd @@ -1,14 +1,14 @@ # Copyright © 2020 Hugo Locurcio and contributors - MIT License # See `LICENSE.md` included in the source distribution for details. -extends CPUParticles +extends CPUParticles3D class_name LODCPUParticles, "lod_cpu_particles.svg" # If `false`, LOD won't update anymore. This can be used for performance comparison # purposes. -export var enable_lod := true +@export var enable_lod := true # The maximum particle emitting distance in units. Past this distance, particles will no longer emit. -export(float, 0.0, 1000.0, 0.1) var max_emit_distance := 50 +@export var max_emit_distance := 50 # (float, 0.0, 1000.0, 0.1) # The rate at which LODs will be updated (in seconds). Lower values are more reactive # but use more CPU, which is especially noticeable with large amounts of LOD-enabled nodes. @@ -36,7 +36,7 @@ func _ready() -> void: # Add random jitter to the timer to ensure LODs don't all swap at the same time. randomize() - timer += rand_range(0, refresh_rate) + timer += randf_range(0, refresh_rate) # Despite LOD not being related to physics, we chose to run in `_physics_process()` # to minimize the amount of method calls per second (and therefore decrease CPU usage). @@ -45,7 +45,7 @@ func _physics_process(delta: float) -> void: return # We need a camera to do the rest. - var camera := get_viewport().get_camera() + var camera := get_viewport().get_camera_3d() if camera == null: return diff --git a/addons/lod/lod_omni_light.gd b/addons/lod/lod_omni_light.gd index 1db23ee..57db015 100644 --- a/addons/lod/lod_omni_light.gd +++ b/addons/lod/lod_omni_light.gd @@ -1,25 +1,25 @@ # Copyright © 2020 Hugo Locurcio and contributors - MIT License # See `LICENSE.md` included in the source distribution for details. -extends OmniLight +extends OmniLight3D class_name LODOmniLight, "lod_omni_light.svg" # If `false`, LOD won't update anymore. This can be used for performance comparison # purposes. -export var enable_lod := true +@export var enable_lod := true # The maximum shadow distance in units. Past this distance, the shadow will be disabled. -export(float, 0.0, 1000.0, 0.1) var shadow_max_distance := 25 +@export var shadow_max_distance := 25 # (float, 0.0, 1000.0, 0.1) # The distance factor at which the shadow starts fading. # A value of 0.0 will result in the smoothest transition whereas a value of 1.0 disables fading. -export(float, 0.0, 1.0, 0.1) var shadow_fade_start := 0.8 +@export var shadow_fade_start := 0.8 # (float, 0.0, 1.0, 0.1) # The maximum shadow distance in units. Past this distance, the light will be hidden. -export(float, 0.0, 1000.0, 0.1) var light_max_distance := 50 +@export var light_max_distance := 50 # (float, 0.0, 1000.0, 0.1) # The distance factor at which the light starts fading. # A value of 0.0 will result in the smoothest transition whereas a value of 1.0 disables fading. -export(float, 0.0, 1.0, 0.1) var light_fade_start := 0.8 +@export var light_fade_start := 0.8 # (float, 0.0, 1.0, 0.1) # The rate at which LODs will be updated (in seconds). Lower values are more reactive # but use more CPU, which is especially noticeable with large amounts of LOD-enabled nodes. @@ -52,7 +52,7 @@ func _ready() -> void: # Add random jitter to the timer to ensure LODs don't all swap at the same time. randomize() - timer += rand_range(0, refresh_rate) + timer += randf_range(0, refresh_rate) # Despite LOD not being related to physics, we chose to run in `_physics_process()` # to minimize the amount of method calls per second (and therefore decrease CPU usage). @@ -61,7 +61,7 @@ func _physics_process(delta: float) -> void: return # We need a camera to do the rest. - var camera := get_viewport().get_camera() + var camera := get_viewport().get_camera_3d() if camera == null: return diff --git a/addons/lod/lod_particles.gd b/addons/lod/lod_particles.gd index 4b9f77c..02bb3fe 100644 --- a/addons/lod/lod_particles.gd +++ b/addons/lod/lod_particles.gd @@ -5,10 +5,10 @@ class_name LODParticles, "lod_particles.svg" # If `false`, LOD won't update anymore. This can be used for performance comparison # purposes. -export var enable_lod := true +@export var enable_lod := true # The maximum particle emitting distance in units. Past this distance, particles will no longer emit. -export(float, 0.0, 1000.0, 0.1) var max_emit_distance := 50 +@export var max_emit_distance := 50 # (float, 0.0, 1000.0, 0.1) # The rate at which LODs will be updated (in seconds). Lower values are more reactive # but use more CPU, which is especially noticeable with large amounts of LOD-enabled nodes. @@ -36,7 +36,7 @@ func _ready() -> void: # Add random jitter to the timer to ensure LODs don't all swap at the same time. randomize() - timer += rand_range(0, refresh_rate) + timer += randf_range(0, refresh_rate) # Despite LOD not being related to physics, we chose to run in `_physics_process()` # to minimize the amount of method calls per second (and therefore decrease CPU usage). @@ -45,7 +45,7 @@ func _physics_process(delta: float) -> void: return # We need a camera to do the rest. - var camera := get_viewport().get_camera() + var camera := get_viewport().get_camera_3d() if camera == null: return diff --git a/addons/lod/lod_spatial.gd b/addons/lod/lod_spatial.gd index 39e811c..86eca73 100644 --- a/addons/lod/lod_spatial.gd +++ b/addons/lod/lod_spatial.gd @@ -1,21 +1,21 @@ # Copyright © 2020 Hugo Locurcio and contributors - MIT License # See `LICENSE.md` included in the source distribution for details. -extends Spatial +extends Node3D class_name LODSpatial, "lod_spatial.svg" # If `false`, LOD won't update anymore. This can be used for performance comparison # purposes. -export var enable_lod := true +@export var enable_lod := true # The maximum LOD 0 (high quality) distance in units. -export(float, 0.0, 1000.0, 0.1) var lod_0_max_distance := 10 +@export var lod_0_max_distance := 10 # (float, 0.0, 1000.0, 0.1) # The maximum LOD 1 (medium quality) distance in units. -export(float, 0.0, 1000.0, 0.1) var lod_1_max_distance := 25 +@export var lod_1_max_distance := 25 # (float, 0.0, 1000.0, 0.1) # The maximum LOD 2 (low quality) distance in units. # Past this distance, all LOD variants are hidden. -export(float, 0.0, 1000.0, 0.1) var lod_2_max_distance := 100 +@export var lod_2_max_distance := 100 # (float, 0.0, 1000.0, 0.1) # The rate at which LODs will be updated (in seconds). Lower values are more reactive # but use more CPU, which is especially noticeable with large amounts of LOD-enabled nodes. @@ -43,7 +43,7 @@ func _ready() -> void: # Add random jitter to the timer to ensure LODs don't all swap at the same time. randomize() - timer += rand_range(0, refresh_rate) + timer += randf_range(0, refresh_rate) # Despite LOD not being related to physics, we chose to run in `_physics_process()` @@ -53,7 +53,7 @@ func _physics_process(delta: float) -> void: return # We need a camera to do the rest. - var camera := get_viewport().get_camera() + var camera := get_viewport().get_camera_3d() if camera == null: return diff --git a/addons/lod/lod_spot_light.gd b/addons/lod/lod_spot_light.gd index 63300ee..99308db 100644 --- a/addons/lod/lod_spot_light.gd +++ b/addons/lod/lod_spot_light.gd @@ -1,25 +1,25 @@ # Copyright © 2020 Hugo Locurcio and contributors - MIT License # See `LICENSE.md` included in the source distribution for details. -extends SpotLight +extends SpotLight3D class_name LODSpotLight, "lod_spot_light.svg" # If `false`, LOD won't update anymore. This can be used for performance comparison # purposes. -export var enable_lod := true +@export var enable_lod := true # The maximum shadow distance in units. Past this distance, the shadow will be disabled. -export(float, 0.0, 1000.0, 0.1) var shadow_max_distance := 25 +@export var shadow_max_distance := 25 # (float, 0.0, 1000.0, 0.1) # The distance factor at which the shadow starts fading. # A value of 0.0 will result in the smoothest transition whereas a value of 1.0 disables fading. -export(float, 0.0, 1.0, 0.1) var shadow_fade_start := 0.8 +@export var shadow_fade_start := 0.8 # (float, 0.0, 1.0, 0.1) # The maximum shadow distance in units. Past this distance, the light will be hidden. -export(float, 0.0, 1000.0, 0.1) var light_max_distance := 50 +@export var light_max_distance := 50 # (float, 0.0, 1000.0, 0.1) # The distance factor at which the light starts fading. # A value of 0.0 will result in the smoothest transition whereas a value of 1.0 disables fading. -export(float, 0.0, 1.0, 0.1) var light_fade_start := 0.8 +@export var light_fade_start := 0.8 # (float, 0.0, 1.0, 0.1) # The rate at which LODs will be updated (in seconds). Lower values are more reactive # but use more CPU, which is especially noticeable with large amounts of LOD-enabled nodes. @@ -52,7 +52,7 @@ func _ready() -> void: # Add random jitter to the timer to ensure LODs don't all swap at the same time. randomize() - timer += rand_range(0, refresh_rate) + timer += randf_range(0, refresh_rate) # Despite LOD not being related to physics, we chose to run in `_physics_process()` # to minimize the amount of method calls per second (and therefore decrease CPU usage). @@ -61,7 +61,7 @@ func _physics_process(delta: float) -> void: return # We need a camera to do the rest. - var camera := get_viewport().get_camera() + var camera := get_viewport().get_camera_3d() if camera == null: return diff --git a/addons/lod/plugin.gd b/addons/lod/plugin.gd index a824c97..6df341a 100644 --- a/addons/lod/plugin.gd +++ b/addons/lod/plugin.gd @@ -1,7 +1,7 @@ +@tool # Copyright © 2020 Hugo Locurcio and contributors - MIT License # See `LICENSE.md` included in the source distribution for details. # # This script is needed to make the `class_name` script visible in the Create New Node dialog # once the plugin is enabled. -tool extends EditorPlugin diff --git a/assets/env/base_env.tres b/assets/env/base_env.tres index e78bbbc..9d82e1e 100644 --- a/assets/env/base_env.tres +++ b/assets/env/base_env.tres @@ -1,8 +1,8 @@ [gd_resource type="Environment" load_steps=3 format=2] -[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture" id=1] +[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture2D" id=1] -[sub_resource type="PanoramaSky" id=2] +[sub_resource type="Sky" id=2] panorama = ExtResource( 1 ) [resource] diff --git a/assets/fonts/MKX_Base.tres b/assets/fonts/MKX_Base.tres index eab3014..329ec66 100644 --- a/assets/fonts/MKX_Base.tres +++ b/assets/fonts/MKX_Base.tres @@ -1,6 +1,6 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] +[gd_resource type="FontFile" load_steps=2 format=2] -[ext_resource path="res://assets/fonts/MKX Title.ttf" type="DynamicFontData" id=1] +[ext_resource path="res://assets/fonts/MKX Title.ttf" type="FontFile" id=1] [resource] size = 30 diff --git a/assets/fonts/kirsty/kirsty_base.tres b/assets/fonts/kirsty/kirsty_base.tres index 6066faf..f5adfa3 100644 --- a/assets/fonts/kirsty/kirsty_base.tres +++ b/assets/fonts/kirsty/kirsty_base.tres @@ -1,6 +1,6 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] +[gd_resource type="FontFile" load_steps=2 format=2] -[ext_resource path="res://assets/fonts/kirsty/kirsty rg.otf" type="DynamicFontData" id=1] +[ext_resource path="res://assets/fonts/kirsty/kirsty rg.otf" type="FontFile" id=1] [resource] use_mipmaps = true diff --git a/assets/fonts/kirsty/kirsty_medium.tres b/assets/fonts/kirsty/kirsty_medium.tres index a144af9..9014abb 100644 --- a/assets/fonts/kirsty/kirsty_medium.tres +++ b/assets/fonts/kirsty/kirsty_medium.tres @@ -1,6 +1,6 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] +[gd_resource type="FontFile" load_steps=2 format=2] -[ext_resource path="res://assets/fonts/kirsty/kirsty rg.otf" type="DynamicFontData" id=1] +[ext_resource path="res://assets/fonts/kirsty/kirsty rg.otf" type="FontFile" id=1] [resource] size = 24 diff --git a/assets/fonts/kirsty/kirsty_title.tres b/assets/fonts/kirsty/kirsty_title.tres index fd86300..d48942a 100644 --- a/assets/fonts/kirsty/kirsty_title.tres +++ b/assets/fonts/kirsty/kirsty_title.tres @@ -1,6 +1,6 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] +[gd_resource type="FontFile" load_steps=2 format=2] -[ext_resource path="res://assets/fonts/kirsty/kirsty bd.otf" type="DynamicFontData" id=1] +[ext_resource path="res://assets/fonts/kirsty/kirsty bd.otf" type="FontFile" id=1] [resource] size = 46 diff --git a/assets/hdri/base_env.tres b/assets/hdri/base_env.tres index d040c81..febfeb1 100644 --- a/assets/hdri/base_env.tres +++ b/assets/hdri/base_env.tres @@ -1,8 +1,8 @@ [gd_resource type="Environment" load_steps=3 format=2] -[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture" id=1] +[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture2D" id=1] -[sub_resource type="PanoramaSky" id=1] +[sub_resource type="Sky" id=1] panorama = ExtResource( 1 ) [resource] diff --git a/assets/materials/gray.tres b/assets/materials/gray.tres index 8f0b982..b1d6442 100644 --- a/assets/materials/gray.tres +++ b/assets/materials/gray.tres @@ -32,7 +32,7 @@ void light() { " nodes/fragment/3/node = SubResource( 1 ) nodes/fragment/3/position = Vector2( 0, 140 ) -nodes/fragment/connections = PoolIntArray( 3, 0, 0, 0 ) +nodes/fragment/connections = PackedInt32Array( 3, 0, 0, 0 ) [resource] shader = SubResource( 2 ) diff --git a/assets/materials/green.tres b/assets/materials/green.tres index 5a26b6b..96106b5 100644 --- a/assets/materials/green.tres +++ b/assets/materials/green.tres @@ -1,13 +1,13 @@ [gd_resource type="ShaderMaterial" load_steps=3 format=2] -[sub_resource type="VisualShaderNodeColorUniform" id=1] +[sub_resource type="VisualShaderNodeColorParameter" id=1] uniform_name = "BaseColor" [sub_resource type="VisualShader" id=2] code = "shader_type spatial; render_mode specular_schlick_ggx; -uniform vec4 BaseColor : hint_color; +uniform vec4 BaseColor : source_color; @@ -34,7 +34,7 @@ void light() { graph_offset = Vector2( -278, -353.75 ) nodes/fragment/5/node = SubResource( 1 ) nodes/fragment/5/position = Vector2( 180, 140 ) -nodes/fragment/connections = PoolIntArray( 5, 0, 0, 0 ) +nodes/fragment/connections = PackedInt32Array( 5, 0, 0, 0 ) [resource] shader = SubResource( 2 ) diff --git a/assets/materials/red.tres b/assets/materials/red.tres index a4ed940..e9fe4ba 100644 --- a/assets/materials/red.tres +++ b/assets/materials/red.tres @@ -1,13 +1,13 @@ [gd_resource type="ShaderMaterial" load_steps=3 format=2] -[sub_resource type="VisualShaderNodeColorUniform" id=1] +[sub_resource type="VisualShaderNodeColorParameter" id=1] uniform_name = "BaseColor" [sub_resource type="VisualShader" id=2] code = "shader_type spatial; render_mode specular_schlick_ggx; -uniform vec4 BaseColor : hint_color; +uniform vec4 BaseColor : source_color; @@ -34,7 +34,7 @@ void light() { graph_offset = Vector2( -278, -353.75 ) nodes/fragment/5/node = SubResource( 1 ) nodes/fragment/5/position = Vector2( 180, 140 ) -nodes/fragment/connections = PoolIntArray( 5, 0, 0, 0 ) +nodes/fragment/connections = PackedInt32Array( 5, 0, 0, 0 ) [resource] shader = SubResource( 2 ) diff --git a/assets/props/book/sm_book.tscn b/assets/props/book/sm_book.tscn index 63a3e80..ce2e43a 100644 --- a/assets/props/book/sm_book.tscn +++ b/assets/props/book/sm_book.tscn @@ -2,9 +2,9 @@ [ext_resource path="res://assets/props/book/sm_book_lod1.mesh" type="ArrayMesh" id=2] -[node name="sm_book" type="Spatial"] +[node name="sm_book" type="Node3D"] -[node name="sm_book-lod1" type="MeshInstance" parent="."] +[node name="sm_book-lod1" type="MeshInstance3D" parent="."] use_in_baked_light = true mesh = ExtResource( 2 ) material/0 = null diff --git a/assets/props/candle/candle.gd b/assets/props/candle/candle.gd index 4722cd3..43aa3ce 100644 --- a/assets/props/candle/candle.gd +++ b/assets/props/candle/candle.gd @@ -1,9 +1,9 @@ -tool -extends Spatial +@tool +extends Node3D -export(bool) var activate_candlestick = false setget activateCandlestick -export(bool) var activate_candle = false setget activateCandle -export(String, "Candle Top", "Candle A", "Candle B", "Candle C", "Candle D") var list_candles +@export var activate_candlestick: bool = false: set = activateCandlestick +@export var activate_candle: bool = false: set = activateCandle +@export var list_candles # (String, "Candle Top", "Candle A", "Candle B", "Candle C", "Candle D") func activateCandlestick(_newCandlestick): pass diff --git a/assets/props/candle/sm_candlestick.tscn b/assets/props/candle/sm_candlestick.tscn index 94bc284..916b223 100644 --- a/assets/props/candle/sm_candlestick.tscn +++ b/assets/props/candle/sm_candlestick.tscn @@ -4,21 +4,21 @@ [ext_resource path="res://assets/props/candle/candle.gd" type="Script" id=2] [ext_resource path="res://assets/props/candle/sm_candle_top_lod1.mesh" type="ArrayMesh" id=3] -[node name="sm_candlestick" type="Spatial"] +[node name="sm_candlestick" type="Node3D"] script = ExtResource( 2 ) -[node name="sm_candlestick_lod1" type="MeshInstance" parent="."] +[node name="sm_candlestick_lod1" type="MeshInstance3D" parent="."] mesh = ExtResource( 1 ) material/0 = null -[node name="candles" type="MeshInstance" parent="sm_candlestick_lod1"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000981584, 0.150082, 0 ) +[node name="candles" type="MeshInstance3D" parent="sm_candlestick_lod1"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000981584, 0.150082, 0 ) use_in_baked_light = true mesh = ExtResource( 3 ) material/0 = null -[node name="OmniLight" type="OmniLight" parent="sm_candlestick_lod1/candles"] -transform = Transform( 1, 5.5022e-09, 1.96774e-13, -5.5022e-09, 1, 1.08271e-21, -1.96774e-13, -2.1654e-21, 1, 1.3737e-08, 0.0619183, -2.98023e-08 ) +[node name="OmniLight3D" type="OmniLight3D" parent="sm_candlestick_lod1/candles"] +transform = Transform3D( 1, 5.5022e-09, 1.96774e-13, -5.5022e-09, 1, 1.08271e-21, -1.96774e-13, -2.1654e-21, 1, 1.3737e-08, 0.0619183, -2.98023e-08 ) visible = false light_color = Color( 0.960784, 0.611765, 0.00784314, 1 ) light_energy = 12.0 diff --git a/assets/props/dagger/dagger.gltf.import b/assets/props/dagger/dagger.gltf.import index d78ffa1..65864bd 100644 --- a/assets/props/dagger/dagger.gltf.import +++ b/assets/props/dagger/dagger.gltf.import @@ -11,7 +11,7 @@ dest_files=[ "res://.import/dagger.gltf-9abeaff593c97cf77a40ff9da7a19949.scn" ] [params] -nodes/root_type="Spatial" +nodes/root_type="Node3D" nodes/root_name="Scene Root" nodes/root_scale=1.0 nodes/custom_script="" diff --git a/assets/props/godet/sm_godet.tscn b/assets/props/godet/sm_godet.tscn index eaaae24..4a51c5d 100644 --- a/assets/props/godet/sm_godet.tscn +++ b/assets/props/godet/sm_godet.tscn @@ -2,9 +2,9 @@ [ext_resource path="res://assets/props/godet/sm_godet_lod1.mesh" type="ArrayMesh" id=1] -[node name="sm_godet" type="Spatial"] +[node name="sm_godet" type="Node3D"] -[node name="sm_godet_lod1" type="MeshInstance" parent="."] +[node name="sm_godet_lod1" type="MeshInstance3D" parent="."] use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null diff --git a/assets/props/growler/sm_growler.tscn b/assets/props/growler/sm_growler.tscn index e5a9248..bdc1da8 100644 --- a/assets/props/growler/sm_growler.tscn +++ b/assets/props/growler/sm_growler.tscn @@ -2,9 +2,9 @@ [ext_resource path="res://assets/props/growler/sm_growler_lod1.mesh" type="ArrayMesh" id=1] -[node name="sm_growler" type="Spatial"] +[node name="sm_growler" type="Node3D"] -[node name="sm_growler_lod1" type="MeshInstance" parent="."] +[node name="sm_growler_lod1" type="MeshInstance3D" parent="."] use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null diff --git a/assets/props/misc/plane.gltf.import b/assets/props/misc/plane.gltf.import index c166a45..3f26e35 100644 --- a/assets/props/misc/plane.gltf.import +++ b/assets/props/misc/plane.gltf.import @@ -11,7 +11,7 @@ dest_files=[ "res://.import/plane.gltf-66ed665b319174d1333eee69632f6e77.scn" ] [params] -nodes/root_type="Spatial" +nodes/root_type="Node3D" nodes/root_name="Scene Root" nodes/root_scale=1.0 nodes/custom_script="" diff --git a/assets/props/parchment/parchment.gd b/assets/props/parchment/parchment.gd index f0d1e20..54ebc84 100644 --- a/assets/props/parchment/parchment.gd +++ b/assets/props/parchment/parchment.gd @@ -1,10 +1,10 @@ -tool -extends Spatial +@tool +extends Node3D -export(bool) var paper +@export var paper: bool func activatePaper(showPaper): - if Engine.editor_hint: + if Engine.is_editor_hint(): paper = showPaper # var parent = get_node(".").name diff --git a/assets/props/parchment/sm_parchment.tscn b/assets/props/parchment/sm_parchment.tscn index cea1f78..c6a9fa3 100644 --- a/assets/props/parchment/sm_parchment.tscn +++ b/assets/props/parchment/sm_parchment.tscn @@ -4,15 +4,15 @@ [ext_resource path="res://assets/props/parchment/parchment.gd" type="Script" id=2] [ext_resource path="res://assets/props/parchment/sm_paperparchment_lod0.mesh" type="ArrayMesh" id=3] -[node name="sm_parchment" type="Spatial"] +[node name="sm_parchment" type="Node3D"] script = ExtResource( 2 ) -[node name="sm_wood_parchment_lod1" type="MeshInstance" parent="."] +[node name="sm_wood_parchment_lod1" type="MeshInstance3D" parent="."] use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null -[node name="paper" type="MeshInstance" parent="."] +[node name="paper" type="MeshInstance3D" parent="."] visible = false use_in_baked_light = true mesh = ExtResource( 3 ) diff --git a/assets/props/stool a/stool a.gltf.import b/assets/props/stool a/stool a.gltf.import index 5c30656..e190e46 100644 --- a/assets/props/stool a/stool a.gltf.import +++ b/assets/props/stool a/stool a.gltf.import @@ -11,7 +11,7 @@ dest_files=[ "res://.import/stool a.gltf-c3791f77fb719c9b265365f0cebb48c1.scn" ] [params] -nodes/root_type="Spatial" +nodes/root_type="Node3D" nodes/root_name="Scene Root" nodes/root_scale=1.0 nodes/custom_script="" diff --git a/assets/props/stool b/sm_stool_2.tscn b/assets/props/stool b/sm_stool_2.tscn index fb27006..7361525 100644 --- a/assets/props/stool b/sm_stool_2.tscn +++ b/assets/props/stool b/sm_stool_2.tscn @@ -2,9 +2,9 @@ [ext_resource path="res://assets/props/stool b/sm_stool_2_lod1.mesh" type="ArrayMesh" id=1] -[node name="sm_stool_b" type="Spatial"] +[node name="sm_stool_b" type="Node3D"] -[node name="sm_stool_2_lod1" type="MeshInstance" parent="."] +[node name="sm_stool_2_lod1" type="MeshInstance3D" parent="."] use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null diff --git a/assets/props/table/sm_table.tscn b/assets/props/table/sm_table.tscn index ee5f60a..f194240 100644 --- a/assets/props/table/sm_table.tscn +++ b/assets/props/table/sm_table.tscn @@ -2,9 +2,9 @@ [ext_resource path="res://assets/props/table/sm_table_lod2.mesh" type="ArrayMesh" id=1] -[node name="sm_table" type="Spatial"] +[node name="sm_table" type="Node3D"] -[node name="sm_table_lod1" type="MeshInstance" parent="."] +[node name="sm_table_lod1" type="MeshInstance3D" parent="."] use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null diff --git a/assets/sounds/ambient-sound-level-warcraft.ogg.import b/assets/sounds/ambient-sound-level-warcraft.ogg.import index fc922ee..2251484 100644 --- a/assets/sounds/ambient-sound-level-warcraft.ogg.import +++ b/assets/sounds/ambient-sound-level-warcraft.ogg.import @@ -1,6 +1,6 @@ [remap] -importer="ogg_vorbis" +importer="oggvorbisstr" type="AudioStreamOGGVorbis" path="res://.import/ambient-sound-level-warcraft.ogg-eca793b67538fcb6a049f7f31dff337d.oggstr" diff --git a/assets/sounds/click-button.ogg.import b/assets/sounds/click-button.ogg.import index 1151be6..53e1769 100644 --- a/assets/sounds/click-button.ogg.import +++ b/assets/sounds/click-button.ogg.import @@ -1,6 +1,6 @@ [remap] -importer="ogg_vorbis" +importer="oggvorbisstr" type="AudioStreamOGGVorbis" path="res://.import/click-button.ogg-80b2cbbc4fed369d32c5a684038e7942.oggstr" diff --git a/assets/sounds/objects/Apple.ogg.import b/assets/sounds/objects/Apple.ogg.import index 7d596ed..30164a6 100644 --- a/assets/sounds/objects/Apple.ogg.import +++ b/assets/sounds/objects/Apple.ogg.import @@ -1,6 +1,6 @@ [remap] -importer="ogg_vorbis" +importer="oggvorbisstr" type="AudioStreamOGGVorbis" path="res://.import/Apple.ogg-f89120a96b14173404c312d1b4ef368e.oggstr" diff --git a/assets/sounds/objects/Beer.ogg.import b/assets/sounds/objects/Beer.ogg.import index 31411df..e2667ee 100644 --- a/assets/sounds/objects/Beer.ogg.import +++ b/assets/sounds/objects/Beer.ogg.import @@ -1,6 +1,6 @@ [remap] -importer="ogg_vorbis" +importer="oggvorbisstr" type="AudioStreamOGGVorbis" path="res://.import/Beer.ogg-0e6bc95a6b45b804996f580a1be3aee0.oggstr" diff --git a/assets/sounds/objects/Coins.ogg.import b/assets/sounds/objects/Coins.ogg.import index 61ae280..f404f96 100644 --- a/assets/sounds/objects/Coins.ogg.import +++ b/assets/sounds/objects/Coins.ogg.import @@ -1,6 +1,6 @@ [remap] -importer="ogg_vorbis" +importer="oggvorbisstr" type="AudioStreamOGGVorbis" path="res://.import/Coins.ogg-f9cdd1d56965eda212616a29dbbeb095.oggstr" diff --git a/assets/sounds/objects/Dagger.ogg.import b/assets/sounds/objects/Dagger.ogg.import index 3211ef1..7ba20f6 100644 --- a/assets/sounds/objects/Dagger.ogg.import +++ b/assets/sounds/objects/Dagger.ogg.import @@ -1,6 +1,6 @@ [remap] -importer="ogg_vorbis" +importer="oggvorbisstr" type="AudioStreamOGGVorbis" path="res://.import/Dagger.ogg-178fe92ff6535d2fb657b61a6eac19d3.oggstr" diff --git a/assets/sounds/objects/Fiole.ogg.import b/assets/sounds/objects/Fiole.ogg.import index b6c3e4c..c1e46f3 100644 --- a/assets/sounds/objects/Fiole.ogg.import +++ b/assets/sounds/objects/Fiole.ogg.import @@ -1,6 +1,6 @@ [remap] -importer="ogg_vorbis" +importer="oggvorbisstr" type="AudioStreamOGGVorbis" path="res://.import/Fiole.ogg-1906e95d5cfcc7fb30df4ed47d615be2.oggstr" diff --git a/assets/sounds/objects/Spyglass.ogg.import b/assets/sounds/objects/Spyglass.ogg.import index 2c4fb3a..a35e1a2 100644 --- a/assets/sounds/objects/Spyglass.ogg.import +++ b/assets/sounds/objects/Spyglass.ogg.import @@ -1,6 +1,6 @@ [remap] -importer="ogg_vorbis" +importer="oggvorbisstr" type="AudioStreamOGGVorbis" path="res://.import/Spyglass.ogg-ba1068305c94ce71d19393b8c494b13c.oggstr" diff --git a/assets/sounds/objects/Weapon Gun.ogg.import b/assets/sounds/objects/Weapon Gun.ogg.import index d1a6d51..08c12db 100644 --- a/assets/sounds/objects/Weapon Gun.ogg.import +++ b/assets/sounds/objects/Weapon Gun.ogg.import @@ -1,6 +1,6 @@ [remap] -importer="ogg_vorbis" +importer="oggvorbisstr" type="AudioStreamOGGVorbis" path="res://.import/Weapon Gun.ogg-6fb518cb7a9f877d5716e766285221ac.oggstr" diff --git a/assets/sounds/victory.ogg.import b/assets/sounds/victory.ogg.import index c249a41..2152ee5 100644 --- a/assets/sounds/victory.ogg.import +++ b/assets/sounds/victory.ogg.import @@ -1,6 +1,6 @@ [remap] -importer="ogg_vorbis" +importer="oggvorbisstr" type="AudioStreamOGGVorbis" path="res://.import/victory.ogg-f200c5ed87d76f20ec981fde28a9e56b.oggstr" diff --git a/default_env.tres b/default_env.tres index 20207a4..1a5570b 100644 --- a/default_env.tres +++ b/default_env.tres @@ -1,6 +1,6 @@ [gd_resource type="Environment" load_steps=2 format=2] -[sub_resource type="ProceduralSky" id=1] +[sub_resource type="Sky" id=1] [resource] background_mode = 2 diff --git a/developers/aurelien/CheckLightmap.gd b/developers/aurelien/CheckLightmap.gd index d8d9a2e..34f9e4e 100644 --- a/developers/aurelien/CheckLightmap.gd +++ b/developers/aurelien/CheckLightmap.gd @@ -1,4 +1,4 @@ -extends Spatial +extends Node3D # Declare member variables here. Examples: diff --git a/developers/aurelien/CheckLightmap.tscn b/developers/aurelien/CheckLightmap.tscn index e24f807..e0cd9e3 100644 --- a/developers/aurelien/CheckLightmap.tscn +++ b/developers/aurelien/CheckLightmap.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=19 format=2] [ext_resource path="res://assets/props/book/sm_book.mesh" type="ArrayMesh" id=1] -[ext_resource path="res://developers/aurelien/CheckLightmap.lmbake" type="BakedLightmapData" id=2] +[ext_resource path="res://developers/aurelien/CheckLightmap.lmbake" type="LightmapGIData" id=2] [ext_resource path="res://developers/aurelien/CheckLightmap.gd" type="Script" id=3] [ext_resource path="res://assets/props/misc/plane.mesh" type="ArrayMesh" id=4] [ext_resource path="res://assets/props/candle/sm_candlestick.mesh" type="ArrayMesh" id=5] @@ -19,11 +19,11 @@ [ext_resource path="res://assets/props/stool b/sm_stool_b.mesh" type="ArrayMesh" id=18] [ext_resource path="res://assets/props/table/sm_table.mesh" type="ArrayMesh" id=19] -[node name="Spatial" type="Spatial"] +[node name="Node3D" type="Node3D"] script = ExtResource( 3 ) -[node name="BakedLightmap" type="BakedLightmap" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.01067, 1.3203, -1.6367 ) +[node name="LightmapGI" type="LightmapGI" parent="."] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.01067, 1.3203, -1.6367 ) extents = Vector3( 3.82531, 1.56454, 4.38589 ) quality = 3 bounces = 5 @@ -36,441 +36,441 @@ light_data = ExtResource( 2 ) [node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = ExtResource( 10 ) -[node name="Camera" type="Camera" parent="."] -transform = Transform( 0.089016, -0.715663, 0.692751, 0, 0.695512, 0.718515, -0.99603, -0.0639593, 0.0619117, 1.67474, 2.13639, -1.14519 ) +[node name="Camera3D" type="Camera3D" parent="."] +transform = Transform3D( 0.089016, -0.715663, 0.692751, 0, 0.695512, 0.718515, -0.99603, -0.0639593, 0.0619117, 1.67474, 2.13639, -1.14519 ) -[node name="plane" type="MeshInstance" parent="."] -transform = Transform( 8.39917, 0, 0, 0, 1, 0, 0, 0, 11.9516, -0.796654, 0, -1.7752 ) +[node name="plane" type="MeshInstance3D" parent="."] +transform = Transform3D( 8.39917, 0, 0, 0, 1, 0, 0, 0, 11.9516, -0.796654, 0, -1.7752 ) use_in_baked_light = true mesh = ExtResource( 4 ) material/0 = null -[node name="Lighting" type="Spatial" parent="."] +[node name="Lighting" type="Node3D" parent="."] -[node name="SpotLight2" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, 0.479468 ) +[node name="SpotLight2" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, 0.479468 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight5" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -0.597942 ) +[node name="SpotLight5" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -0.597942 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight4" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -0.234948 ) +[node name="SpotLight4" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -0.234948 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight3" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, 0.149649 ) +[node name="SpotLight3" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, 0.149649 ) light_color = Color( 0.227451, 0.564706, 0.262745, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight6" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -1.7265 ) +[node name="SpotLight6" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -1.7265 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight7" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -1.36351 ) +[node name="SpotLight7" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -1.36351 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight8" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -0.978908 ) +[node name="SpotLight8" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -0.978908 ) light_color = Color( 0.227451, 0.564706, 0.262745, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight9" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -2.81604 ) +[node name="SpotLight9" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -2.81604 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight10" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -2.45304 ) +[node name="SpotLight10" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -2.45304 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight11" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -2.06845 ) +[node name="SpotLight11" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -2.06845 ) light_color = Color( 0.227451, 0.564706, 0.262745, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight12" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -3.94141 ) +[node name="SpotLight12" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -3.94141 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight13" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -3.57842 ) +[node name="SpotLight13" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -3.57842 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight14" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -3.19382 ) +[node name="SpotLight14" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -3.19382 ) light_color = Color( 0.227451, 0.564706, 0.262745, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight15" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -5.07697 ) +[node name="SpotLight15" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -5.07697 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight16" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -4.71398 ) +[node name="SpotLight16" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -4.71398 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight17" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -4.32938 ) +[node name="SpotLight17" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.41082, 0.959701, -4.32938 ) light_color = Color( 0.227451, 0.564706, 0.262745, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight18" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, 0.479468 ) +[node name="SpotLight18" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, 0.479468 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight19" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -0.597942 ) +[node name="SpotLight19" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -0.597942 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight20" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -0.234948 ) +[node name="SpotLight20" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -0.234948 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight21" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, 0.149649 ) +[node name="SpotLight21" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, 0.149649 ) light_color = Color( 0.227451, 0.564706, 0.262745, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight22" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -1.7265 ) +[node name="SpotLight22" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -1.7265 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight23" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -1.36351 ) +[node name="SpotLight23" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -1.36351 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight24" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -0.978908 ) +[node name="SpotLight24" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -0.978908 ) light_color = Color( 0.227451, 0.564706, 0.262745, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight25" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -2.81604 ) +[node name="SpotLight25" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -2.81604 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight26" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -2.45304 ) +[node name="SpotLight26" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -2.45304 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight27" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -2.06845 ) +[node name="SpotLight27" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -2.06845 ) light_color = Color( 0.227451, 0.564706, 0.262745, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight28" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -3.94141 ) +[node name="SpotLight28" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -3.94141 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight29" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -3.57842 ) +[node name="SpotLight29" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -3.57842 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight30" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -3.19382 ) +[node name="SpotLight30" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -3.19382 ) light_color = Color( 0.227451, 0.564706, 0.262745, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight31" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -5.07697 ) +[node name="SpotLight31" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -5.07697 ) light_color = Color( 0.564706, 0.227451, 0.227451, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight32" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -4.71398 ) +[node name="SpotLight32" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -4.71398 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="SpotLight33" type="SpotLight" parent="Lighting"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -4.32938 ) +[node name="SpotLight33" type="SpotLight3D" parent="Lighting"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.92602, 1.57864, -4.32938 ) light_color = Color( 0.227451, 0.564706, 0.262745, 1 ) light_bake_mode = 2 shadow_enabled = true spot_angle = 15.0 -[node name="Books" type="Spatial" parent="."] +[node name="Books" type="Node3D" parent="."] -[node name="sm_book4" type="MeshInstance" parent="Books"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.743055, 0.0414186, 1.03485 ) +[node name="sm_book4" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.743055, 0.0414186, 1.03485 ) use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null -[node name="sm_book5" type="MeshInstance" parent="Books"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0423009, 0.0414186, 1.05613 ) +[node name="sm_book5" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0423009, 0.0414186, 1.05613 ) use_in_baked_light = true lightmap_scale = 3 mesh = ExtResource( 1 ) material/0 = null -[node name="sm_book11" type="MeshInstance" parent="Books"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0423009, 0.0414186, 1.52165 ) +[node name="sm_book11" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0423009, 0.0414186, 1.52165 ) use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null -[node name="sm_book6" type="MeshInstance" parent="Books"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.293967, 0.0414186, 1.03485 ) +[node name="sm_book6" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.293967, 0.0414186, 1.03485 ) use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null -[node name="sm_book7" type="MeshInstance" parent="Books"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.743055, 0.0414186, 1.51383 ) +[node name="sm_book7" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.743055, 0.0414186, 1.51383 ) use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null -[node name="sm_book8" type="MeshInstance" parent="Books"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.293967, 0.0414186, 1.51383 ) +[node name="sm_book8" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.293967, 0.0414186, 1.51383 ) use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null -[node name="sm_book" type="MeshInstance" parent="Books"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0435888, 0.106022 ) +[node name="sm_book" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0435888, 0.106022 ) use_in_baked_light = true lightmap_scale = 1 mesh = ExtResource( 1 ) material/0 = null -[node name="sm_book2" type="MeshInstance" parent="Books"] -transform = Transform( 0.276862, 0, 0.96091, 0, 1, 0, -0.96091, 0, 0.276862, -0.104465, 0.0414188, 0.547756 ) +[node name="sm_book2" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 0.276862, 0, 0.96091, 0, 1, 0, -0.96091, 0, 0.276862, -0.104465, 0.0414188, 0.547756 ) use_in_baked_light = true lightmap_scale = 1 mesh = ExtResource( 1 ) material/0 = null -[node name="sm_book3" type="MeshInstance" parent="Books"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.381911, 0.0414187, 1.03881 ) +[node name="sm_book3" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.381911, 0.0414187, 1.03881 ) use_in_baked_light = true lightmap_scale = 1 mesh = ExtResource( 1 ) material/0 = null -[node name="sm_book10" type="MeshInstance" parent="Books"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.381911, 0.0414187, 0.331732 ) +[node name="sm_book10" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.381911, 0.0414187, 0.331732 ) use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null -[node name="sm_book9" type="MeshInstance" parent="Books"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.381911, 0.0414187, 1.53911 ) +[node name="sm_book9" type="MeshInstance3D" parent="Books"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.381911, 0.0414187, 1.53911 ) use_in_baked_light = true mesh = ExtResource( 1 ) material/0 = null -[node name="Candle" type="Spatial" parent="."] +[node name="Candle" type="Node3D" parent="."] -[node name="sm_candlestick" type="MeshInstance" parent="Candle"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.26949, -0.000247162, -0.190021 ) +[node name="sm_candlestick" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.26949, -0.000247162, -0.190021 ) use_in_baked_light = true lightmap_scale = 1 mesh = ExtResource( 5 ) material/0 = null -[node name="sm_candlestick2" type="MeshInstance" parent="Candle"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.477435, -0.000247162, -0.190021 ) +[node name="sm_candlestick2" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.477435, -0.000247162, -0.190021 ) use_in_baked_light = true lightmap_scale = 1 mesh = ExtResource( 5 ) material/0 = null -[node name="sm_candle_a" type="MeshInstance" parent="Candle"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.460123, 0.0295914, 0.0291587 ) +[node name="sm_candle_a" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.460123, 0.0295914, 0.0291587 ) use_in_baked_light = true mesh = ExtResource( 9 ) material/0 = null -[node name="sm_candle_a2" type="MeshInstance" parent="Candle"] -transform = Transform( 3, 0, 0, 0, 3, 0, 0, 0, 3, 0.291979, 0.0295914, 0.0291587 ) +[node name="sm_candle_a2" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 3, 0, 0, 0, 3, 0, 0, 0, 3, 0.291979, 0.0295914, 0.0291587 ) use_in_baked_light = true mesh = ExtResource( 9 ) material/0 = null -[node name="sm_candle_b" type="MeshInstance" parent="Candle"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.469327, 0.0330793, -0.387681 ) +[node name="sm_candle_b" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.469327, 0.0330793, -0.387681 ) use_in_baked_light = true mesh = ExtResource( 7 ) material/0 = null -[node name="sm_candle_b2" type="MeshInstance" parent="Candle"] -transform = Transform( 1.83922, 0, 0, 0, 1.83922, 0, 0, 0, 1.83922, 0.271941, 0.0630442, -0.414322 ) +[node name="sm_candle_b2" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 1.83922, 0, 0, 0, 1.83922, 0, 0, 0, 1.83922, 0.271941, 0.0630442, -0.414322 ) use_in_baked_light = true mesh = ExtResource( 7 ) material/0 = null -[node name="sm_candle_d" type="MeshInstance" parent="Candle"] -transform = Transform( 2.21301, 0, 0, 0, 2.21301, 0, 0, 0, 2.21301, 0.470213, 0.0446767, -0.844206 ) +[node name="sm_candle_d" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 2.21301, 0, 0, 0, 2.21301, 0, 0, 0, 2.21301, 0.470213, 0.0446767, -0.844206 ) use_in_baked_light = true mesh = ExtResource( 11 ) material/0 = null -[node name="sm_candle_d2" type="MeshInstance" parent="Candle"] -transform = Transform( 3.61366, 0, 0, 0, 3.61366, 0, 0, 0, 3.61366, 0.199182, 0.12495, -0.844578 ) +[node name="sm_candle_d2" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 3.61366, 0, 0, 0, 3.61366, 0, 0, 0, 3.61366, 0.199182, 0.12495, -0.844578 ) use_in_baked_light = true mesh = ExtResource( 11 ) material/0 = null -[node name="sm_candle_c" type="MeshInstance" parent="Candle"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.473356, 0.0278057, -0.559005 ) +[node name="sm_candle_c" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.473356, 0.0278057, -0.559005 ) use_in_baked_light = true mesh = ExtResource( 8 ) material/0 = null -[node name="sm_candle_c2" type="MeshInstance" parent="Candle"] -transform = Transform( 2.21301, 0, 0, 0, 2.21301, 0, 0, 0, 2.21301, 0.283916, 0.0534962, -0.597519 ) +[node name="sm_candle_c2" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 2.21301, 0, 0, 0, 2.21301, 0, 0, 0, 2.21301, 0.283916, 0.0534962, -0.597519 ) use_in_baked_light = true mesh = ExtResource( 8 ) material/0 = null -[node name="sm_candle_top" type="MeshInstance" parent="Candle"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.502775, 0.0267428, -1.04497 ) +[node name="sm_candle_top" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.502775, 0.0267428, -1.04497 ) use_in_baked_light = true mesh = ExtResource( 12 ) material/0 = null -[node name="sm_candle_top2" type="MeshInstance" parent="Candle"] -transform = Transform( 3.02964, 0, 0, 0, 3.02964, 0, 0, 0, 3.02964, 0.323108, 0.0842445, -1.08129 ) +[node name="sm_candle_top2" type="MeshInstance3D" parent="Candle"] +transform = Transform3D( 3.02964, 0, 0, 0, 3.02964, 0, 0, 0, 3.02964, 0.323108, 0.0842445, -1.08129 ) use_in_baked_light = true mesh = ExtResource( 12 ) material/0 = null -[node name="sm_godet" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.496689, 0.0078643, -1.39236 ) +[node name="sm_godet" type="MeshInstance3D" parent="."] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.496689, 0.0078643, -1.39236 ) use_in_baked_light = true mesh = ExtResource( 13 ) material/0 = null -[node name="sm_wood_parchment" type="MeshInstance" parent="."] -transform = Transform( -0.582776, 0, -0.812633, 0, 1, 0, 0.812633, 0, -0.582776, 0.56408, 0.0561891, -3.02517 ) +[node name="sm_wood_parchment" type="MeshInstance3D" parent="."] +transform = Transform3D( -0.582776, 0, -0.812633, 0, 1, 0, 0.812633, 0, -0.582776, 0.56408, 0.0561891, -3.02517 ) use_in_baked_light = true mesh = ExtResource( 16 ) material/0 = null -[node name="sm_wood_parchment2" type="MeshInstance" parent="."] -transform = Transform( -1.33197, 0, -0.568074, 0, 1.53487, 0, 0.762673, 0, -0.992113, 0.315509, 0.0907792, -3.01831 ) +[node name="sm_wood_parchment2" type="MeshInstance3D" parent="."] +transform = Transform3D( -1.33197, 0, -0.568074, 0, 1.53487, 0, 0.762673, 0, -0.992113, 0.315509, 0.0907792, -3.01831 ) use_in_baked_light = true mesh = ExtResource( 16 ) material/0 = null -[node name="sm_paper_parcment" type="MeshInstance" parent="."] -transform = Transform( 0.00464255, 0, -0.999989, 0, 1, 0, 0.999989, 0, 0.00464255, 0.602608, -0.0039514, -2.28984 ) +[node name="sm_paper_parcment" type="MeshInstance3D" parent="."] +transform = Transform3D( 0.00464255, 0, -0.999989, 0, 1, 0, 0.999989, 0, 0.00464255, 0.602608, -0.0039514, -2.28984 ) use_in_baked_light = true mesh = ExtResource( 15 ) material/0 = null -[node name="sm_paper_parcment2" type="MeshInstance" parent="."] -transform = Transform( 0.164983, 0, 1.25894, 0, 1.26971, 0, -1.25894, 0, 0.164983, 0.21995, -0.00395134, -2.34543 ) +[node name="sm_paper_parcment2" type="MeshInstance3D" parent="."] +transform = Transform3D( 0.164983, 0, 1.25894, 0, 1.26971, 0, -1.25894, 0, 0.164983, 0.21995, -0.00395134, -2.34543 ) use_in_baked_light = true mesh = ExtResource( 15 ) material/0 = null -[node name="sm_growler" type="MeshInstance" parent="."] -transform = Transform( 0.605072, 0, 0.796171, 0, 1, 0, -0.796171, 0, 0.605072, 0.506431, 0, -1.78796 ) +[node name="sm_growler" type="MeshInstance3D" parent="."] +transform = Transform3D( 0.605072, 0, 0.796171, 0, 1, 0, -0.796171, 0, 0.605072, 0.506431, 0, -1.78796 ) use_in_baked_light = true mesh = ExtResource( 14 ) material/0 = null -[node name="sm_growler2" type="MeshInstance" parent="."] -transform = Transform( -0.881676, 0, -1.078, 0, 1.39264, 0, 1.078, 0, -0.881676, 0.162736, -0.000296712, -1.78636 ) +[node name="sm_growler2" type="MeshInstance3D" parent="."] +transform = Transform3D( -0.881676, 0, -1.078, 0, 1.39264, 0, 1.078, 0, -0.881676, 0.162736, -0.000296712, -1.78636 ) use_in_baked_light = true mesh = ExtResource( 14 ) material/0 = null -[node name="sm_godet2" type="MeshInstance" parent="."] -transform = Transform( 1.74966, 0, 0, 0, 1.74966, 0, 0, 0, 1.74966, 0.277748, 0.0325533, -1.39477 ) +[node name="sm_godet2" type="MeshInstance3D" parent="."] +transform = Transform3D( 1.74966, 0, 0, 0, 1.74966, 0, 0, 0, 1.74966, 0.277748, 0.0325533, -1.39477 ) use_in_baked_light = true mesh = ExtResource( 13 ) material/0 = null -[node name="sm_floor" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.39092, 0.0131278, -4.30235 ) +[node name="sm_floor" type="MeshInstance3D" parent="."] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.39092, 0.0131278, -4.30235 ) use_in_baked_light = true mesh = ExtResource( 17 ) material/0 = null -[node name="sm_table" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.60057, 0.781203, -0.818648 ) +[node name="sm_table" type="MeshInstance3D" parent="."] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.60057, 0.781203, -0.818648 ) use_in_baked_light = true mesh = ExtResource( 19 ) material/0 = null -[node name="sm_stool_b" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.71977, -3.03984e-06, -2.63978 ) +[node name="sm_stool_b" type="MeshInstance3D" parent="."] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.71977, -3.03984e-06, -2.63978 ) use_in_baked_light = true mesh = ExtResource( 18 ) material/0 = null diff --git a/developers/aurelien/ui/ui_grid_tabs.tscn b/developers/aurelien/ui/ui_grid_tabs.tscn index fdcf921..bc7ad53 100644 --- a/developers/aurelien/ui/ui_grid_tabs.tscn +++ b/developers/aurelien/ui/ui_grid_tabs.tscn @@ -14,34 +14,34 @@ anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 3 size_flags_vertical = 3 -custom_constants/vseparation = 10 -custom_constants/hseparation = 10 +theme_override_constants/v_separation = 10 +theme_override_constants/h_separation = 10 columns = 2 __meta__ = { "_edit_use_anchors_": false } [node name="TabContainerGeneral" type="TabContainer" parent="GridContainer"] -margin_right = 635.0 -margin_bottom = 233.0 +offset_right = 635.0 +offset_bottom = 233.0 size_flags_horizontal = 3 size_flags_vertical = 3 -tab_align = 0 +tab_alignment = 0 -[node name="Generale" type="Tabs" parent="GridContainer/TabContainerGeneral"] +[node name="Generale" type="TabBar" parent="GridContainer/TabContainerGeneral"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 32.0 -margin_right = 36.0 -margin_bottom = 20.0 +offset_left = 4.0 +offset_top = 32.0 +offset_right = 36.0 +offset_bottom = 20.0 size_flags_horizontal = 3 size_flags_vertical = 3 scrolling_enabled = false [node name="RichTextLabel" type="RichTextLabel" parent="GridContainer/TabContainerGeneral/Generale"] -margin_right = 624.0 -margin_bottom = 221.0 +offset_right = 624.0 +offset_bottom = 221.0 size_flags_horizontal = 3 size_flags_vertical = 3 text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit. @@ -54,21 +54,21 @@ __meta__ = { } [node name="TabContainerMobile" type="TabContainer" parent="GridContainer"] -margin_left = 645.0 -margin_right = 1280.0 -margin_bottom = 233.0 +offset_left = 645.0 +offset_right = 1280.0 +offset_bottom = 233.0 size_flags_horizontal = 3 size_flags_vertical = 3 -tab_align = 0 +tab_alignment = 0 -[node name="Mobile" type="Tabs" parent="GridContainer/TabContainerMobile"] +[node name="Mobile" type="TabBar" parent="GridContainer/TabContainerMobile"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 32.0 -margin_right = -4.0 -margin_bottom = -4.0 -tab_align = 0 +offset_left = 4.0 +offset_top = 32.0 +offset_right = -4.0 +offset_bottom = -4.0 +tab_alignment = 0 [node name="RichTextLabel" type="RichTextLabel" parent="GridContainer/TabContainerMobile/Mobile"] anchor_right = 1.0 @@ -82,21 +82,21 @@ __meta__ = { } [node name="TabContainerSound" type="TabContainer" parent="GridContainer"] -margin_top = 243.0 -margin_right = 635.0 -margin_bottom = 476.0 +offset_top = 243.0 +offset_right = 635.0 +offset_bottom = 476.0 size_flags_horizontal = 3 size_flags_vertical = 3 -tab_align = 0 +tab_alignment = 0 -[node name="Sound" type="Tabs" parent="GridContainer/TabContainerSound"] +[node name="Sound" type="TabBar" parent="GridContainer/TabContainerSound"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 32.0 -margin_right = -4.0 -margin_bottom = -4.0 -tab_align = 0 +offset_left = 4.0 +offset_top = 32.0 +offset_right = -4.0 +offset_bottom = -4.0 +tab_alignment = 0 [node name="RichTextLabel2" type="RichTextLabel" parent="GridContainer/TabContainerSound/Sound"] anchor_right = 1.0 @@ -110,22 +110,22 @@ __meta__ = { } [node name="TabContainerGraphisme" type="TabContainer" parent="GridContainer"] -margin_left = 645.0 -margin_top = 243.0 -margin_right = 1280.0 -margin_bottom = 476.0 +offset_left = 645.0 +offset_top = 243.0 +offset_right = 1280.0 +offset_bottom = 476.0 size_flags_horizontal = 3 size_flags_vertical = 3 -tab_align = 0 +tab_alignment = 0 -[node name="Graphisme" type="Tabs" parent="GridContainer/TabContainerGraphisme"] +[node name="Graphisme" type="TabBar" parent="GridContainer/TabContainerGraphisme"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 32.0 -margin_right = -4.0 -margin_bottom = -4.0 -tab_align = 0 +offset_left = 4.0 +offset_top = 32.0 +offset_right = -4.0 +offset_bottom = -4.0 +tab_alignment = 0 scrolling_enabled = false [node name="RichTextLabel" type="RichTextLabel" parent="GridContainer/TabContainerGraphisme/Graphisme"] @@ -146,21 +146,21 @@ __meta__ = { } [node name="TabContainerSound2" type="TabContainer" parent="GridContainer"] -margin_top = 486.0 -margin_right = 635.0 -margin_bottom = 719.0 +offset_top = 486.0 +offset_right = 635.0 +offset_bottom = 719.0 size_flags_horizontal = 3 size_flags_vertical = 3 -tab_align = 0 +tab_alignment = 0 -[node name="Sound" type="Tabs" parent="GridContainer/TabContainerSound2"] +[node name="Sound" type="TabBar" parent="GridContainer/TabContainerSound2"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 32.0 -margin_right = -4.0 -margin_bottom = -4.0 -tab_align = 0 +offset_left = 4.0 +offset_top = 32.0 +offset_right = -4.0 +offset_bottom = -4.0 +tab_alignment = 0 [node name="RichTextLabel2" type="RichTextLabel" parent="GridContainer/TabContainerSound2/Sound"] anchor_right = 1.0 @@ -174,22 +174,22 @@ __meta__ = { } [node name="TabContainerGraphisme2" type="TabContainer" parent="GridContainer"] -margin_left = 645.0 -margin_top = 486.0 -margin_right = 1280.0 -margin_bottom = 719.0 +offset_left = 645.0 +offset_top = 486.0 +offset_right = 1280.0 +offset_bottom = 719.0 size_flags_horizontal = 3 size_flags_vertical = 3 -tab_align = 0 +tab_alignment = 0 -[node name="Graphisme" type="Tabs" parent="GridContainer/TabContainerGraphisme2"] +[node name="Graphisme" type="TabBar" parent="GridContainer/TabContainerGraphisme2"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 32.0 -margin_right = -4.0 -margin_bottom = -4.0 -tab_align = 0 +offset_left = 4.0 +offset_top = 32.0 +offset_right = -4.0 +offset_bottom = -4.0 +tab_alignment = 0 scrolling_enabled = false [node name="RichTextLabel" type="RichTextLabel" parent="GridContainer/TabContainerGraphisme2/Graphisme"] diff --git a/developers/aurelien/ui/ui_scrolls.tscn b/developers/aurelien/ui/ui_scrolls.tscn index b73c5e2..a8897dc 100644 --- a/developers/aurelien/ui/ui_scrolls.tscn +++ b/developers/aurelien/ui/ui_scrolls.tscn @@ -9,33 +9,33 @@ __meta__ = { } [node name="MarginContainer" type="MarginContainer" parent="."] -margin_right = 1280.0 -margin_bottom = 1280.0 -rect_min_size = Vector2( 1280, 1280 ) +offset_right = 1280.0 +offset_bottom = 1280.0 +custom_minimum_size = Vector2( 1280, 1280 ) size_flags_horizontal = 3 size_flags_vertical = 3 -custom_constants/margin_right = 10 -custom_constants/margin_top = 10 -custom_constants/margin_left = 10 -custom_constants/margin_bottom = 10 +theme_override_constants/margin_right = 10 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_left = 10 +theme_override_constants/margin_bottom = 10 [node name="TabContainerGeneral" type="TabContainer" parent="MarginContainer"] -margin_left = 10.0 -margin_top = 10.0 -margin_right = 1270.0 -margin_bottom = 1270.0 -rect_min_size = Vector2( 0, 1080 ) +offset_left = 10.0 +offset_top = 10.0 +offset_right = 1270.0 +offset_bottom = 1270.0 +custom_minimum_size = Vector2( 0, 1080 ) size_flags_horizontal = 3 size_flags_vertical = 3 -tab_align = 0 +tab_alignment = 0 -[node name="Generale" type="Tabs" parent="MarginContainer/TabContainerGeneral"] +[node name="Generale" type="TabBar" parent="MarginContainer/TabContainerGeneral"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 32.0 -margin_right = -4.0 -margin_bottom = -4.0 +offset_left = 4.0 +offset_top = 32.0 +offset_right = -4.0 +offset_bottom = -4.0 size_flags_horizontal = 3 size_flags_vertical = 3 scrolling_enabled = false diff --git a/developers/aurelien/ui/ui_tile.tscn b/developers/aurelien/ui/ui_tile.tscn index f671bcf..054d9d0 100644 --- a/developers/aurelien/ui/ui_tile.tscn +++ b/developers/aurelien/ui/ui_tile.tscn @@ -1,17 +1,17 @@ [gd_scene load_steps=5 format=2] -[ext_resource path="res://assets/ui/themes/tab_select/UI-level-btn-leather.png" type="Texture" id=1] -[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Count.png" type="Texture" id=2] -[ext_resource path="res://assets/ui/themes/tab_select/UI-level-btn-shadow.png" type="Texture" id=3] -[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset.png" type="Texture" id=4] +[ext_resource path="res://assets/ui/themes/tab_select/UI-level-btn-leather.png" type="Texture2D" id=1] +[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Count.png" type="Texture2D" id=2] +[ext_resource path="res://assets/ui/themes/tab_select/UI-level-btn-shadow.png" type="Texture2D" id=3] +[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset.png" type="Texture2D" id=4] [node name="Control" type="Control"] anchor_left = 0.5 anchor_right = 0.5 -margin_left = -639.646 -margin_top = 0.707092 -margin_right = 640.354 -margin_bottom = 720.707 +offset_left = -639.646 +offset_top = 0.707092 +offset_right = 640.354 +offset_bottom = 720.707 size_flags_horizontal = 0 size_flags_vertical = 0 __meta__ = { @@ -21,9 +21,9 @@ __meta__ = { [node name="BckShadow" type="TextureRect" parent="."] anchor_left = 0.5 anchor_right = 0.5 -margin_left = -227.0 -margin_right = 228.0 -margin_bottom = 720.0 +offset_left = -227.0 +offset_right = 228.0 +offset_bottom = 720.0 texture = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": false @@ -32,65 +32,65 @@ __meta__ = { [node name="MarginContainer" type="MarginContainer" parent="."] anchor_left = 0.5 anchor_right = 0.5 -margin_left = -228.5 -margin_right = 228.5 -margin_bottom = 436.0 -custom_constants/margin_right = 20 -custom_constants/margin_top = 20 -custom_constants/margin_left = 20 -custom_constants/margin_bottom = 0 +offset_left = -228.5 +offset_right = 228.5 +offset_bottom = 436.0 +theme_override_constants/margin_right = 20 +theme_override_constants/margin_top = 20 +theme_override_constants/margin_left = 20 +theme_override_constants/margin_bottom = 0 __meta__ = { "_edit_use_anchors_": false } [node name="AlignColumn" type="VBoxContainer" parent="MarginContainer"] -margin_left = 20.0 -margin_top = 20.0 -margin_right = 437.0 -margin_bottom = 549.0 -custom_constants/separation = 0 +offset_left = 20.0 +offset_top = 20.0 +offset_right = 437.0 +offset_bottom = 549.0 +theme_override_constants/separation = 0 __meta__ = { "_edit_use_anchors_": false } [node name="TextureRect" type="TextureRect" parent="MarginContainer/AlignColumn"] -margin_right = 417.0 -margin_bottom = 416.0 +offset_right = 417.0 +offset_bottom = 416.0 texture = ExtResource( 1 ) [node name="VBoxContainer" type="HBoxContainer" parent="MarginContainer/AlignColumn"] -margin_top = 416.0 -margin_right = 417.0 -margin_bottom = 529.0 -custom_constants/separation = 0 +offset_top = 416.0 +offset_right = 417.0 +offset_bottom = 529.0 +theme_override_constants/separation = 0 alignment = 1 [node name="TextureRect2" type="TextureRect" parent="MarginContainer/AlignColumn/VBoxContainer"] -margin_left = 7.0 -margin_right = 185.0 -margin_bottom = 113.0 +offset_left = 7.0 +offset_right = 185.0 +offset_bottom = 113.0 size_flags_horizontal = 0 texture = ExtResource( 4 ) [node name="TextureRect3" type="TextureRect" parent="MarginContainer/AlignColumn/VBoxContainer"] -margin_left = 185.0 -margin_right = 410.0 -margin_bottom = 113.0 -rect_pivot_offset = Vector2( -231.224, -72.2715 ) +offset_left = 185.0 +offset_right = 410.0 +offset_bottom = 113.0 +pivot_offset = Vector2( -231.224, -72.2715 ) size_flags_horizontal = 0 texture = ExtResource( 2 ) [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/AlignColumn/VBoxContainer/TextureRect3"] anchor_right = 1.0 anchor_bottom = 1.0 -custom_constants/margin_bottom = 10 +theme_override_constants/margin_bottom = 10 __meta__ = { "_edit_use_anchors_": false } [node name="Label" type="Label" parent="MarginContainer/AlignColumn/VBoxContainer/TextureRect3/MarginContainer"] -margin_right = 225.0 -margin_bottom = 103.0 +offset_right = 225.0 +offset_bottom = 103.0 size_flags_horizontal = 3 size_flags_vertical = 7 text = "X / 10" diff --git a/project.godot b/project.godot index 5b5b90a..456fb6a 100644 --- a/project.godot +++ b/project.godot @@ -1,3 +1,4 @@ +; Project was converted by built-in tool to Godot 4 ; Engine configuration file. ; It's best edited using the editor UI and not directly, ; since the parameters that go here are not all obvious. @@ -6,7 +7,7 @@ ; [section] ; section goes between [] ; param=value ; assign values to parameters -config_version=4 +config_version=5 _global_script_classes=[ { "base": "Node", @@ -223,8 +224,8 @@ GlobalAnimation="*res://scripts/Animation.gd" [display] -window/size/width=1280 -window/size/height=720 +window/size/viewport_width=1280 +window/size/viewport_height=720 window/size/resizable=false window/dpi/allow_hidpi=true window/handheld/orientation="sensor_landscape" @@ -233,7 +234,7 @@ window/stretch/aspect="expand" [editor_plugins] -enabled=PoolStringArray( "res://addons/godot_db_manager/plugin.cfg", "res://addons/lod/plugin.cfg" ) +enabled=PackedStringArray( "res://addons/godot_db_manager/plugin.cfg", "res://addons/lod/plugin.cfg" ) [importer_defaults] @@ -251,14 +252,14 @@ scene={ ui_end={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777230,"physical_scancode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"command":false,"pressed":false,"keycode":4194318,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"command":false,"pressed":false,"keycode":4194305,"physical_keycode":0,"unicode":0,"echo":false,"script":null) ] } [locale] -translations=PoolStringArray( "res://locales/fr.po", "res://locales/en.po" ) +translations=PackedStringArray( "res://locales/fr.po", "res://locales/en.po" ) locale_filter=[ 1, [ "en_GB", "fr_FR" ] ] [physics] @@ -270,8 +271,8 @@ common/enable_pause_aware_picking=true quality/driver/fallback_to_gles2=true threads/thread_model=2 vram_compression/import_etc=true -quality/shading/force_vertex_shading.mobile=false +shading/overrides/force_vertex_shading.mobile=false quality/lightmapping/use_bicubic_sampling.mobile=true quality/depth/hdr.mobile=true -environment/default_environment="res://default_env.tres" +environment/defaults/default_environment="res://default_env.tres" quality/dynamic_fonts/use_oversampling=false diff --git a/scenes/Main.gd b/scenes/Main.gd index 838e264..1e42f5e 100644 --- a/scenes/Main.gd +++ b/scenes/Main.gd @@ -1,12 +1,12 @@ extends Node -export (PackedScene) var title = load("res://scenes/UI/title/Title.tscn") -export (PackedScene) var setting = load("res://scenes/UI/settings/Settings.tscn") -export (PackedScene) var choose_scene = load("res://scenes/UI/choose_scenes/ChooseScene.tscn") +@export var title: PackedScene = load("res://scenes/UI/title/Title.tscn") +@export var setting: PackedScene = load("res://scenes/UI/settings/Settings.tscn") +@export var choose_scene: PackedScene = load("res://scenes/UI/choose_scenes/ChooseScene.tscn") -onready var current_scene = "title" -onready var stream_button = preload("res://assets/sounds/click-button.ogg") -onready var home = $MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/CenterContainer/TextureRect +@onready var current_scene = "title" +@onready var stream_button = preload("res://assets/sounds/click-button.ogg") +@onready var home = $MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/CenterContainer/TextureRect func _ready(): _translation() @@ -32,7 +32,7 @@ func _apply_scene(actual_scene): if node.get_child_count() != 0: node.get_child(0).queue_free() - node.add_child(actual_scene.instance()) + node.add_child(actual_scene.instantiate()) # Load scene for select game func _on_ButtonPuzzle_pressed(): diff --git a/scenes/Main.tscn b/scenes/Main.tscn index 16a0680..c774cfb 100644 --- a/scenes/Main.tscn +++ b/scenes/Main.tscn @@ -23,61 +23,61 @@ __meta__ = { } [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"] -margin_right = 1280.0 -margin_bottom = 720.0 +offset_right = 1280.0 +offset_bottom = 720.0 [node name="UI_summary" parent="MarginContainer/HBoxContainer" instance=ExtResource( 8 )] anchor_bottom = 0.0 -margin_right = 446.0 -margin_bottom = 720.0 +offset_right = 446.0 +offset_bottom = 720.0 size_flags_horizontal = 0 size_flags_vertical = 3 [node name="PanelWood" parent="MarginContainer/HBoxContainer/UI_summary" index="0"] -margin_bottom = 720.0 +offset_bottom = 720.0 [node name="CenterContainer" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="0"] -margin_bottom = 128.0 +offset_bottom = 128.0 [node name="TextureRect" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/CenterContainer" index="0"] -margin_top = 0.0 -margin_bottom = 128.0 +offset_top = 0.0 +offset_bottom = 128.0 [node name="ButtonPuzzle" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="1"] -margin_top = 158.0 -margin_bottom = 235.0 +offset_top = 158.0 +offset_bottom = 235.0 [node name="ButtonSetting" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="2"] -margin_top = 265.0 -margin_bottom = 342.0 +offset_top = 265.0 +offset_bottom = 342.0 [node name="ButtonCredits" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="3"] -margin_top = 372.0 -margin_bottom = 449.0 +offset_top = 372.0 +offset_bottom = 449.0 [node name="MarginContainer" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="4"] -margin_top = 479.0 -margin_bottom = 533.0 +offset_top = 479.0 +offset_bottom = 533.0 [node name="ButtonQuit" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="5"] -margin_top = 563.0 -margin_bottom = 640.0 +offset_top = 563.0 +offset_bottom = 640.0 [node name="ContainerVersion" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="6"] -margin_top = 670.0 -margin_bottom = 690.0 +offset_top = 670.0 +offset_bottom = 690.0 [node name="MarginContainerBottom" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="7"] -margin_top = 720.0 -margin_bottom = 720.0 +offset_top = 720.0 +offset_bottom = 720.0 [node name="TextureRect" parent="MarginContainer/HBoxContainer/UI_summary" index="1"] -margin_bottom = 720.0 +offset_bottom = 720.0 [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/HBoxContainer"] -margin_left = 450.0 -margin_right = 1280.0 -margin_bottom = 720.0 +offset_left = 450.0 +offset_right = 1280.0 +offset_bottom = 720.0 size_flags_horizontal = 7 size_flags_vertical = 3 diff --git a/scenes/UI/background/Background.tscn b/scenes/UI/background/Background.tscn index 76ebed9..a3f5890 100644 --- a/scenes/UI/background/Background.tscn +++ b/scenes/UI/background/Background.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=7 format=2] -[ext_resource path="res://assets/ui/themes/bck.jpg" type="Texture" id=1] +[ext_resource path="res://assets/ui/themes/bck.jpg" type="Texture2D" id=1] [sub_resource type="VisualShaderNodeInput" id=1] input_name = "screen_uv" @@ -14,7 +14,7 @@ input_name = "screen_texture" [sub_resource type="VisualShader" id=4] code = "shader_type canvas_item; -uniform sampler2D tex_frg_4 : hint_albedo; +uniform sampler2D tex_frg_4 : source_color; @@ -48,7 +48,7 @@ nodes/fragment/4/node = SubResource( 2 ) nodes/fragment/4/position = Vector2( -80, 60 ) nodes/fragment/5/node = SubResource( 3 ) nodes/fragment/5/position = Vector2( -1000, 20 ) -nodes/fragment/connections = PoolIntArray( 4, 0, 0, 0 ) +nodes/fragment/connections = PackedInt32Array( 4, 0, 0, 0 ) [sub_resource type="ShaderMaterial" id=5] shader = SubResource( 4 ) diff --git a/scenes/UI/choose_scenes/ChooseScene.gd b/scenes/UI/choose_scenes/ChooseScene.gd index 679d093..76bf981 100644 --- a/scenes/UI/choose_scenes/ChooseScene.gd +++ b/scenes/UI/choose_scenes/ChooseScene.gd @@ -1,6 +1,6 @@ extends Control -export (PackedScene) var template = load("res://scenes/UI/choose_scenes/parts/Template.tscn") +@export var template: PackedScene = load("res://scenes/UI/choose_scenes/parts/Template.tscn") func _ready(): _load_button_access_scenes() @@ -38,7 +38,7 @@ func _configure_select(level, node): var thumbnail = get_node(node+"/MarginContainer/CenterAlign/MainButton/MarginStich/ThumbnailLevel") thumbnail.set_texture(_load_texture(level.thumbnail())) - selector.connect("pressed", Event, _build_method(level.name())) + selector.connect("pressed", Callable(Event, _build_method(level.name()))) func configure_reset(level, node, index, animate): var reset = get_node(node+"/MarginContainer/CenterAlign/MainButton/TabAlign/ButtonReset") @@ -55,14 +55,14 @@ func _configure_reset_disable(animation, reset, animate = false): reset.set_disabled(true) reset.set_default_cursor_shape(CURSOR_ARROW) - if reset.is_connected("pressed", Event, "_on_reset_level"): - reset.disconnect("pressed", Event, "_on_reset_level") + if reset.is_connected("pressed", Callable(Event, "_on_reset_level")): + reset.disconnect("pressed", Callable(Event, "_on_reset_level")) func _configure_reset_enable(animation, reset, level, node, index): animation.play_backwards("SlideReset") reset.set_disabled(false) reset.set_default_cursor_shape(CURSOR_POINTING_HAND) - reset.connect("pressed", Event, "_on_reset_level", [level, node, index, self]) + reset.connect("pressed", Callable(Event, "_on_reset_level").bind(level, node, index, self)) func configure_counter(level, node): var count = get_node(node+"/MarginContainer/CenterAlign/MainButton/TabAlign/ButtonCount/MarginBottom/Label") diff --git a/scenes/UI/choose_scenes/ChooseScene.tscn b/scenes/UI/choose_scenes/ChooseScene.tscn index ed1a2f7..b42d4ff 100644 --- a/scenes/UI/choose_scenes/ChooseScene.tscn +++ b/scenes/UI/choose_scenes/ChooseScene.tscn @@ -14,8 +14,8 @@ __meta__ = { } [node name="MarginContainer" type="GridContainer" parent="."] -margin_right = 1280.0 -margin_bottom = 720.0 +offset_right = 1280.0 +offset_bottom = 720.0 size_flags_horizontal = 3 size_flags_vertical = 3 columns = 3 diff --git a/scenes/UI/choose_scenes/parts/Template.tscn b/scenes/UI/choose_scenes/parts/Template.tscn index b2c9e33..5cb6c35 100644 --- a/scenes/UI/choose_scenes/parts/Template.tscn +++ b/scenes/UI/choose_scenes/parts/Template.tscn @@ -1,41 +1,41 @@ [gd_scene load_steps=10 format=2] -[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="DynamicFont" id=1] -[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset-hover.png" type="Texture" id=2] -[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset-disabled.png" type="Texture" id=3] -[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Count-hover.png" type="Texture" id=4] -[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset.png" type="Texture" id=5] -[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Count.png" type="Texture" id=6] -[ext_resource path="res://assets/ui/themes/tab_select/UI-level-btn-shadow.png" type="Texture" id=7] -[ext_resource path="res://assets/ui/themes/tab_select/UI-level-btn-leather.png" type="Texture" id=8] +[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="FontFile" id=1] +[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset-hover.png" type="Texture2D" id=2] +[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset-disabled.png" type="Texture2D" id=3] +[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Count-hover.png" type="Texture2D" id=4] +[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset.png" type="Texture2D" id=5] +[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Count.png" type="Texture2D" id=6] +[ext_resource path="res://assets/ui/themes/tab_select/UI-level-btn-shadow.png" type="Texture2D" id=7] +[ext_resource path="res://assets/ui/themes/tab_select/UI-level-btn-leather.png" type="Texture2D" id=8] [sub_resource type="Animation" id=1] resource_name = "SlideReset" tracks/0/type = "bezier" -tracks/0/path = NodePath("MarginContainer/CenterAlign/MainButton/TabAlign/ButtonReset:rect_position:x") +tracks/0/path = NodePath("MarginContainer/CenterAlign/MainButton/TabAlign/ButtonReset:position:x") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { -"points": PoolRealArray( ), -"times": PoolRealArray( ) +"points": PackedFloat32Array( ), +"times": PackedFloat32Array( ) } tracks/1/type = "bezier" -tracks/1/path = NodePath("MarginContainer/CenterAlign/MainButton/TabAlign/ButtonReset:rect_position:y") +tracks/1/path = NodePath("MarginContainer/CenterAlign/MainButton/TabAlign/ButtonReset:position:y") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/imported = false tracks/1/enabled = true tracks/1/keys = { -"points": PoolRealArray( 0, -0.25, 0, 0.506539, 0.5, -40, -0.236722, -22.5, 0.25, 0 ), -"times": PoolRealArray( 0, 1 ) +"points": PackedFloat32Array( 0, -0.25, 0, 0.506539, 0.5, -40, -0.236722, -22.5, 0.25, 0 ), +"times": PackedFloat32Array( 0, 1 ) } [node name="TilePuzzle" type="Control"] -margin_left = 320.0 -margin_right = 1600.0 -margin_bottom = 720.0 +offset_left = 320.0 +offset_right = 1600.0 +offset_bottom = 720.0 size_flags_horizontal = 3 size_flags_vertical = 3 __meta__ = { @@ -45,9 +45,9 @@ __meta__ = { [node name="BackgroundTile" type="TextureRect" parent="."] anchor_left = 0.5 anchor_right = 0.5 -margin_left = -114.0 -margin_right = 115.0 -margin_bottom = 456.0 +offset_left = -114.0 +offset_right = 115.0 +offset_bottom = 456.0 texture = ExtResource( 7 ) __meta__ = { "_edit_use_anchors_": false @@ -56,26 +56,26 @@ __meta__ = { [node name="MarginContainer" type="MarginContainer" parent="."] anchor_left = 0.5 anchor_right = 0.5 -margin_left = -114.0 -margin_right = 115.0 -margin_bottom = 720.0 -custom_constants/margin_right = 10 -custom_constants/margin_top = 10 -custom_constants/margin_left = 10 +offset_left = -114.0 +offset_right = 115.0 +offset_bottom = 720.0 +theme_override_constants/margin_right = 10 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_left = 10 __meta__ = { "_edit_use_anchors_": false } [node name="CenterAlign" type="VBoxContainer" parent="MarginContainer"] -margin_left = 10.0 -margin_top = 10.0 -margin_right = 219.0 -margin_bottom = 720.0 -custom_constants/separation = 0 +offset_left = 10.0 +offset_top = 10.0 +offset_right = 219.0 +offset_bottom = 720.0 +theme_override_constants/separation = 0 [node name="MainButton" type="TextureButton" parent="MarginContainer/CenterAlign"] -margin_right = 209.0 -margin_bottom = 208.0 +offset_right = 209.0 +offset_bottom = 208.0 mouse_default_cursor_shape = 2 texture_normal = ExtResource( 8 ) __meta__ = { @@ -85,19 +85,19 @@ __meta__ = { [node name="MarginStich" type="MarginContainer" parent="MarginContainer/CenterAlign/MainButton"] anchor_right = 1.0 anchor_bottom = 1.0 -custom_constants/margin_right = 5 -custom_constants/margin_top = 5 -custom_constants/margin_left = 5 -custom_constants/margin_bottom = 5 +theme_override_constants/margin_right = 5 +theme_override_constants/margin_top = 5 +theme_override_constants/margin_left = 5 +theme_override_constants/margin_bottom = 5 __meta__ = { "_edit_use_anchors_": false } [node name="ThumbnailLevel" type="TextureRect" parent="MarginContainer/CenterAlign/MainButton/MarginStich"] -margin_left = 5.0 -margin_top = 5.0 -margin_right = 204.0 -margin_bottom = 203.0 +offset_left = 5.0 +offset_top = 5.0 +offset_right = 204.0 +offset_bottom = 203.0 size_flags_horizontal = 3 size_flags_vertical = 3 expand = true @@ -106,10 +106,10 @@ __meta__ = { } [node name="ThumbnailLevel" type="TextureRect" parent="MarginContainer/CenterAlign/MainButton"] -margin_left = 5.0 -margin_top = 5.0 -margin_right = 204.0 -margin_bottom = 203.0 +offset_left = 5.0 +offset_top = 5.0 +offset_right = 204.0 +offset_bottom = 203.0 size_flags_horizontal = 3 size_flags_vertical = 3 expand = true @@ -119,9 +119,9 @@ __meta__ = { [node name="TabAlign" type="HBoxContainer" parent="MarginContainer/CenterAlign/MainButton"] show_behind_parent = true -margin_top = 208.0 -margin_right = 209.0 -margin_bottom = 710.0 +offset_top = 208.0 +offset_right = 209.0 +offset_bottom = 710.0 size_flags_horizontal = 3 size_flags_vertical = 3 alignment = 1 @@ -131,18 +131,18 @@ __meta__ = { [node name="ButtonReset" type="TextureButton" parent="MarginContainer/CenterAlign/MainButton/TabAlign"] show_behind_parent = true -margin_left = 1.0 -margin_right = 90.0 -margin_bottom = 57.0 +offset_left = 1.0 +offset_right = 90.0 +offset_bottom = 57.0 size_flags_vertical = 0 texture_normal = ExtResource( 5 ) texture_hover = ExtResource( 2 ) texture_disabled = ExtResource( 3 ) [node name="ButtonCount" type="TextureButton" parent="MarginContainer/CenterAlign/MainButton/TabAlign"] -margin_left = 94.0 -margin_right = 207.0 -margin_bottom = 57.0 +offset_left = 94.0 +offset_right = 207.0 +offset_bottom = 57.0 mouse_default_cursor_shape = 2 size_flags_vertical = 0 texture_normal = ExtResource( 6 ) @@ -152,17 +152,17 @@ texture_focused = ExtResource( 4 ) [node name="MarginBottom" type="MarginContainer" parent="MarginContainer/CenterAlign/MainButton/TabAlign/ButtonCount"] anchor_right = 1.0 anchor_bottom = 1.0 -custom_constants/margin_bottom = 10 +theme_override_constants/margin_bottom = 10 __meta__ = { "_edit_use_anchors_": false } [node name="Label" type="Label" parent="MarginContainer/CenterAlign/MainButton/TabAlign/ButtonCount/MarginBottom"] -margin_right = 113.0 -margin_bottom = 47.0 +offset_right = 113.0 +offset_bottom = 47.0 size_flags_horizontal = 3 size_flags_vertical = 7 -custom_fonts/font = ExtResource( 1 ) +theme_override_fonts/font = ExtResource( 1 ) text = "X / 10" align = 1 valign = 1 diff --git a/scenes/UI/ending/Ending.tscn b/scenes/UI/ending/Ending.tscn index 4526e7f..2b26879 100644 --- a/scenes/UI/ending/Ending.tscn +++ b/scenes/UI/ending/Ending.tscn @@ -2,9 +2,9 @@ [ext_resource path="res://scenes/UI/ending/Ending.gd" type="Script" id=1] [ext_resource path="res://assets/sounds/victory.ogg" type="AudioStream" id=2] -[ext_resource path="res://assets/fonts/MKX Title.ttf" type="DynamicFontData" id=3] +[ext_resource path="res://assets/fonts/MKX Title.ttf" type="FontFile" id=3] -[sub_resource type="DynamicFont" id=1] +[sub_resource type="FontFile" id=1] size = 35 font_data = ExtResource( 3 ) @@ -19,10 +19,10 @@ __meta__ = { } [node name="ColorRect" type="ColorRect" parent="."] -margin_left = 640.0 -margin_top = 360.0 -margin_right = 640.0 -margin_bottom = 360.0 +offset_left = 640.0 +offset_top = 360.0 +offset_right = 640.0 +offset_bottom = 360.0 grow_horizontal = 0 grow_vertical = 0 size_flags_horizontal = 3 @@ -38,12 +38,12 @@ stream = ExtResource( 2 ) volume_db = -29.411 [node name="Label" type="Label" parent="."] -margin_left = 477.0 -margin_top = 275.0 -margin_right = 802.0 -margin_bottom = 444.0 -custom_fonts/font = SubResource( 1 ) -custom_colors/font_color = Color( 1, 1, 1, 1 ) +offset_left = 477.0 +offset_top = 275.0 +offset_right = 802.0 +offset_bottom = 444.0 +theme_override_fonts/font = SubResource( 1 ) +theme_override_colors/font_color = Color( 1, 1, 1, 1 ) text = "aHog !!! diff --git a/scenes/UI/loading/Loading.tscn b/scenes/UI/loading/Loading.tscn index f78f9c8..1639e63 100644 --- a/scenes/UI/loading/Loading.tscn +++ b/scenes/UI/loading/Loading.tscn @@ -7,24 +7,24 @@ [sub_resource type="Animation" id=1] resource_name = "BorderAnim" tracks/0/type = "bezier" -tracks/0/path = NodePath("LoadingTopBorder:rect_position:x") +tracks/0/path = NodePath("LoadingTopBorder:position:x") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { -"points": PoolRealArray( ), -"times": PoolRealArray( ) +"points": PackedFloat32Array( ), +"times": PackedFloat32Array( ) } tracks/1/type = "bezier" -tracks/1/path = NodePath("LoadingTopBorder:rect_position:y") +tracks/1/path = NodePath("LoadingTopBorder:position:y") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/imported = false tracks/1/enabled = true tracks/1/keys = { -"points": PoolRealArray( -768, -0.25, 0, 1.01154, 306.838, -160.174, -1.02203, -283.071, 0.439946, 60.9141, -27.6065, -0.45336, -19.562, 0.536352, 17.1993, 0.362091, -0.538766, -0.968613, 0.25, 0 ), -"times": PoolRealArray( 0.1, 0.3, 0.6, 0.9 ) +"points": PackedFloat32Array( -768, -0.25, 0, 1.01154, 306.838, -160.174, -1.02203, -283.071, 0.439946, 60.9141, -27.6065, -0.45336, -19.562, 0.536352, 17.1993, 0.362091, -0.538766, -0.968613, 0.25, 0 ), +"times": PackedFloat32Array( 0.1, 0.3, 0.6, 0.9 ) } tracks/2/type = "bezier" tracks/2/path = NodePath("LoadingBare:modulate:a") @@ -33,8 +33,8 @@ tracks/2/loop_wrap = true tracks/2/imported = false tracks/2/enabled = true tracks/2/keys = { -"points": PoolRealArray( 0, -0.25, 0, 1.10651, 0.716757, 1, -1.59408, -0.0328361, 0.25, 0 ), -"times": PoolRealArray( 0, 0.4 ) +"points": PackedFloat32Array( 0, -0.25, 0, 1.10651, 0.716757, 1, -1.59408, -0.0328361, 0.25, 0 ), +"times": PackedFloat32Array( 0, 0.4 ) } [node name="Control" type="Control"] @@ -47,11 +47,11 @@ __meta__ = { [node name="BackgroundPicture" parent="." instance=ExtResource( 3 )] [node name="LoadingTopBorder" parent="." instance=ExtResource( 2 )] -margin_top = 0.362091 -margin_bottom = 0.362061 +offset_top = 0.362091 +offset_bottom = 0.362061 [node name="LoadingBare" parent="." instance=ExtResource( 1 )] -margin_top = 360.0 +offset_top = 360.0 [node name="AnimLoading" type="AnimationPlayer" parent="."] method_call_mode = 1 diff --git a/scenes/UI/loading/parts/BorderColor.tscn b/scenes/UI/loading/parts/BorderColor.tscn index 4fd5411..49c30a2 100644 --- a/scenes/UI/loading/parts/BorderColor.tscn +++ b/scenes/UI/loading/parts/BorderColor.tscn @@ -6,23 +6,23 @@ anchor_bottom = 1.0 size_flags_horizontal = 3 [node name="MarginContainer" type="MarginContainer" parent="."] -margin_right = 1280.0 -margin_bottom = 237.0 +offset_right = 1280.0 +offset_bottom = 237.0 size_flags_horizontal = 3 size_flags_vertical = 3 [node name="BorderLeft" type="ColorRect" parent="."] -margin_top = 241.0 -margin_right = 1280.0 -margin_bottom = 478.0 -rect_min_size = Vector2( 0, 8 ) +offset_top = 241.0 +offset_right = 1280.0 +offset_bottom = 478.0 +custom_minimum_size = Vector2( 0, 8 ) size_flags_horizontal = 3 size_flags_vertical = 3 color = Color( 0.74902, 0.701961, 0.65098, 1 ) [node name="MarginContainer2" type="MarginContainer" parent="."] -margin_top = 482.0 -margin_right = 1280.0 -margin_bottom = 720.0 +offset_top = 482.0 +offset_right = 1280.0 +offset_bottom = 720.0 size_flags_horizontal = 3 size_flags_vertical = 3 diff --git a/scenes/UI/loading/parts/LabelLoading.tscn b/scenes/UI/loading/parts/LabelLoading.tscn index 02a881f..fd9d10b 100644 --- a/scenes/UI/loading/parts/LabelLoading.tscn +++ b/scenes/UI/loading/parts/LabelLoading.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://assets/fonts/kirsty/kirsty_title.tres" type="DynamicFont" id=1] +[ext_resource path="res://assets/fonts/kirsty/kirsty_title.tres" type="FontFile" id=1] [ext_resource path="res://scenes/UI/loading/Loading.gd" type="Script" id=2] [node name="VBoxLoading" type="VBoxContainer"] @@ -8,13 +8,13 @@ anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -96.5 -margin_top = -28.0 -margin_right = 96.5 -margin_bottom = 28.0 +offset_left = -96.5 +offset_top = -28.0 +offset_right = 96.5 +offset_bottom = 28.0 size_flags_horizontal = 0 size_flags_vertical = 0 -custom_constants/separation = 0 +theme_override_constants/separation = 0 alignment = 1 script = ExtResource( 2 ) __meta__ = { @@ -22,10 +22,10 @@ __meta__ = { } [node name="LabelLoading" type="Label" parent="."] -margin_right = 193.0 -margin_bottom = 56.0 -custom_fonts/font = ExtResource( 1 ) -custom_colors/font_color = Color( 0.74902, 0.701961, 0.65098, 1 ) +offset_right = 193.0 +offset_bottom = 56.0 +theme_override_fonts/font = ExtResource( 1 ) +theme_override_colors/font_color = Color( 0.74902, 0.701961, 0.65098, 1 ) text = "loading" align = 1 valign = 2 diff --git a/scenes/UI/loading/parts/LoadingBare.tscn b/scenes/UI/loading/parts/LoadingBare.tscn index 47bf0a2..7054034 100644 --- a/scenes/UI/loading/parts/LoadingBare.tscn +++ b/scenes/UI/loading/parts/LoadingBare.tscn @@ -17,28 +17,28 @@ __meta__ = { } [node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"] -margin_right = 1280.0 -margin_bottom = 237.0 +offset_right = 1280.0 +offset_bottom = 237.0 size_flags_horizontal = 3 size_flags_vertical = 3 [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] -margin_top = 241.0 -margin_right = 1280.0 -margin_bottom = 478.0 +offset_top = 241.0 +offset_right = 1280.0 +offset_bottom = 478.0 size_flags_horizontal = 3 size_flags_vertical = 3 [node name="HSplitContainer" type="HSplitContainer" parent="VBoxContainer/HBoxContainer"] -margin_right = 238.0 -margin_bottom = 237.0 +offset_right = 238.0 +offset_bottom = 237.0 size_flags_horizontal = 3 size_flags_stretch_ratio = 0.3 [node name="ProgressBar" type="ProgressBar" parent="VBoxContainer/HBoxContainer"] -margin_left = 242.0 -margin_right = 1037.0 -margin_bottom = 237.0 +offset_left = 242.0 +offset_right = 1037.0 +offset_bottom = 237.0 size_flags_horizontal = 3 size_flags_vertical = 3 theme = ExtResource( 1 ) @@ -47,15 +47,15 @@ step = 0.1 rounded = true [node name="HSplitContainer2" type="HSplitContainer" parent="VBoxContainer/HBoxContainer"] -margin_left = 1041.0 -margin_right = 1280.0 -margin_bottom = 237.0 +offset_left = 1041.0 +offset_right = 1280.0 +offset_bottom = 237.0 size_flags_horizontal = 3 size_flags_stretch_ratio = 0.3 [node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer"] -margin_top = 482.0 -margin_right = 1280.0 -margin_bottom = 720.0 +offset_top = 482.0 +offset_right = 1280.0 +offset_bottom = 720.0 size_flags_horizontal = 3 size_flags_vertical = 3 diff --git a/scenes/UI/loading/parts/TopPart.tscn b/scenes/UI/loading/parts/TopPart.tscn index 17d1bc5..2fae9f1 100644 --- a/scenes/UI/loading/parts/TopPart.tscn +++ b/scenes/UI/loading/parts/TopPart.tscn @@ -2,13 +2,13 @@ [ext_resource path="res://scenes/UI/loading/parts/LabelLoading.tscn" type="PackedScene" id=1] [ext_resource path="res://scenes/UI/loading/parts/BorderColor.tscn" type="PackedScene" id=2] -[ext_resource path="res://assets/ui/themes/bck-hrz-grd.png" type="Texture" id=3] +[ext_resource path="res://assets/ui/themes/bck-hrz-grd.png" type="Texture2D" id=3] [node name="LoadingBorder" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 grow_vertical = 2 -rect_clip_content = true +clip_contents = true size_flags_horizontal = 3 size_flags_vertical = 3 __meta__ = { @@ -18,22 +18,22 @@ __meta__ = { [node name="BackgroundGradient" type="VBoxContainer" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -custom_constants/separation = 0 +theme_override_constants/separation = 0 __meta__ = { "_edit_use_anchors_": false } [node name="BlackColor" type="ColorRect" parent="BackgroundGradient"] -margin_right = 1280.0 -margin_bottom = 240.0 +offset_right = 1280.0 +offset_bottom = 240.0 size_flags_horizontal = 3 size_flags_vertical = 3 color = Color( 0, 0, 0, 1 ) [node name="ColorRect" type="TextureRect" parent="BackgroundGradient"] -margin_top = 240.0 -margin_right = 1280.0 -margin_bottom = 480.0 +offset_top = 240.0 +offset_right = 1280.0 +offset_bottom = 480.0 size_flags_horizontal = 3 size_flags_vertical = 3 texture = ExtResource( 3 ) @@ -43,9 +43,9 @@ __meta__ = { } [node name="MarginContainer" type="MarginContainer" parent="BackgroundGradient"] -margin_top = 480.0 -margin_right = 1280.0 -margin_bottom = 720.0 +offset_top = 480.0 +offset_right = 1280.0 +offset_bottom = 720.0 size_flags_horizontal = 3 size_flags_vertical = 3 @@ -53,11 +53,11 @@ size_flags_vertical = 3 anchor_top = 0.5 anchor_right = 1.0 anchor_bottom = 0.5 -margin_top = -30.0 -margin_bottom = 30.0 -rect_clip_content = true +offset_top = -30.0 +offset_bottom = 30.0 +clip_contents = true size_flags_vertical = 5 -custom_constants/separation = 20 +theme_override_constants/separation = 20 alignment = 1 __meta__ = { "_edit_use_anchors_": false @@ -66,22 +66,22 @@ __meta__ = { [node name="BorderLeft" parent="LabelAndBorder" instance=ExtResource( 2 )] anchor_right = 0.0 anchor_bottom = 0.0 -margin_right = 523.0 -margin_bottom = 60.0 +offset_right = 523.0 +offset_bottom = 60.0 [node name="LabelLoading" parent="LabelAndBorder" instance=ExtResource( 1 )] anchor_left = 0.0 anchor_top = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 -margin_left = 543.0 -margin_top = 0.0 -margin_right = 736.0 -margin_bottom = 56.0 +offset_left = 543.0 +offset_top = 0.0 +offset_right = 736.0 +offset_bottom = 56.0 [node name="BorderRight" parent="LabelAndBorder" instance=ExtResource( 2 )] anchor_right = 0.0 anchor_bottom = 0.0 -margin_left = 756.0 -margin_right = 1280.0 -margin_bottom = 60.0 +offset_left = 756.0 +offset_right = 1280.0 +offset_bottom = 60.0 diff --git a/scenes/UI/settings/Settings.tscn b/scenes/UI/settings/Settings.tscn index 54edf7c..5cc4c4e 100644 --- a/scenes/UI/settings/Settings.tscn +++ b/scenes/UI/settings/Settings.tscn @@ -5,42 +5,42 @@ [node name="Settings" type="CenterContainer"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -1.12244 -margin_right = -1.12244 +offset_left = -1.12244 +offset_right = -1.12244 script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false } [node name="VBoxContainer" type="VBoxContainer" parent="."] -margin_left = 547.0 -margin_top = 265.0 -margin_right = 732.0 -margin_bottom = 455.0 +offset_left = 547.0 +offset_top = 265.0 +offset_right = 732.0 +offset_bottom = 455.0 alignment = 1 [node name="langue" type="CenterContainer" parent="VBoxContainer"] -margin_right = 185.0 -margin_bottom = 27.0 +offset_right = 185.0 +offset_bottom = 27.0 [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/langue"] -margin_left = 67.0 -margin_right = 117.0 -margin_bottom = 27.0 +offset_left = 67.0 +offset_right = 117.0 +offset_bottom = 27.0 __meta__ = { "_editor_description_": "" } [node name="Label" type="Label" parent="VBoxContainer/langue/VBoxContainer"] -margin_right = 50.0 -margin_bottom = 14.0 +offset_right = 50.0 +offset_bottom = 14.0 text = "langue :" align = 1 [node name="data" type="ItemList" parent="VBoxContainer/langue/VBoxContainer"] -margin_top = 18.0 -margin_right = 50.0 -margin_bottom = 27.0 +offset_top = 18.0 +offset_right = 50.0 +offset_bottom = 27.0 focus_mode = 0 auto_height = true max_columns = 2 @@ -48,72 +48,72 @@ same_column_width = true fixed_icon_size = Vector2( 32, 32 ) [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/langue"] -margin_left = 92.0 -margin_top = 13.0 -margin_right = 92.0 -margin_bottom = 13.0 +offset_left = 92.0 +offset_top = 13.0 +offset_right = 92.0 +offset_bottom = 13.0 [node name="gyroscope" type="CenterContainer" parent="VBoxContainer"] -margin_top = 31.0 -margin_right = 185.0 -margin_bottom = 71.0 +offset_top = 31.0 +offset_right = 185.0 +offset_bottom = 71.0 [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/gyroscope"] -margin_left = 16.0 -margin_right = 169.0 -margin_bottom = 40.0 +offset_left = 16.0 +offset_right = 169.0 +offset_bottom = 40.0 [node name="Label" type="Label" parent="VBoxContainer/gyroscope/HBoxContainer"] -margin_top = 13.0 -margin_right = 73.0 -margin_bottom = 27.0 +offset_top = 13.0 +offset_right = 73.0 +offset_bottom = 27.0 text = "gyroscope :" [node name="data" type="CheckButton" parent="VBoxContainer/gyroscope/HBoxContainer"] -margin_left = 77.0 -margin_right = 153.0 -margin_bottom = 40.0 +offset_left = 77.0 +offset_right = 153.0 +offset_bottom = 40.0 align = 1 [node name="ambient_sound" type="CenterContainer" parent="VBoxContainer"] -margin_top = 75.0 -margin_right = 185.0 -margin_bottom = 115.0 +offset_top = 75.0 +offset_right = 185.0 +offset_bottom = 115.0 [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/ambient_sound"] -margin_right = 185.0 -margin_bottom = 40.0 +offset_right = 185.0 +offset_bottom = 40.0 [node name="Label" type="Label" parent="VBoxContainer/ambient_sound/HBoxContainer"] -margin_top = 13.0 -margin_right = 105.0 -margin_bottom = 27.0 +offset_top = 13.0 +offset_right = 105.0 +offset_bottom = 27.0 text = "Ambiant sound :" [node name="data" type="CheckButton" parent="VBoxContainer/ambient_sound/HBoxContainer"] -margin_left = 109.0 -margin_right = 185.0 -margin_bottom = 40.0 +offset_left = 109.0 +offset_right = 185.0 +offset_bottom = 40.0 [node name="resolution" type="CenterContainer" parent="VBoxContainer"] -margin_top = 119.0 -margin_right = 185.0 -margin_bottom = 146.0 +offset_top = 119.0 +offset_right = 185.0 +offset_bottom = 146.0 [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/resolution"] -margin_left = 54.0 -margin_right = 130.0 -margin_bottom = 27.0 +offset_left = 54.0 +offset_right = 130.0 +offset_bottom = 27.0 [node name="Label" type="Label" parent="VBoxContainer/resolution/VBoxContainer"] -margin_right = 76.0 -margin_bottom = 14.0 +offset_right = 76.0 +offset_bottom = 14.0 text = "Resolution :" [node name="data" type="ItemList" parent="VBoxContainer/resolution/VBoxContainer"] -margin_top = 18.0 -margin_right = 76.0 -margin_bottom = 27.0 +offset_top = 18.0 +offset_right = 76.0 +offset_bottom = 27.0 focus_mode = 0 size_flags_horizontal = 3 size_flags_vertical = 3 @@ -121,25 +121,25 @@ auto_height = true same_column_width = true [node name="fullscreen" type="CenterContainer" parent="VBoxContainer"] -margin_top = 150.0 -margin_right = 185.0 -margin_bottom = 190.0 +offset_top = 150.0 +offset_right = 185.0 +offset_bottom = 190.0 [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/fullscreen"] -margin_left = 15.0 -margin_right = 169.0 -margin_bottom = 40.0 +offset_left = 15.0 +offset_right = 169.0 +offset_bottom = 40.0 [node name="Label" type="Label" parent="VBoxContainer/fullscreen/HBoxContainer"] -margin_top = 13.0 -margin_right = 74.0 -margin_bottom = 27.0 +offset_top = 13.0 +offset_right = 74.0 +offset_bottom = 27.0 text = "Fullscreen :" [node name="data" type="CheckButton" parent="VBoxContainer/fullscreen/HBoxContainer"] -margin_left = 78.0 -margin_right = 154.0 -margin_bottom = 40.0 +offset_left = 78.0 +offset_right = 154.0 +offset_bottom = 40.0 [connection signal="item_selected" from="VBoxContainer/langue/VBoxContainer/data" to="." method="_on_langue_item_selected"] [connection signal="pressed" from="VBoxContainer/gyroscope/HBoxContainer/data" to="." method="_on_gyroscope_pressed"] diff --git a/scenes/UI/summary/Summary.tscn b/scenes/UI/summary/Summary.tscn index 43b5fb0..8a6be55 100644 --- a/scenes/UI/summary/Summary.tscn +++ b/scenes/UI/summary/Summary.tscn @@ -1,14 +1,14 @@ [gd_scene load_steps=27 format=2] -[ext_resource path="res://assets/ui/themes/button-summary-hover.jpg" type="Texture" id=1] -[ext_resource path="res://assets/ui/themes/button-summary.jpg" type="Texture" id=2] -[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="DynamicFont" id=3] -[ext_resource path="res://assets/fonts/kirsty/kirsty_title.tres" type="DynamicFont" id=4] -[ext_resource path="res://assets/ui/icones/treasure.png" type="Texture" id=5] +[ext_resource path="res://assets/ui/themes/button-summary-hover.jpg" type="Texture2D" id=1] +[ext_resource path="res://assets/ui/themes/button-summary.jpg" type="Texture2D" id=2] +[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="FontFile" id=3] +[ext_resource path="res://assets/fonts/kirsty/kirsty_title.tres" type="FontFile" id=4] +[ext_resource path="res://assets/ui/icones/treasure.png" type="Texture2D" id=5] [ext_resource path="res://assets/fonts/text_outline.material" type="Material" id=6] -[ext_resource path="res://assets/ui/icones/treasure-hover.png" type="Texture" id=7] -[ext_resource path="res://assets/ui/themes/bck-vert-grd.png" type="Texture" id=8] -[ext_resource path="res://assets/ui/themes/wood-tile.jpg" type="Texture" id=9] +[ext_resource path="res://assets/ui/icones/treasure-hover.png" type="Texture2D" id=7] +[ext_resource path="res://assets/ui/themes/bck-vert-grd.png" type="Texture2D" id=8] +[ext_resource path="res://assets/ui/themes/wood-tile.jpg" type="Texture2D" id=9] [sub_resource type="VisualShaderNodeVectorOp" id=1] operator = 3 @@ -19,20 +19,20 @@ input_name = "screen_uv" [sub_resource type="VisualShaderNodeVectorDecompose" id=3] output_port_for_preview = 1 -[sub_resource type="VisualShaderNodeVectorScalarMix" id=4] +[sub_resource type="VisualShaderNodeMix" id=4] [sub_resource type="VisualShaderNodeColorConstant" id=5] constant = Color( 0.2, 0.155, 0.11, 1 ) [sub_resource type="VisualShaderNodeColorOp" id=6] -[sub_resource type="VisualShaderNodeVectorScalarMix" id=7] +[sub_resource type="VisualShaderNodeMix" id=7] -[sub_resource type="VisualShaderNodeScalarOp" id=8] +[sub_resource type="VisualShaderNodeFloatOp" id=8] default_input_values = [ 0, 0.0, 1, 0.2 ] operator = 2 -[sub_resource type="VisualShaderNodeScalarOp" id=9] +[sub_resource type="VisualShaderNodeFloatOp" id=9] default_input_values = [ 0, 0.0, 1, -1.0 ] operator = 2 @@ -46,18 +46,18 @@ texture_type = 1 [sub_resource type="VisualShaderNodeVectorCompose" id=12] default_input_values = [ 0, 0.0, 1, 0.0, 2, 1.0 ] -[sub_resource type="VisualShaderNodeScalarConstant" id=13] +[sub_resource type="VisualShaderNodeFloatConstant" id=13] constant = 0.4 [sub_resource type="VisualShaderNodeVectorDecompose" id=14] -[sub_resource type="VisualShaderNodeScalarOp" id=15] +[sub_resource type="VisualShaderNodeFloatOp" id=15] default_input_values = [ 0, 0.0, 1, 1.6 ] operator = 3 [sub_resource type="VisualShader" id=16] code = "shader_type canvas_item; -uniform sampler2D tex_frg_4 : hint_albedo; +uniform sampler2D tex_frg_4 : source_color; @@ -163,48 +163,48 @@ nodes/fragment/22/node = SubResource( 8 ) nodes/fragment/22/position = Vector2( 1260, 780 ) nodes/fragment/23/node = SubResource( 9 ) nodes/fragment/23/position = Vector2( 1080, 1080 ) -nodes/fragment/connections = PoolIntArray( 8, 0, 5, 1, 7, 1, 8, 0, 7, 0, 5, 0, 5, 0, 4, 0, 3, 0, 11, 0, 6, 0, 11, 1, 11, 0, 7, 0, 14, 0, 15, 0, 4, 0, 17, 0, 15, 1, 17, 2, 4, 0, 19, 1, 18, 0, 19, 0, 19, 0, 17, 1, 4, 0, 22, 0, 20, 0, 0, 0, 15, 1, 23, 0, 22, 0, 20, 0, 15, 1, 20, 2, 17, 0, 20, 1 ) +nodes/fragment/connections = PackedInt32Array( 8, 0, 5, 1, 7, 1, 8, 0, 7, 0, 5, 0, 5, 0, 4, 0, 3, 0, 11, 0, 6, 0, 11, 1, 11, 0, 7, 0, 14, 0, 15, 0, 4, 0, 17, 0, 15, 1, 17, 2, 4, 0, 19, 1, 18, 0, 19, 0, 19, 0, 17, 1, 4, 0, 22, 0, 20, 0, 0, 0, 15, 1, 23, 0, 22, 0, 20, 0, 15, 1, 20, 2, 17, 0, 20, 1 ) [sub_resource type="ShaderMaterial" id=17] shader = SubResource( 16 ) [node name="Summary" type="HBoxContainer"] anchor_bottom = 1.0 -margin_right = 236.0 -custom_constants/separation = 0 +offset_right = 236.0 +theme_override_constants/separation = 0 __meta__ = { "_edit_use_anchors_": false } [node name="PanelWood" type="Panel" parent="."] material = SubResource( 17 ) -margin_right = 350.0 -margin_bottom = 1080.0 -rect_min_size = Vector2( 350, 0 ) +offset_right = 350.0 +offset_bottom = 1080.0 +custom_minimum_size = Vector2( 350, 0 ) size_flags_vertical = 3 [node name="VBoxContainer" type="VBoxContainer" parent="PanelWood"] anchor_right = 1.0 anchor_bottom = 1.0 -rect_clip_content = true +clip_contents = true size_flags_horizontal = 8 size_flags_vertical = 11 -custom_constants/separation = 30 +theme_override_constants/separation = 30 __meta__ = { "_edit_use_anchors_": false } [node name="CenterContainer" type="CenterContainer" parent="PanelWood/VBoxContainer"] -margin_right = 350.0 -margin_bottom = 271.0 +offset_right = 350.0 +offset_bottom = 271.0 size_flags_horizontal = 3 size_flags_vertical = 3 [node name="TextureRect" type="TextureButton" parent="PanelWood/VBoxContainer/CenterContainer"] -margin_left = 111.0 -margin_top = 71.0 -margin_right = 239.0 -margin_bottom = 199.0 +offset_left = 111.0 +offset_top = 71.0 +offset_right = 239.0 +offset_bottom = 199.0 mouse_default_cursor_shape = 2 size_flags_horizontal = 4 size_flags_vertical = 4 @@ -214,9 +214,9 @@ texture_focused = ExtResource( 7 ) stretch_mode = 3 [node name="ButtonPuzzle" type="TextureButton" parent="PanelWood/VBoxContainer"] -margin_top = 301.0 -margin_right = 350.0 -margin_bottom = 378.0 +offset_top = 301.0 +offset_right = 350.0 +offset_bottom = 378.0 mouse_default_cursor_shape = 2 size_flags_horizontal = 0 size_flags_vertical = 0 @@ -235,7 +235,7 @@ grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 7 size_flags_vertical = 3 -custom_fonts/font = ExtResource( 4 ) +theme_override_fonts/font = ExtResource( 4 ) text = "Puzzles" align = 1 valign = 1 @@ -245,9 +245,9 @@ __meta__ = { } [node name="ButtonSetting" type="TextureButton" parent="PanelWood/VBoxContainer"] -margin_top = 408.0 -margin_right = 350.0 -margin_bottom = 485.0 +offset_top = 408.0 +offset_right = 350.0 +offset_bottom = 485.0 mouse_default_cursor_shape = 2 size_flags_horizontal = 0 size_flags_vertical = 0 @@ -264,8 +264,8 @@ anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 7 size_flags_vertical = 3 -custom_fonts/font = ExtResource( 4 ) -custom_colors/font_color = Color( 0, 0, 0, 1 ) +theme_override_fonts/font = ExtResource( 4 ) +theme_override_colors/font_color = Color( 0, 0, 0, 1 ) text = "Paramètres" align = 1 valign = 1 @@ -275,9 +275,9 @@ __meta__ = { } [node name="ButtonCredits" type="TextureButton" parent="PanelWood/VBoxContainer"] -margin_top = 515.0 -margin_right = 350.0 -margin_bottom = 592.0 +offset_top = 515.0 +offset_right = 350.0 +offset_bottom = 592.0 mouse_default_cursor_shape = 2 size_flags_horizontal = 0 size_flags_vertical = 0 @@ -294,8 +294,8 @@ anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 7 size_flags_vertical = 3 -custom_fonts/font = ExtResource( 4 ) -custom_colors/font_color = Color( 0, 0, 0, 1 ) +theme_override_fonts/font = ExtResource( 4 ) +theme_override_colors/font_color = Color( 0, 0, 0, 1 ) text = "Crédits" align = 1 valign = 1 @@ -305,15 +305,15 @@ __meta__ = { } [node name="MarginContainer" type="MarginContainer" parent="PanelWood/VBoxContainer"] -margin_top = 622.0 -margin_right = 350.0 -margin_bottom = 893.0 +offset_top = 622.0 +offset_right = 350.0 +offset_bottom = 893.0 size_flags_vertical = 3 [node name="ButtonQuit" type="TextureButton" parent="PanelWood/VBoxContainer"] -margin_top = 923.0 -margin_right = 350.0 -margin_bottom = 1000.0 +offset_top = 923.0 +offset_right = 350.0 +offset_bottom = 1000.0 mouse_default_cursor_shape = 2 size_flags_horizontal = 0 size_flags_vertical = 0 @@ -329,8 +329,8 @@ anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 7 size_flags_vertical = 3 -custom_fonts/font = ExtResource( 4 ) -custom_colors/font_color = Color( 0, 0, 0, 1 ) +theme_override_fonts/font = ExtResource( 4 ) +theme_override_colors/font_color = Color( 0, 0, 0, 1 ) text = "Quit" align = 1 valign = 1 @@ -340,43 +340,43 @@ __meta__ = { } [node name="ContainerVersion" type="HBoxContainer" parent="PanelWood/VBoxContainer"] -margin_top = 1030.0 -margin_right = 350.0 -margin_bottom = 1050.0 +offset_top = 1030.0 +offset_right = 350.0 +offset_bottom = 1050.0 [node name="MarginLeft" type="MarginContainer" parent="PanelWood/VBoxContainer/ContainerVersion"] -margin_right = 283.0 -margin_bottom = 20.0 +offset_right = 283.0 +offset_bottom = 20.0 size_flags_horizontal = 3 [node name="LabelVersion" type="Label" parent="PanelWood/VBoxContainer/ContainerVersion"] -margin_left = 287.0 -margin_right = 334.0 -margin_bottom = 20.0 +offset_left = 287.0 +offset_right = 334.0 +offset_bottom = 20.0 size_flags_vertical = 0 -custom_fonts/font = ExtResource( 3 ) -custom_colors/font_color = Color( 0.741176, 0.478431, 0.372549, 1 ) +theme_override_fonts/font = ExtResource( 3 ) +theme_override_colors/font_color = Color( 0.741176, 0.478431, 0.372549, 1 ) text = "v 0.0.0" align = 2 [node name="MarginRight" type="MarginContainer" parent="PanelWood/VBoxContainer/ContainerVersion"] -margin_left = 338.0 -margin_right = 350.0 -margin_bottom = 20.0 +offset_left = 338.0 +offset_right = 350.0 +offset_bottom = 20.0 size_flags_horizontal = 3 size_flags_stretch_ratio = 0.04 [node name="MarginContainerBottom" type="MarginContainer" parent="PanelWood/VBoxContainer"] -margin_top = 1080.0 -margin_right = 350.0 -margin_bottom = 1080.0 +offset_top = 1080.0 +offset_right = 350.0 +offset_bottom = 1080.0 size_flags_stretch_ratio = 0.2 [node name="TextureRect" type="TextureRect" parent="."] -margin_left = 350.0 -margin_right = 446.0 -margin_bottom = 1080.0 -rect_clip_content = true +offset_left = 350.0 +offset_right = 446.0 +offset_bottom = 1080.0 +clip_contents = true size_flags_horizontal = 11 size_flags_vertical = 3 texture = ExtResource( 8 ) diff --git a/scenes/UI/title/Title.tscn b/scenes/UI/title/Title.tscn index 1bb6ae1..01faad9 100644 --- a/scenes/UI/title/Title.tscn +++ b/scenes/UI/title/Title.tscn @@ -1,18 +1,18 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://assets/ui/themes/game-title.png" type="Texture" id=1] +[ext_resource path="res://assets/ui/themes/game-title.png" type="Texture2D" id=1] [node name="Control" type="CenterContainer"] anchor_right = 1.0 anchor_bottom = 1.0 -rect_pivot_offset = Vector2( -656.735, -331.043 ) +pivot_offset = Vector2( -656.735, -331.043 ) __meta__ = { "_edit_use_anchors_": false } [node name="TextureRect" type="TextureRect" parent="."] -margin_left = 305.0 -margin_top = 282.0 -margin_right = 974.0 -margin_bottom = 438.0 +offset_left = 305.0 +offset_top = 282.0 +offset_right = 974.0 +offset_bottom = 438.0 texture = ExtResource( 1 ) diff --git a/scenes/levels/Levels.gd b/scenes/levels/Levels.gd index 6dbbe89..69ec41f 100644 --- a/scenes/levels/Levels.gd +++ b/scenes/levels/Levels.gd @@ -1,4 +1,4 @@ -extends Spatial +extends Node3D const TIME_MAX = 3000 # msec const GYROSCOPE_MAX_DIFF = 0.5 @@ -6,21 +6,21 @@ const OFFSET_CAMERA_MAX = 0.12 const OFFSET_STEP_CHANGE = 0.01 const RAY_LENGTH = 1000 -export (PackedScene) var object_first = load("res://scenes/levels/parts/ObjectListFirst.tscn") -export (PackedScene) var object_std = load("res://scenes/levels/parts/ObjectListStandard.tscn") -export (PackedScene) var object_last = load("res://scenes/levels/parts/ObjectListLast.tscn") +@export var object_first: PackedScene = load("res://scenes/levels/parts/ObjectListFirst.tscn") +@export var object_std: PackedScene = load("res://scenes/levels/parts/ObjectListStandard.tscn") +@export var object_last: PackedScene = load("res://scenes/levels/parts/ObjectListLast.tscn") -onready var gyroscope_value_old = Vector3(0, 0, 0) -onready var table = Global.database.get_table_by_name("scenes") -onready var meshes = {} -onready var from = null -onready var to = null -onready var mlevel = load("res://db/MLevel.gd") -onready var mscene = load("res://db/MScene.gd") -onready var victory_condition = 0 -onready var victory_progress = 0 -onready var last_button = null -onready var animation_player = null +@onready var gyroscope_value_old = Vector3(0, 0, 0) +@onready var table = Global.database.get_table_by_name("scenes") +@onready var meshes = {} +@onready var from = null +@onready var to = null +@onready var mlevel = load("res://db/MLevel.gd") +@onready var mscene = load("res://db/MScene.gd") +@onready var victory_condition = 0 +@onready var victory_progress = 0 +@onready var last_button = null +@onready var animation_player = null func _ready(): _load_translations() @@ -44,7 +44,7 @@ func _load_meshes(): create_dissolve_mesh(scene_detail.key()) func _load_back_button(): - var _back = $Quit/TextureButton.connect("pressed", Event, "_on_main_scene_pressed") + var _back = $Quit/TextureButton.connect("pressed", Callable(Event, "_on_main_scene_pressed")) func _load_prepare_victory_condition(): var level = mlevel.new(Global.current_scene_int) @@ -88,11 +88,11 @@ func _get_node_animated(): func _search_button_to_use(counter): if counter == 0: - return object_first.instance() + return object_first.instantiate() elif counter == meshes.size() - 1: - return object_last.instance() + return object_last.instantiate() else: - return object_std.instance() + return object_std.instantiate() func _configure_button_object(button, scene, label): button.get_node("Label").set_text(label) @@ -113,18 +113,18 @@ func _process(_delta): _check_victory_condition() func create_dissolve_mesh(key): - _node_to_mesh(key).get_surface_material(0).set_shader_param("dissolve_amount", 0.0) + _node_to_mesh(key).get_surface_override_material(0).set_shader_parameter("dissolve_amount", 0.0) func _check_dissolve_mesh(): # Event dissolve in object searched by gamer for key in meshes: if bool(meshes[key].lock()) == true and meshes[key].mesh() != null: if meshes[key].tick_reference() == 0: - meshes[key].set_tick_reference(OS.get_ticks_msec()) + meshes[key].set_tick_reference(Time.get_ticks_msec()) _node_object_list(key) - GlobalAnimation.start_dissolve(_node_to_tween(key), _node_to_mesh(key).get_surface_material(0)) + GlobalAnimation.start_dissolve(_node_to_tween(key), _node_to_mesh(key).get_surface_override_material(0)) - if OS.get_ticks_msec() < meshes[key].tick_reference() + TIME_MAX: + if Time.get_ticks_msec() < meshes[key].tick_reference() + TIME_MAX: meshes[key].set_value(meshes[key].value() + 0.01) else: _clean_mesh(key) @@ -141,22 +141,22 @@ func _check_change_angle_camera(): if camera.h_offset >= -OFFSET_CAMERA_MAX: if _action_pressed("ui_left") or _action_gyroscope("left", gyroscope): print("[warcraft#_ready] move camera angle to left") - $"Main Camera".h_offset -= OFFSET_STEP_CHANGE + $"Main Camera3D".h_offset -= OFFSET_STEP_CHANGE if camera.h_offset <= OFFSET_CAMERA_MAX: if _action_pressed("ui_right") or _action_gyroscope("right", gyroscope): print("[warcraft#_ready] move camera angle to right") - $"Main Camera".h_offset += OFFSET_STEP_CHANGE + $"Main Camera3D".h_offset += OFFSET_STEP_CHANGE if camera.v_offset >= -OFFSET_CAMERA_MAX: if _action_pressed("ui_down") or _action_gyroscope("down", gyroscope): print("[warcraft#_ready] move camera angle to down") - $"Main Camera".v_offset -= OFFSET_STEP_CHANGE + $"Main Camera3D".v_offset -= OFFSET_STEP_CHANGE if camera.v_offset <= OFFSET_CAMERA_MAX: if _action_pressed("ui_up") or _action_gyroscope("up", gyroscope): print("[warcraft#_ready] move camera angle to up") - $"Main Camera".v_offset += OFFSET_STEP_CHANGE + $"Main Camera3D".v_offset += OFFSET_STEP_CHANGE gyroscope_value_old = gyroscope @@ -215,7 +215,7 @@ func _node_to_tween(key): return get_node(meshes[key].tween()) func _node_to_area(key): - return get_node(meshes[key].mesh()+"/Area") + return get_node(meshes[key].mesh()+"/Area3D") func _node_object_list(key): var animation_played = null @@ -245,7 +245,7 @@ func _input(event): to = from + camera.project_ray_normal(event.position) * RAY_LENGTH func _physics_process(_delta): - var space_state = get_world().direct_space_state + var space_state = get_world_3d().direct_space_state if from != null and to != null: _check_collider(space_state) diff --git a/scenes/levels/Levels.tscn b/scenes/levels/Levels.tscn index 0f70b3b..ba72c48 100644 --- a/scenes/levels/Levels.tscn +++ b/scenes/levels/Levels.tscn @@ -5,7 +5,7 @@ [ext_resource path="res://scenes/levels/parts/Back.tscn" type="PackedScene" id=3] [ext_resource path="res://scenes/levels/parts/ListObjects.tscn" type="PackedScene" id=4] -[node name="Spatial" type="Spatial"] +[node name="Node3D" type="Node3D"] script = ExtResource( 1 ) [node name="ListObjects" parent="." instance=ExtResource( 4 )] diff --git a/scenes/levels/home/Home.tscn b/scenes/levels/home/Home.tscn index 3781158..5ad75b6 100644 --- a/scenes/levels/home/Home.tscn +++ b/scenes/levels/home/Home.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=5 format=2] [ext_resource path="res://scenes/levels/Levels.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture" id=2] +[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture2D" id=2] -[sub_resource type="PanoramaSky" id=1] +[sub_resource type="Sky" id=1] panorama = ExtResource( 2 ) [sub_resource type="Environment" id=2] @@ -24,14 +24,14 @@ fog_height_min = 2.0 fog_height_max = -20.0 fog_height_curve = 0.965936 tonemap_mode = 2 -ss_reflections_enabled = true +ssr_enabled = true dof_blur_far_distance = 4.0 glow_enabled = true [node name="Home" instance=ExtResource( 1 )] -[node name="MainCamera" type="Camera" parent="." index="4"] -transform = Transform( 0.160708, -0.25632, 0.953138, 0, 0.96569, 0.259696, -0.987002, -0.0417351, 0.155194, 1.84336, 1.66169, 0.663199 ) +[node name="MainCamera" type="Camera3D" parent="." index="4"] +transform = Transform3D( 0.160708, -0.25632, 0.953138, 0, 0.96569, 0.259696, -0.987002, -0.0417351, 0.155194, 1.84336, 1.66169, 0.663199 ) environment = SubResource( 2 ) fov = 38.5632 __meta__ = { diff --git a/scenes/levels/parts/Back.tscn b/scenes/levels/parts/Back.tscn index 0a788b7..ca0bb75 100644 --- a/scenes/levels/parts/Back.tscn +++ b/scenes/levels/parts/Back.tscn @@ -1,18 +1,18 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://assets/ui/themes/UI-Button-Back.png" type="Texture" id=1] -[ext_resource path="res://assets/ui/themes/UI-Button-Back-Overlay.png" type="Texture" id=2] +[ext_resource path="res://assets/ui/themes/UI-Button-Back.png" type="Texture2D" id=1] +[ext_resource path="res://assets/ui/themes/UI-Button-Back-Overlay.png" type="Texture2D" id=2] [node name="Control" type="Control"] -margin_right = 1440.0 -margin_bottom = 900.0 +offset_right = 1440.0 +offset_bottom = 900.0 __meta__ = { "_edit_use_anchors_": false } [node name="TextureButton" type="TextureButton" parent="."] -margin_right = 40.0 -margin_bottom = 40.0 +offset_right = 40.0 +offset_bottom = 40.0 mouse_default_cursor_shape = 2 texture_normal = ExtResource( 1 ) texture_hover = ExtResource( 2 ) diff --git a/scenes/levels/parts/ListObjects.tscn b/scenes/levels/parts/ListObjects.tscn index e317d4f..57a71a3 100644 --- a/scenes/levels/parts/ListObjects.tscn +++ b/scenes/levels/parts/ListObjects.tscn @@ -1,44 +1,44 @@ [gd_scene load_steps=8 format=2] [ext_resource path="res://assets/ui/themes/leather.theme" type="Theme" id=2] -[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="DynamicFont" id=3] -[ext_resource path="res://assets/ui/icones/skull.png" type="Texture" id=4] -[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-last-hover.png" type="Texture" id=6] -[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-last.png" type="Texture" id=8] +[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="FontFile" id=3] +[ext_resource path="res://assets/ui/icones/skull.png" type="Texture2D" id=4] +[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-last-hover.png" type="Texture2D" id=6] +[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-last.png" type="Texture2D" id=8] [sub_resource type="Animation" id=1] resource_name = "ObjectFind" tracks/0/type = "bezier" -tracks/0/path = NodePath("ListContainer/TextureButtonLast/Label:rect_position:x") +tracks/0/path = NodePath("ListContainer/TextureButtonLast/Label:position:x") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { -"points": PoolRealArray( 0, -0.25, 0, 0, 78.1, 34.9, -0.25, 0, 0, -66, 12.1, 0, 73.2, 0, -124.8, -41.9, -0.0948485, 109.2, 0.0619706, -58.8, 13.3, -0.187989, 93.6, 0.196425, 104.4, 0, -0.154843, -135.5, 0.25, 0 ), -"times": PoolRealArray( 0, 0.2, 0.4, 0.6, 0.8, 1 ) +"points": PackedFloat32Array( 0, -0.25, 0, 0, 78.1, 34.9, -0.25, 0, 0, -66, 12.1, 0, 73.2, 0, -124.8, -41.9, -0.0948485, 109.2, 0.0619706, -58.8, 13.3, -0.187989, 93.6, 0.196425, 104.4, 0, -0.154843, -135.5, 0.25, 0 ), +"times": PackedFloat32Array( 0, 0.2, 0.4, 0.6, 0.8, 1 ) } [sub_resource type="Animation" id=2] tracks/0/type = "bezier" -tracks/0/path = NodePath("ListContainer/TextureButtonLast:rect_position:x") +tracks/0/path = NodePath("ListContainer/TextureButtonLast:position:x") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { -"points": PoolRealArray( 0, -0.25, 0, 0.0305311, 190.492, 170, -0.349132, 2.57608, 0.25, 0 ), -"times": PoolRealArray( 0, 1 ) +"points": PackedFloat32Array( 0, -0.25, 0, 0.0305311, 190.492, 170, -0.349132, 2.57608, 0.25, 0 ), +"times": PackedFloat32Array( 0, 1 ) } tracks/1/type = "bezier" -tracks/1/path = NodePath("ListContainer/TextureButtonLast:rect_position:y") +tracks/1/path = NodePath("ListContainer/TextureButtonLast:position:y") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/imported = false tracks/1/enabled = true tracks/1/keys = { -"points": PoolRealArray( ), -"times": PoolRealArray( ) +"points": PackedFloat32Array( ), +"times": PackedFloat32Array( ) } [node name="Control" type="MarginContainer"] @@ -46,9 +46,9 @@ anchor_left = 1.0 anchor_top = 0.5 anchor_right = 1.0 anchor_bottom = 0.5 -margin_left = -196.0 -margin_top = -450.0 -margin_bottom = 450.0 +offset_left = -196.0 +offset_top = -450.0 +offset_bottom = 450.0 grow_horizontal = 0 grow_vertical = 2 size_flags_vertical = 3 @@ -57,19 +57,19 @@ __meta__ = { } [node name="ListContainer" type="VBoxContainer" parent="."] -margin_right = 196.0 -margin_bottom = 900.0 -rect_min_size = Vector2( 196, 900 ) +offset_right = 196.0 +offset_bottom = 900.0 +custom_minimum_size = Vector2( 196, 900 ) size_flags_horizontal = 3 size_flags_vertical = 3 -custom_constants/separation = -14 +theme_override_constants/separation = -14 alignment = 1 [node name="TextureButtonLast" type="TextureButton" parent="ListContainer"] visible = false -margin_top = 409.0 -margin_right = 196.0 -margin_bottom = 490.0 +offset_top = 409.0 +offset_right = 196.0 +offset_bottom = 490.0 focus_mode = 0 texture_normal = ExtResource( 8 ) texture_hover = ExtResource( 6 ) @@ -79,7 +79,7 @@ texture_focused = ExtResource( 6 ) anchor_right = 1.0 anchor_bottom = 1.0 theme = ExtResource( 2 ) -custom_fonts/font = ExtResource( 3 ) +theme_override_fonts/font = ExtResource( 3 ) text = "Last" align = 1 valign = 1 @@ -89,15 +89,15 @@ __meta__ = { [node name="HBoxContainer" type="HBoxContainer" parent="ListContainer"] visible = false -margin_top = 419.0 -margin_right = 196.0 -margin_bottom = 547.0 +offset_top = 419.0 +offset_right = 196.0 +offset_bottom = 547.0 alignment = 1 [node name="TextureButtonIndice" type="TextureButton" parent="ListContainer/HBoxContainer"] -margin_left = 34.0 -margin_right = 162.0 -margin_bottom = 128.0 +offset_left = 34.0 +offset_right = 162.0 +offset_bottom = 128.0 texture_normal = ExtResource( 4 ) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] diff --git a/scenes/levels/parts/ObjectListFirst.tscn b/scenes/levels/parts/ObjectListFirst.tscn index 006c240..c122968 100644 --- a/scenes/levels/parts/ObjectListFirst.tscn +++ b/scenes/levels/parts/ObjectListFirst.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-first-hover.png" type="Texture" id=1] -[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="DynamicFont" id=2] -[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-first.png" type="Texture" id=3] +[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-first-hover.png" type="Texture2D" id=1] +[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="FontFile" id=2] +[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-first.png" type="Texture2D" id=3] [node name="TextureButton" type="TextureButton"] -margin_right = 196.0 -margin_bottom = 81.0 +offset_right = 196.0 +offset_bottom = 81.0 texture_normal = ExtResource( 3 ) texture_hover = ExtResource( 1 ) texture_focused = ExtResource( 1 ) @@ -18,8 +18,8 @@ __meta__ = { [node name="Label" type="Label" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -margin_right = -3.05176e-05 -custom_fonts/font = ExtResource( 2 ) +offset_right = -3.05176e-05 +theme_override_fonts/font = ExtResource( 2 ) text = "First Entry" align = 1 valign = 1 diff --git a/scenes/levels/parts/ObjectListLast.tscn b/scenes/levels/parts/ObjectListLast.tscn index b0db84a..8706d0e 100644 --- a/scenes/levels/parts/ObjectListLast.tscn +++ b/scenes/levels/parts/ObjectListLast.tscn @@ -1,13 +1,13 @@ [gd_scene load_steps=5 format=2] [ext_resource path="res://assets/ui/themes/leather.theme" type="Theme" id=1] -[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="DynamicFont" id=2] -[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-last-hover.png" type="Texture" id=3] -[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-last.png" type="Texture" id=4] +[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="FontFile" id=2] +[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-last-hover.png" type="Texture2D" id=3] +[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-last.png" type="Texture2D" id=4] [node name="TextureButton" type="TextureButton"] -margin_right = 196.0 -margin_bottom = 81.0 +offset_right = 196.0 +offset_bottom = 81.0 texture_normal = ExtResource( 4 ) texture_hover = ExtResource( 3 ) texture_focused = ExtResource( 3 ) @@ -20,7 +20,7 @@ __meta__ = { anchor_right = 1.0 anchor_bottom = 1.0 theme = ExtResource( 1 ) -custom_fonts/font = ExtResource( 2 ) +theme_override_fonts/font = ExtResource( 2 ) text = "Last" align = 1 valign = 1 diff --git a/scenes/levels/parts/ObjectListStandard.tscn b/scenes/levels/parts/ObjectListStandard.tscn index 5a43a16..a85d1d4 100644 --- a/scenes/levels/parts/ObjectListStandard.tscn +++ b/scenes/levels/parts/ObjectListStandard.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="DynamicFont" id=1] -[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList.png" type="Texture" id=2] -[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-hover.png" type="Texture" id=3] +[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="FontFile" id=1] +[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList.png" type="Texture2D" id=2] +[ext_resource path="res://assets/ui/themes/UI-Button-ItemsList-hover.png" type="Texture2D" id=3] [node name="TextureButton" type="TextureButton"] -margin_right = 196.0 -margin_bottom = 81.0 +offset_right = 196.0 +offset_bottom = 81.0 texture_normal = ExtResource( 2 ) texture_hover = ExtResource( 3 ) texture_focused = ExtResource( 3 ) @@ -18,7 +18,7 @@ __meta__ = { [node name="Label" type="Label" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -custom_fonts/font = ExtResource( 1 ) +theme_override_fonts/font = ExtResource( 1 ) text = "Middle" align = 1 valign = 1 diff --git a/scenes/levels/warcraft/WarCraft.tscn b/scenes/levels/warcraft/WarCraft.tscn index 544935d..1572ac9 100644 --- a/scenes/levels/warcraft/WarCraft.tscn +++ b/scenes/levels/warcraft/WarCraft.tscn @@ -10,7 +10,7 @@ [ext_resource path="res://assets/props/weapon gun/materials/MA_weapon_gun.material" type="Material" id=8] [ext_resource path="res://assets/props/apple/materials/MA_apple2.material" type="Material" id=9] [ext_resource path="res://assets/props/apple/materials/MA_apple4.material" type="Material" id=10] -[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture" id=11] +[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture2D" id=11] [ext_resource path="res://assets/props/fiole/sm_fiole.mesh" type="ArrayMesh" id=12] [ext_resource path="res://assets/props/fiole/materials/MA_fiole_green.material" type="Material" id=13] [ext_resource path="res://assets/props/dagger/materials/MA_dagger.material" type="Material" id=14] @@ -40,9 +40,9 @@ [ext_resource path="res://assets/props/fireplace/sm_fireplace.mesh" type="ArrayMesh" id=38] [ext_resource path="res://assets/materials/gray.tres" type="Material" id=39] [ext_resource path="res://assets/props/rock floor/materials/MA_rock_floor.material" type="Material" id=40] -[ext_resource path="res://scenes/levels/warcraft/WarCraft.lmbake" type="BakedLightmapData" id=41] +[ext_resource path="res://scenes/levels/warcraft/WarCraft.lmbake" type="LightmapGIData" id=41] -[sub_resource type="PanoramaSky" id=1] +[sub_resource type="Sky" id=1] panorama = ExtResource( 11 ) [sub_resource type="Environment" id=2] @@ -63,58 +63,58 @@ fog_height_min = 2.0 fog_height_max = -20.0 fog_height_curve = 0.965936 tonemap_mode = 2 -ss_reflections_enabled = true +ssr_enabled = true dof_blur_far_distance = 4.0 glow_enabled = true -[sub_resource type="CapsuleShape" id=3] +[sub_resource type="CapsuleShape3D" id=3] radius = 0.130821 height = 0.168171 -[sub_resource type="CapsuleShape" id=4] +[sub_resource type="CapsuleShape3D" id=4] radius = 0.129956 height = 0.149993 -[sub_resource type="CapsuleShape" id=5] +[sub_resource type="CapsuleShape3D" id=5] radius = 0.124344 height = 0.123496 -[sub_resource type="CapsuleShape" id=6] +[sub_resource type="CapsuleShape3D" id=6] radius = 0.0500489 height = 0.330211 -[sub_resource type="CapsuleShape" id=7] +[sub_resource type="CapsuleShape3D" id=7] radius = 0.0995524 height = 0.748899 -[sub_resource type="CapsuleShape" id=8] +[sub_resource type="CapsuleShape3D" id=8] radius = 0.114536 height = 0.236295 -[sub_resource type="CapsuleShape" id=9] +[sub_resource type="CapsuleShape3D" id=9] radius = 0.0911443 height = 0.831942 -[sub_resource type="SphereShape" id=10] +[sub_resource type="SphereShape3D" id=10] radius = 0.0777453 -[sub_resource type="SphereShape" id=11] +[sub_resource type="SphereShape3D" id=11] radius = 0.0939276 -[sub_resource type="SphereShape" id=12] +[sub_resource type="SphereShape3D" id=12] radius = 0.0872712 -[sub_resource type="SphereShape" id=13] +[sub_resource type="SphereShape3D" id=13] radius = 0.0817803 -[sub_resource type="BoxShape" id=14] +[sub_resource type="BoxShape3D" id=14] extents = Vector3( 0.075969, 0.0690835, 0.0842404 ) -[sub_resource type="CylinderShape" id=15] +[sub_resource type="CylinderShape3D" id=15] radius = 0.0715322 height = 0.169626 -[sub_resource type="CylinderShape" id=16] +[sub_resource type="CylinderShape3D" id=16] radius = 0.0931278 height = 0.171908 @@ -133,7 +133,7 @@ surfaces/0 = { "vertex_count": 4110 } -[sub_resource type="PanoramaSky" id=18] +[sub_resource type="Sky" id=18] panorama = ExtResource( 11 ) [sub_resource type="Environment" id=19] @@ -150,398 +150,398 @@ fog_height_min = 2.0 fog_height_max = -20.0 fog_height_curve = 0.965936 tonemap_mode = 2 -ss_reflections_enabled = true +ssr_enabled = true dof_blur_far_distance = 2.0 glow_enabled = true [node name="Warcraft" instance=ExtResource( 1 )] -[node name="MainCamera" type="Camera" parent="." index="4"] -transform = Transform( 0.160708, -0.25632, 0.953138, 0, 0.96569, 0.259696, -0.987002, -0.0417352, 0.155194, 1.84336, 1.66169, 0.663199 ) +[node name="MainCamera" type="Camera3D" parent="." index="4"] +transform = Transform3D( 0.160708, -0.25632, 0.953138, 0, 0.96569, 0.259696, -0.987002, -0.0417352, 0.155194, 1.84336, 1.66169, 0.663199 ) environment = SubResource( 2 ) fov = 38.5632 __meta__ = { "_editor_description_": "" } -[node name="HiddenObjectsItems" type="RayCast" parent="." index="5"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.233905, 1.0296, -0.405055 ) +[node name="HiddenObjectsItems" type="RayCast3D" parent="." index="5"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.233905, 1.0296, -0.405055 ) collision_mask = 2 collide_with_areas = true collide_with_bodies = false -[node name="Fioles" type="Spatial" parent="HiddenObjectsItems" index="0"] +[node name="Fioles" type="Node3D" parent="HiddenObjectsItems" index="0"] -[node name="Fiole1" type="MeshInstance" parent="HiddenObjectsItems/Fioles" index="0"] -transform = Transform( -0.210773, -0.635682, 0.742619, 0.949185, -0.314721, 0, 0.233718, 0.704883, 0.669714, 0.0481223, 0, -0.094099 ) +[node name="Fiole1" type="MeshInstance3D" parent="HiddenObjectsItems/Fioles" index="0"] +transform = Transform3D( -0.210773, -0.635682, 0.742619, 0.949185, -0.314721, 0, 0.233718, 0.704883, 0.669714, 0.0481223, 0, -0.094099 ) use_in_baked_light = true mesh = ExtResource( 12 ) material/0 = ExtResource( 13 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Fioles/Fiole1" index="0"] +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Fioles/Fiole1" index="0"] collision_mask = 2 -[node name="CollisionShape" type="CollisionShape" parent="HiddenObjectsItems/Fioles/Fiole1/Area" index="0"] -transform = Transform( 1, 2.98023e-08, -4.47035e-08, -2.98023e-08, -8.9407e-08, 1, -1.19209e-07, -1, -1.49012e-07, 0, 0.0801148, -2.98023e-08 ) +[node name="CollisionShape3D" type="CollisionShape3D" parent="HiddenObjectsItems/Fioles/Fiole1/Area3D" index="0"] +transform = Transform3D( 1, 2.98023e-08, -4.47035e-08, -2.98023e-08, -8.9407e-08, 1, -1.19209e-07, -1, -1.49012e-07, 0, 0.0801148, -2.98023e-08 ) shape = SubResource( 3 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Fioles/Fiole1" index="1"] -[node name="Fiole2" type="MeshInstance" parent="HiddenObjectsItems/Fioles" index="1"] -transform = Transform( 0.655275, 0.636944, -0.4061, 0.670978, -0.243833, 0.700239, 0.346993, -0.731333, -0.587153, -4.19531, -0.894133, 2.66915 ) +[node name="Fiole2" type="MeshInstance3D" parent="HiddenObjectsItems/Fioles" index="1"] +transform = Transform3D( 0.655275, 0.636944, -0.4061, 0.670978, -0.243833, 0.700239, 0.346993, -0.731333, -0.587153, -4.19531, -0.894133, 2.66915 ) use_in_baked_light = true mesh = ExtResource( 12 ) material/0 = ExtResource( 19 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Fioles/Fiole2" index="0"] -transform = Transform( 1, -2.98023e-08, 0, -2.98023e-08, 1, 0, 1.49012e-08, -1.19209e-07, 1, -2.38419e-07, -0.0202575, 0 ) +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Fioles/Fiole2" index="0"] +transform = Transform3D( 1, -2.98023e-08, 0, -2.98023e-08, 1, 0, 1.49012e-08, -1.19209e-07, 1, -2.38419e-07, -0.0202575, 0 ) collision_mask = 2 -[node name="CollisionShape" type="CollisionShape" parent="HiddenObjectsItems/Fioles/Fiole2/Area" index="0"] -transform = Transform( 1, 5.96046e-08, -8.9407e-08, 2.98023e-08, -8.9407e-08, 1, -8.9407e-08, -1, 0, 2.38419e-07, 0.0823998, -1.19209e-07 ) +[node name="CollisionShape3D" type="CollisionShape3D" parent="HiddenObjectsItems/Fioles/Fiole2/Area3D" index="0"] +transform = Transform3D( 1, 5.96046e-08, -8.9407e-08, 2.98023e-08, -8.9407e-08, 1, -8.9407e-08, -1, 0, 2.38419e-07, 0.0823998, -1.19209e-07 ) shape = SubResource( 4 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Fioles/Fiole2" index="1"] -[node name="FioleSocle" type="MeshInstance" parent="HiddenObjectsItems/Fioles" index="2"] -transform = Transform( 0.6773, -1.86265e-09, 0.735707, -0.0293841, 0.999202, 0.0270513, -0.73512, -0.03994, 0.67676, -2.27881, -0.11528, -1.23929 ) +[node name="FioleSocle" type="MeshInstance3D" parent="HiddenObjectsItems/Fioles" index="2"] +transform = Transform3D( 0.6773, -1.86265e-09, 0.735707, -0.0293841, 0.999202, 0.0270513, -0.73512, -0.03994, 0.67676, -2.27881, -0.11528, -1.23929 ) use_in_baked_light = true mesh = ExtResource( 3 ) material/0 = null -[node name="Fiole3" type="MeshInstance" parent="HiddenObjectsItems/Fioles/FioleSocle" index="0"] -transform = Transform( 0.919703, -0.349433, -0.179005, 0.316708, 0.929754, -0.187758, 0.232039, 0.115989, 0.965766, -1.19209e-07, 0.1147, 0.00100636 ) +[node name="Fiole3" type="MeshInstance3D" parent="HiddenObjectsItems/Fioles/FioleSocle" index="0"] +transform = Transform3D( 0.919703, -0.349433, -0.179005, 0.316708, 0.929754, -0.187758, 0.232039, 0.115989, 0.965766, -1.19209e-07, 0.1147, 0.00100636 ) use_in_baked_light = true mesh = ExtResource( 12 ) material/0 = ExtResource( 21 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Fioles/FioleSocle/Fiole3" index="0"] +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Fioles/FioleSocle/Fiole3" index="0"] collision_mask = 2 -[node name="CollisionShape" type="CollisionShape" parent="HiddenObjectsItems/Fioles/FioleSocle/Fiole3/Area" index="0"] -transform = Transform( 1, 2.08616e-07, -7.45058e-08, -5.96046e-08, -1.49012e-07, 1, 5.96046e-08, -1, -1.04308e-07, -1.78814e-07, 0.0560231, 0 ) +[node name="CollisionShape3D" type="CollisionShape3D" parent="HiddenObjectsItems/Fioles/FioleSocle/Fiole3/Area3D" index="0"] +transform = Transform3D( 1, 2.08616e-07, -7.45058e-08, -5.96046e-08, -1.49012e-07, 1, 5.96046e-08, -1, -1.04308e-07, -1.78814e-07, 0.0560231, 0 ) shape = SubResource( 5 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Fioles/FioleSocle/Fiole3" index="1"] -[node name="Dagger" type="MeshInstance" parent="HiddenObjectsItems" index="1"] -transform = Transform( -0.625025, -0.777847, 0.0655765, 0, 0.0840072, 0.996466, -0.780606, 0.622816, -0.0525065, 0.69073, -0.117415, 0.830941 ) +[node name="Dagger" type="MeshInstance3D" parent="HiddenObjectsItems" index="1"] +transform = Transform3D( -0.625025, -0.777847, 0.0655765, 0, 0.0840072, 0.996466, -0.780606, 0.622816, -0.0525065, 0.69073, -0.117415, 0.830941 ) use_in_baked_light = true mesh = ExtResource( 17 ) material/0 = ExtResource( 14 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Dagger" index="0"] +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Dagger" index="0"] collision_mask = 2 -[node name="CollisionShape" type="CollisionShape" parent="HiddenObjectsItems/Dagger/Area" index="0"] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0.0802139, 0 ) +[node name="CollisionShape3D" type="CollisionShape3D" parent="HiddenObjectsItems/Dagger/Area3D" index="0"] +transform = Transform3D( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0.0802139, 0 ) shape = SubResource( 6 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Dagger" index="1"] -[node name="Spyglass" type="MeshInstance" parent="HiddenObjectsItems" index="2"] -transform = Transform( 0.652362, 0.137749, 0.63579, -0.234678, 0.889605, 0.0480562, -0.606736, -0.195981, 0.665013, -2.884, -0.292075, -0.429783 ) +[node name="Spyglass" type="MeshInstance3D" parent="HiddenObjectsItems" index="2"] +transform = Transform3D( 0.652362, 0.137749, 0.63579, -0.234678, 0.889605, 0.0480562, -0.606736, -0.195981, 0.665013, -2.884, -0.292075, -0.429783 ) use_in_baked_light = true mesh = ExtResource( 23 ) material/0 = ExtResource( 24 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Spyglass" index="0"] +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Spyglass" index="0"] collision_mask = 2 -[node name="CollisionShape" type="CollisionShape" parent="HiddenObjectsItems/Spyglass/Area" index="0"] -transform = Transform( 1, 0, 2.98023e-08, 1.86265e-09, 1, 3.72529e-09, 0, 5.58794e-09, 1, 2.38419e-07, -1.19209e-07, 0.0177531 ) +[node name="CollisionShape3D" type="CollisionShape3D" parent="HiddenObjectsItems/Spyglass/Area3D" index="0"] +transform = Transform3D( 1, 0, 2.98023e-08, 1.86265e-09, 1, 3.72529e-09, 0, 5.58794e-09, 1, 2.38419e-07, -1.19209e-07, 0.0177531 ) shape = SubResource( 7 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Spyglass" index="1"] -[node name="Beer" type="MeshInstance" parent="HiddenObjectsItems" index="3"] -transform = Transform( 0.996658, -0.053142, 0.0620432, 0.0548108, 0.998171, -0.0255105, -0.060574, 0.0288258, 0.997748, -2.8842, 0.173697, 1.98168 ) +[node name="Beer" type="MeshInstance3D" parent="HiddenObjectsItems" index="3"] +transform = Transform3D( 0.996658, -0.053142, 0.0620432, 0.0548108, 0.998171, -0.0255105, -0.060574, 0.0288258, 0.997748, -2.8842, 0.173697, 1.98168 ) use_in_baked_light = true mesh = ExtResource( 22 ) material/0 = ExtResource( 5 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Beer" index="0"] -transform = Transform( 1, 0, 7.45058e-09, -1.16415e-10, 1, -1.86265e-09, 0, 0, 1, -2.38419e-07, -0.21161, -1.19209e-07 ) +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Beer" index="0"] +transform = Transform3D( 1, 0, 7.45058e-09, -1.16415e-10, 1, -1.86265e-09, 0, 0, 1, -2.38419e-07, -0.21161, -1.19209e-07 ) collision_mask = 2 -[node name="CollisionShapeBeer" type="CollisionShape" parent="HiddenObjectsItems/Beer/Area" index="0"] -transform = Transform( 1, 0, -1.61817e-08, 1.83936e-08, -4.28408e-08, 1, 0, -1, -4.65661e-08, 9.53674e-07, 0.0746492, 2.38419e-07 ) +[node name="CollisionShapeBeer" type="CollisionShape3D" parent="HiddenObjectsItems/Beer/Area3D" index="0"] +transform = Transform3D( 1, 0, -1.61817e-08, 1.83936e-08, -4.28408e-08, 1, 0, -1, -4.65661e-08, 9.53674e-07, 0.0746492, 2.38419e-07 ) shape = SubResource( 8 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Beer" index="1"] -[node name="Weapon" type="MeshInstance" parent="HiddenObjectsItems" index="4"] -transform = Transform( 0.540284, -0.813497, 0.215212, -0.009216, 0.250018, 0.968198, -0.841432, -0.525085, 0.127583, -2.7508, -0.359206, 1.19589 ) +[node name="Weapon" type="MeshInstance3D" parent="HiddenObjectsItems" index="4"] +transform = Transform3D( 0.540284, -0.813497, 0.215212, -0.009216, 0.250018, 0.968198, -0.841432, -0.525085, 0.127583, -2.7508, -0.359206, 1.19589 ) use_in_baked_light = true mesh = ExtResource( 7 ) material/0 = ExtResource( 8 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Weapon" index="0"] +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Weapon" index="0"] collision_mask = 2 -[node name="CollisionShapeWeapon" type="CollisionShape" parent="HiddenObjectsItems/Weapon/Area" index="0"] -transform = Transform( -1.49012e-07, 0, 1, -1, -1.49012e-08, 0, 3.72529e-08, -1, -5.21541e-08, 0.0388942, 0.0484145, -8.19564e-08 ) +[node name="CollisionShapeWeapon" type="CollisionShape3D" parent="HiddenObjectsItems/Weapon/Area3D" index="0"] +transform = Transform3D( -1.49012e-07, 0, 1, -1, -1.49012e-08, 0, 3.72529e-08, -1, -5.21541e-08, 0.0388942, 0.0484145, -8.19564e-08 ) shape = SubResource( 9 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Weapon" index="1"] -[node name="Apples" type="Spatial" parent="HiddenObjectsItems" index="5"] +[node name="Apples" type="Node3D" parent="HiddenObjectsItems" index="5"] -[node name="Apple1" type="MeshInstance" parent="HiddenObjectsItems/Apples" index="0"] -transform = Transform( 0.849809, -0.0462348, 0.525058, 0.0744364, 0.996689, -0.0327109, -0.521807, 0.0668814, 0.850438, -2.20275, -0.0779731, 2.45146 ) +[node name="Apple1" type="MeshInstance3D" parent="HiddenObjectsItems/Apples" index="0"] +transform = Transform3D( 0.849809, -0.0462348, 0.525058, 0.0744364, 0.996689, -0.0327109, -0.521807, 0.0668814, 0.850438, -2.20275, -0.0779731, 2.45146 ) use_in_baked_light = true mesh = ExtResource( 4 ) material/0 = ExtResource( 15 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Apples/Apple1" index="0"] +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Apples/Apple1" index="0"] collision_mask = 2 -[node name="CollisionShapeApple" type="CollisionShape" parent="HiddenObjectsItems/Apples/Apple1/Area" index="0"] -transform = Transform( -1.45286e-07, -2.98023e-08, 1, -1, -1.11759e-08, 0, 1.86265e-08, -1, -8.9407e-08, -1.90735e-06, 0.00575864, 0 ) +[node name="CollisionShapeApple" type="CollisionShape3D" parent="HiddenObjectsItems/Apples/Apple1/Area3D" index="0"] +transform = Transform3D( -1.45286e-07, -2.98023e-08, 1, -1, -1.11759e-08, 0, 1.86265e-08, -1, -8.9407e-08, -1.90735e-06, 0.00575864, 0 ) shape = SubResource( 10 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Apples/Apple1" index="1"] -[node name="Apple2" type="MeshInstance" parent="HiddenObjectsItems/Apples" index="1"] -transform = Transform( -0.190449, 0, 0.981697, 0, 1, 0, -0.981697, 0, -0.190449, -1.71166, -0.0869397, -1.29534 ) +[node name="Apple2" type="MeshInstance3D" parent="HiddenObjectsItems/Apples" index="1"] +transform = Transform3D( -0.190449, 0, 0.981697, 0, 1, 0, -0.981697, 0, -0.190449, -1.71166, -0.0869397, -1.29534 ) use_in_baked_light = true mesh = ExtResource( 4 ) material/0 = ExtResource( 9 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Apples/Apple2" index="0"] +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Apples/Apple2" index="0"] collision_mask = 2 -[node name="CollisionShapeApple2" type="CollisionShape" parent="HiddenObjectsItems/Apples/Apple2/Area" index="0"] -transform = Transform( -1.49012e-07, 4.47035e-08, 1, -1, -1.49012e-08, 0, 3.72529e-08, -1, -1.49012e-08, -4.76837e-07, -0.00566041, 0 ) +[node name="CollisionShapeApple2" type="CollisionShape3D" parent="HiddenObjectsItems/Apples/Apple2/Area3D" index="0"] +transform = Transform3D( -1.49012e-07, 4.47035e-08, 1, -1, -1.49012e-08, 0, 3.72529e-08, -1, -1.49012e-08, -4.76837e-07, -0.00566041, 0 ) shape = SubResource( 11 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Apples/Apple2" index="1"] -[node name="Apple3" type="MeshInstance" parent="HiddenObjectsItems/Apples" index="2"] -transform = Transform( 0.823731, 0.226496, -0.519776, -0.248954, 0.96813, 0.0273319, 0.509401, 0.106886, 0.853865, -0.718663, -0.36046, 1.92043 ) +[node name="Apple3" type="MeshInstance3D" parent="HiddenObjectsItems/Apples" index="2"] +transform = Transform3D( 0.823731, 0.226496, -0.519776, -0.248954, 0.96813, 0.0273319, 0.509401, 0.106886, 0.853865, -0.718663, -0.36046, 1.92043 ) use_in_baked_light = true mesh = ExtResource( 4 ) material/0 = ExtResource( 20 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Apples/Apple3" index="0"] +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Apples/Apple3" index="0"] collision_mask = 2 -[node name="CollisionShapeApple3" type="CollisionShape" parent="HiddenObjectsItems/Apples/Apple3/Area" index="0"] -transform = Transform( -1.71363e-07, 0, 1, -1, -3.72529e-08, 1.49012e-08, 2.98023e-08, -1, -1.19209e-07, -3.57628e-07, 0.0142345, 2.38419e-07 ) +[node name="CollisionShapeApple3" type="CollisionShape3D" parent="HiddenObjectsItems/Apples/Apple3/Area3D" index="0"] +transform = Transform3D( -1.71363e-07, 0, 1, -1, -3.72529e-08, 1.49012e-08, 2.98023e-08, -1, -1.19209e-07, -3.57628e-07, 0.0142345, 2.38419e-07 ) shape = SubResource( 12 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Apples/Apple3" index="1"] -[node name="Apple4" type="MeshInstance" parent="HiddenObjectsItems/Apples" index="3"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.38775, -0.940515, 0.233058 ) +[node name="Apple4" type="MeshInstance3D" parent="HiddenObjectsItems/Apples" index="3"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.38775, -0.940515, 0.233058 ) use_in_baked_light = true mesh = ExtResource( 4 ) material/0 = ExtResource( 10 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Apples/Apple4" index="0"] +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Apples/Apple4" index="0"] collision_mask = 2 -[node name="CollisionShapeApple4" type="CollisionShape" parent="HiddenObjectsItems/Apples/Apple4/Area" index="0"] -transform = Transform( -1.49012e-07, 0, 1, -1, -1.49012e-08, 0, 3.72529e-08, -1, -5.21541e-08, -4.76837e-07, 0.00115258, -1.17347e-07 ) +[node name="CollisionShapeApple4" type="CollisionShape3D" parent="HiddenObjectsItems/Apples/Apple4/Area3D" index="0"] +transform = Transform3D( -1.49012e-07, 0, 1, -1, -1.49012e-08, 0, 3.72529e-08, -1, -5.21541e-08, -4.76837e-07, 0.00115258, -1.17347e-07 ) shape = SubResource( 13 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Apples/Apple4" index="1"] -[node name="Coins" type="Spatial" parent="HiddenObjectsItems" index="6"] +[node name="Coins" type="Node3D" parent="HiddenObjectsItems" index="6"] -[node name="Coin1" type="MeshInstance" parent="HiddenObjectsItems/Coins" index="0"] -transform = Transform( -0.958704, -0.0851446, 0.271362, -0.0825332, 0.996367, 0.0210433, -0.272167, -0.00222202, -0.962248, 0.215021, 0.00178671, 0.520763 ) +[node name="Coin1" type="MeshInstance3D" parent="HiddenObjectsItems/Coins" index="0"] +transform = Transform3D( -0.958704, -0.0851446, 0.271362, -0.0825332, 0.996367, 0.0210433, -0.272167, -0.00222202, -0.962248, 0.215021, 0.00178671, 0.520763 ) use_in_baked_light = true mesh = ExtResource( 2 ) material/0 = ExtResource( 18 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Coins/Coin1" index="0"] -transform = Transform( 1, -4.65661e-09, 0, 2.68919e-08, 1, 4.65661e-10, -1.19209e-07, -1.14087e-08, 1, -0.0781975, -0.0532835, -0.0615574 ) +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Coins/Coin1" index="0"] +transform = Transform3D( 1, -4.65661e-09, 0, 2.68919e-08, 1, 4.65661e-10, -1.19209e-07, -1.14087e-08, 1, -0.0781975, -0.0532835, -0.0615574 ) collision_mask = 2 -[node name="CollisionShapeGold1" type="CollisionShape" parent="HiddenObjectsItems/Coins/Coin1/Area" index="0"] -transform = Transform( 1, -4.65661e-08, 0, -1.38185e-07, 0.999999, 3.14321e-08, 4.17233e-07, -4.19095e-09, 1, 0.0276761, 0.00212932, 0.0336302 ) +[node name="CollisionShapeGold1" type="CollisionShape3D" parent="HiddenObjectsItems/Coins/Coin1/Area3D" index="0"] +transform = Transform3D( 1, -4.65661e-08, 0, -1.38185e-07, 0.999999, 3.14321e-08, 4.17233e-07, -4.19095e-09, 1, 0.0276761, 0.00212932, 0.0336302 ) shape = SubResource( 14 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Coins/Coin1" index="1"] -[node name="Coin2" type="MeshInstance" parent="HiddenObjectsItems/Coins" index="1"] -transform = Transform( 0.250245, 2.79397e-09, -0.968183, 0.0456076, 0.99889, 0.0117882, 0.967108, -0.0471065, 0.249967, 0.752443, -0.000386238, 1.36745 ) +[node name="Coin2" type="MeshInstance3D" parent="HiddenObjectsItems/Coins" index="1"] +transform = Transform3D( 0.250245, 2.79397e-09, -0.968183, 0.0456076, 0.99889, 0.0117882, 0.967108, -0.0471065, 0.249967, 0.752443, -0.000386238, 1.36745 ) layers = 3 use_in_baked_light = true mesh = ExtResource( 2 ) material/0 = ExtResource( 16 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Coins/Coin2" index="0"] -transform = Transform( 1, -1.49012e-08, 0, 0, 1, 9.31323e-10, 1.49012e-08, -3.72529e-09, 1, -0.0553267, -0.0679173, -0.0739018 ) +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Coins/Coin2" index="0"] +transform = Transform3D( 1, -1.49012e-08, 0, 0, 1, 9.31323e-10, 1.49012e-08, -3.72529e-09, 1, -0.0553267, -0.0679173, -0.0739018 ) collision_mask = 2 -[node name="CollisionShapeGold2" type="CollisionShape" parent="HiddenObjectsItems/Coins/Coin2/Area" index="0"] -transform = Transform( 1, 0, 2.98023e-08, 7.45058e-09, 1, -9.31323e-10, 5.96046e-08, 0, 1, 0.0499306, 1.19209e-07, 0.0191208 ) +[node name="CollisionShapeGold2" type="CollisionShape3D" parent="HiddenObjectsItems/Coins/Coin2/Area3D" index="0"] +transform = Transform3D( 1, 0, 2.98023e-08, 7.45058e-09, 1, -9.31323e-10, 5.96046e-08, 0, 1, 0.0499306, 1.19209e-07, 0.0191208 ) shape = SubResource( 15 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Coins/Coin2" index="1"] -[node name="Coin3" type="MeshInstance" parent="HiddenObjectsItems/Coins" index="2"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.74641, -0.885448, -0.198129 ) +[node name="Coin3" type="MeshInstance3D" parent="HiddenObjectsItems/Coins" index="2"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.74641, -0.885448, -0.198129 ) use_in_baked_light = true mesh = ExtResource( 2 ) material/0 = ExtResource( 6 ) -[node name="Area" type="Area" parent="HiddenObjectsItems/Coins/Coin3" index="0"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0744205, -0.0795707, -0.040606 ) +[node name="Area3D" type="Area3D" parent="HiddenObjectsItems/Coins/Coin3" index="0"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0744205, -0.0795707, -0.040606 ) collision_mask = 2 -[node name="CollisionShapeGold3" type="CollisionShape" parent="HiddenObjectsItems/Coins/Coin3/Area" index="0"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0358186, 0, 0.0109152 ) +[node name="CollisionShapeGold3" type="CollisionShape3D" parent="HiddenObjectsItems/Coins/Coin3/Area3D" index="0"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0358186, 0, 0.0109152 ) shape = SubResource( 16 ) [node name="Tween" type="Tween" parent="HiddenObjectsItems/Coins/Coin3" index="1"] -[node name="MainSceneProps" type="Spatial" parent="." index="6"] +[node name="MainSceneProps" type="Node3D" parent="." index="6"] [node name="sm_book" parent="MainSceneProps" index="0" instance=ExtResource( 33 )] -transform = Transform( 0.259561, 0, 0.965727, 0.0582327, 0.99818, -0.0156514, -0.963969, 0.0602995, 0.259089, 0.13025, 0.960907, -0.456389 ) +transform = Transform3D( 0.259561, 0, 0.965727, 0.0582327, 0.99818, -0.0156514, -0.963969, 0.0602995, 0.259089, 0.13025, 0.960907, -0.456389 ) [node name="sm_book2" parent="MainSceneProps/sm_book" index="1" instance=ExtResource( 33 )] -transform = Transform( 0.0229641, -0.00339183, -0.999731, 0.0393653, 0.999223, -0.00248598, 0.998961, -0.0392976, 0.0230803, 0.00279957, 0.066205, -0.000443451 ) +transform = Transform3D( 0.0229641, -0.00339183, -0.999731, 0.0393653, 0.999223, -0.00248598, 0.998961, -0.0392976, 0.0230803, 0.00279957, 0.066205, -0.000443451 ) [node name="sm_book3" parent="MainSceneProps/sm_book/sm_book2" index="1" instance=ExtResource( 33 )] -transform = Transform( 0.86032, -0.0497817, -0.507318, 0.0471006, 0.998725, -0.0181282, 0.507573, -0.00829895, 0.861568, 0.00110056, 0.070618, -0.00503528 ) +transform = Transform3D( 0.86032, -0.0497817, -0.507318, 0.0471006, 0.998725, -0.0181282, 0.507573, -0.00829895, 0.861568, 0.00110056, 0.070618, -0.00503528 ) [node name="sm_candlestick" parent="MainSceneProps/sm_book/sm_book2/sm_book3" index="1" instance=ExtResource( 29 )] -transform = Transform( 1.0543, -0.0109484, 1.03432, -0.0329634, 1.4758, 0.0492217, -1.03385, -0.0582193, 1.05321, 0.0299356, 0.0326169, -0.0690778 ) +transform = Transform3D( 1.0543, -0.0109484, 1.03432, -0.0329634, 1.4758, 0.0492217, -1.03385, -0.0582193, 1.05321, 0.0299356, 0.0326169, -0.0690778 ) [node name="sm_table" parent="MainSceneProps" index="1" instance=ExtResource( 28 )] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0926853, 0.0400838, 0.290515 ) +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0926853, 0.0400838, 0.290515 ) [node name="sm_stool_b" parent="MainSceneProps" index="2" instance=ExtResource( 31 )] -transform = Transform( -0.232037, 0, -0.972707, 0, 1, 0, 0.972707, 0, -0.232037, -2.91873, 0.0130518, 0.702275 ) +transform = Transform3D( -0.232037, 0, -0.972707, 0, 1, 0, 0.972707, 0, -0.232037, -2.91873, 0.0130518, 0.702275 ) [node name="sm_stool_b2" parent="MainSceneProps" index="3" instance=ExtResource( 31 )] -transform = Transform( 0.769693, -0.034908, -0.637459, 0.0288114, 0.999386, -0.0199395, 0.637764, -0.00301879, 0.770226, -4.33166, 0.0231258, 1.08363 ) +transform = Transform3D( 0.769693, -0.034908, -0.637459, 0.0288114, 0.999386, -0.0199395, 0.637764, -0.00301879, 0.770226, -4.33166, 0.0231258, 1.08363 ) [node name="sm_stool_b3" parent="MainSceneProps" index="4" instance=ExtResource( 31 )] -transform = Transform( 0.98104, 0, 0.193806, 0, 1, 0, -0.193806, 0, 0.98104, -3.04076, 0.0372323, -0.817556 ) +transform = Transform3D( 0.98104, 0, 0.193806, 0, 1, 0, -0.193806, 0, 0.98104, -3.04076, 0.0372323, -0.817556 ) [node name="sm_stool_b7" parent="MainSceneProps" index="5" instance=ExtResource( 31 )] -transform = Transform( 0.656257, 0, 0.754538, 0, 1, 0, -0.754538, 0, 0.656257, -0.888955, 0.0130518, 1.64328 ) +transform = Transform3D( 0.656257, 0, 0.754538, 0, 1, 0, -0.754538, 0, 0.656257, -0.888955, 0.0130518, 1.64328 ) [node name="sm_stool_b4" parent="MainSceneProps" index="6" instance=ExtResource( 31 )] -transform = Transform( 0.892389, 0, -0.451267, 0, 1, 0, 0.451267, 0, 0.892389, 1.35966, 0.013052, 1.23435 ) +transform = Transform3D( 0.892389, 0, -0.451267, 0, 1, 0, 0.451267, 0, 0.892389, 1.35966, 0.013052, 1.23435 ) [node name="sm_stool_b5" parent="MainSceneProps" index="7" instance=ExtResource( 31 )] -transform = Transform( 0.839193, 0, 0.543834, 0, 1, 0, -0.543834, 0, 0.839193, 0.474083, 0.013052, -1.39025 ) +transform = Transform3D( 0.839193, 0, 0.543834, 0, 1, 0, -0.543834, 0, 0.839193, 0.474083, 0.013052, -1.39025 ) [node name="sm_book2" parent="MainSceneProps" index="8" instance=ExtResource( 33 )] -transform = Transform( 0.122577, 0.0288089, -0.992041, -0.0361233, 0.999045, 0.0245489, 0.991801, 0.0328267, 0.1235, 0.493202, 0.942654, -0.0854386 ) +transform = Transform3D( 0.122577, 0.0288089, -0.992041, -0.0361233, 0.999045, 0.0245489, 0.991801, 0.0328267, 0.1235, 0.493202, 0.942654, -0.0854386 ) [node name="sm_book3" parent="MainSceneProps" index="9" instance=ExtResource( 33 )] -transform = Transform( 0.5, 0, 0.866025, 0, 1, 0, -0.866025, 0, 0.5, 0.0106606, 0.96499, 0.981535 ) +transform = Transform3D( 0.5, 0, 0.866025, 0, 1, 0, -0.866025, 0, 0.5, 0.0106606, 0.96499, 0.981535 ) [node name="sm_book" parent="MainSceneProps/sm_book3" index="1" instance=ExtResource( 33 )] -transform = Transform( 0.992026, 0, 0.592682, 0, 1.15559, 0, -0.592682, 0, 0.992026, -0.000832617, 0.0791223, -0.012241 ) +transform = Transform3D( 0.992026, 0, 0.592682, 0, 1.15559, 0, -0.592682, 0, 0.992026, -0.000832617, 0.0791223, -0.012241 ) [node name="sm_godet" parent="MainSceneProps" index="10" instance=ExtResource( 32 )] -transform = Transform( 0.875311, 0.480987, 0.0498184, 0.0206958, 0.0656668, -0.997627, -0.483117, 0.874265, 0.0475244, -0.191043, 0.95253, 0.11484 ) +transform = Transform3D( 0.875311, 0.480987, 0.0498184, 0.0206958, 0.0656668, -0.997627, -0.483117, 0.874265, 0.0475244, -0.191043, 0.95253, 0.11484 ) [node name="sm_godet2" parent="MainSceneProps" index="11" instance=ExtResource( 32 )] -transform = Transform( 0.706057, 0, -0.708155, 0, 1, 0, 0.708155, 0, 0.706057, -0.112722, 0.901657, 0.00149509 ) +transform = Transform3D( 0.706057, 0, -0.708155, 0, 1, 0, 0.708155, 0, 0.706057, -0.112722, 0.901657, 0.00149509 ) [node name="sm_godet6" parent="MainSceneProps" index="12" instance=ExtResource( 32 )] -transform = Transform( 0.757895, 0, 0.652376, 0, 1, 0, -0.652376, 0, 0.757895, -0.28474, 0.905096, 0.78228 ) +transform = Transform3D( 0.757895, 0, 0.652376, 0, 1, 0, -0.652376, 0, 0.757895, -0.28474, 0.905096, 0.78228 ) [node name="sm_godet5" parent="MainSceneProps" index="13" instance=ExtResource( 32 )] -transform = Transform( 0.886172, -0.463214, 0.0114893, -0.0309068, -0.0343508, 0.998932, -0.462324, -0.885581, -0.0447572, -0.0861932, 0.982616, 0.742759 ) +transform = Transform3D( 0.886172, -0.463214, 0.0114893, -0.0309068, -0.0343508, 0.998932, -0.462324, -0.885581, -0.0447572, -0.0861932, 0.982616, 0.742759 ) [node name="sm_godet4" parent="MainSceneProps" index="14" instance=ExtResource( 32 )] -transform = Transform( 0.690251, 0, 0.72357, 0, 1, 0, -0.72357, 0, 0.690251, -0.333186, 0.901657, 0.177792 ) +transform = Transform3D( 0.690251, 0, 0.72357, 0, 1, 0, -0.72357, 0, 0.690251, -0.333186, 0.901657, 0.177792 ) [node name="sm_growler" parent="MainSceneProps" index="15" instance=ExtResource( 34 )] -transform = Transform( 0.0876426, 0, -0.996152, 0, 1, 0, 0.996152, 0, 0.0876426, -0.316595, 0.905106, -0.0726386 ) +transform = Transform3D( 0.0876426, 0, -0.996152, 0, 1, 0, 0.996152, 0, 0.0876426, -0.316595, 0.905106, -0.0726386 ) [node name="Parchment" parent="MainSceneProps" index="16" instance=ExtResource( 30 )] -transform = Transform( 0.796076, 0.00917861, -0.605127, 0, 0.999885, 0.0151663, 0.605197, -0.0120736, 0.795984, 0.543303, 0.962739, 0.755265 ) +transform = Transform3D( 0.796076, 0.00917861, -0.605127, 0, 0.999885, 0.0151663, 0.605197, -0.0120736, 0.795984, 0.543303, 0.962739, 0.755265 ) paper = true [node name="ParchmentWithoutPaper" parent="MainSceneProps" index="17" instance=ExtResource( 30 )] -transform = Transform( -0.596381, 0.0184557, 0.802489, 0.0225364, 0.999726, -0.00624354, -0.802385, 0.0143617, -0.596634, 0.281044, 0.958449, -0.253034 ) +transform = Transform3D( -0.596381, 0.0184557, 0.802489, 0.0225364, 0.999726, -0.00624354, -0.802385, 0.0143617, -0.596634, 0.281044, 0.958449, -0.253034 ) -[node name="sm_candle_d2" type="MeshInstance" parent="MainSceneProps" index="18"] -transform = Transform( -0.927966, 1.10978e-07, -0.372664, 6.91459e-08, 1, 1.25617e-07, 0.372664, 9.08001e-08, -0.927966, 0.457262, 1.00485, -0.058084 ) +[node name="sm_candle_d2" type="MeshInstance3D" parent="MainSceneProps" index="18"] +transform = Transform3D( -0.927966, 1.10978e-07, -0.372664, 6.91459e-08, 1, 1.25617e-07, 0.372664, 9.08001e-08, -0.927966, 0.457262, 1.00485, -0.058084 ) use_in_baked_light = true mesh = ExtResource( 25 ) material/0 = null -[node name="sm_candle_top2" type="MeshInstance" parent="MainSceneProps" index="19"] -transform = Transform( 2.94906, 0, 0, 0, 2.85, 0, 0, 0, 2.94906, 0.347704, 1.00342, 1.16015 ) +[node name="sm_candle_top2" type="MeshInstance3D" parent="MainSceneProps" index="19"] +transform = Transform3D( 2.94906, 0, 0, 0, 2.85, 0, 0, 0, 2.94906, 0.347704, 1.00342, 1.16015 ) use_in_baked_light = true mesh = ExtResource( 26 ) material/0 = null -[node name="sm_candle_b" type="MeshInstance" parent="MainSceneProps/sm_candle_top2" index="0"] -transform = Transform( 0.553417, 0, 0, 0, 0.553417, 0, 0, 0, 0.553417, 0.0504003, -0.0129334, 0.00162044 ) +[node name="sm_candle_b" type="MeshInstance3D" parent="MainSceneProps/sm_candle_top2" index="0"] +transform = Transform3D( 0.553417, 0, 0, 0, 0.553417, 0, 0, 0, 0.553417, 0.0504003, -0.0129334, 0.00162044 ) use_in_baked_light = true mesh = ExtResource( 27 ) material/0 = null [node name="Tableleft" parent="." index="7" instance=ExtResource( 28 )] -transform = Transform( -0.958482, 0, -0.285153, 0, 1, 0, 0.285153, 0, -0.958482, -2.60247, 0.0491341, 2.15903 ) +transform = Transform3D( -0.958482, 0, -0.285153, 0, 1, 0, 0.285153, 0, -0.958482, -2.60247, 0.0491341, 2.15903 ) [node name="sm_growler" parent="Tableleft" index="1" instance=ExtResource( 34 )] -transform = Transform( -0.958482, 0, 0.285153, 0, 1, 0, -0.285153, 0, -0.958482, 0.179069, 0.843493, 2.38419e-07 ) +transform = Transform3D( -0.958482, 0, 0.285153, 0, 1, 0, -0.285153, 0, -0.958482, 0.179069, 0.843493, 2.38419e-07 ) [node name="sm_godet" parent="Tableleft" index="2" instance=ExtResource( 32 )] -transform = Transform( -0.958482, 0.0116327, 0.284916, 0, 0.999168, -0.0407945, -0.285153, -0.0391008, -0.957684, 0.00578856, 0.850618, 0.189056 ) +transform = Transform3D( -0.958482, 0.0116327, 0.284916, 0, 0.999168, -0.0407945, -0.285153, -0.0391008, -0.957684, 0.00578856, 0.850618, 0.189056 ) [node name="sm_godet2" parent="Tableleft" index="3" instance=ExtResource( 32 )] -transform = Transform( -0.958482, -0.0136413, 0.284827, 0, 0.998855, 0.0478387, -0.285153, 0.0458525, -0.957385, 0.102124, 0.837641, -0.25378 ) +transform = Transform3D( -0.958482, -0.0136413, 0.284827, 0, 0.998855, 0.0478387, -0.285153, 0.0458525, -0.957385, 0.102124, 0.837641, -0.25378 ) [node name="TableRight" parent="." index="8" instance=ExtResource( 28 )] -transform = Transform( 0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, 0.707107, -2.1664, 0.0295653, -2.02667 ) +transform = Transform3D( 0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, 0.707107, -2.1664, 0.0295653, -2.02667 ) [node name="Growler" parent="TableRight" index="1" instance=ExtResource( 34 )] -transform = Transform( 0.428226, 0, -0.903672, 0, 1, 0, 0.903672, 0, 0.428226, 0.260903, 0.870654, 0.24329 ) +transform = Transform3D( 0.428226, 0, -0.903672, 0, 1, 0, 0.903672, 0, 0.428226, 0.260903, 0.870654, 0.24329 ) [node name="Godet" parent="TableRight" index="2" instance=ExtResource( 32 )] -transform = Transform( 0.869771, 0, 0.493456, 0, 1, 0, -0.493456, 0, 0.869771, 0.124432, 0.85553, -0.0287701 ) +transform = Transform3D( 0.869771, 0, 0.493456, 0, 1, 0, -0.493456, 0, 0.869771, 0.124432, 0.85553, -0.0287701 ) [node name="Godet3" parent="TableRight" index="3" instance=ExtResource( 32 )] -transform = Transform( 0.979508, 0.200153, 0.0224678, -0.0198889, -0.0148863, 0.999692, 0.200426, -0.979652, -0.0106004, 0.511135, 0.919194, 0.249402 ) +transform = Transform3D( 0.979508, 0.200153, 0.0224678, -0.0198889, -0.0148863, 0.999692, 0.200426, -0.979652, -0.0106004, 0.511135, 0.919194, 0.249402 ) [node name="Godet4" parent="TableRight" index="4" instance=ExtResource( 32 )] -transform = Transform( -0.236782, -0.0445638, 0.970541, -0.0267146, 0.998868, 0.039347, -0.971196, -0.0166109, -0.237705, 0.291596, 0.864092, -0.00375021 ) +transform = Transform3D( -0.236782, -0.0445638, 0.970541, -0.0267146, 0.998868, 0.039347, -0.971196, -0.0166109, -0.237705, 0.291596, 0.864092, -0.00375021 ) -[node name="Building" type="Spatial" parent="." index="9"] +[node name="Building" type="Node3D" parent="." index="9"] -[node name="walls" type="Spatial" parent="Building" index="0"] +[node name="walls" type="Node3D" parent="Building" index="0"] -[node name="wall_left" type="MeshInstance" parent="Building/walls" index="0"] -transform = Transform( 17.6823, 0, 0, 0, -2.06229e-06, 7.98594, 0, -6.6644, -4.9309e-08, -3.48147, 2.21218, 4.82163 ) +[node name="wall_left" type="MeshInstance3D" parent="Building/walls" index="0"] +transform = Transform3D( 17.6823, 0, 0, 0, -2.06229e-06, 7.98594, 0, -6.6644, -4.9309e-08, -3.48147, 2.21218, 4.82163 ) use_in_baked_light = true mesh = ExtResource( 36 ) material/0 = ExtResource( 39 ) -[node name="wall_roof" type="MeshInstance" parent="Building/walls" index="1"] -transform = Transform( 19.0333, 0, 0, 0, -2.05553, -1.80384e-05, 0, 1.78061e-06, -20.8236, -3.43417, 4.19346, -0.500263 ) +[node name="wall_roof" type="MeshInstance3D" parent="Building/walls" index="1"] +transform = Transform3D( 19.0333, 0, 0, 0, -2.05553, -1.80384e-05, 0, 1.78061e-06, -20.8236, -3.43417, 4.19346, -0.500263 ) use_in_baked_light = true mesh = ExtResource( 36 ) material/0 = ExtResource( 39 ) -[node name="wall_right" type="MeshInstance" parent="Building/walls" index="2"] -transform = Transform( -6.12822, -1.14249, -5.98427e-08, 0, -2.8759e-07, 7.88397, -1.08057, 6.47934, 3.39384e-07, -0.343511, 2.21218, -5.27151 ) +[node name="wall_right" type="MeshInstance3D" parent="Building/walls" index="2"] +transform = Transform3D( -6.12822, -1.14249, -5.98427e-08, 0, -2.8759e-07, 7.88397, -1.08057, 6.47934, 3.39384e-07, -0.343511, 2.21218, -5.27151 ) use_in_baked_light = true mesh = ExtResource( 36 ) material/0 = ExtResource( 39 ) -[node name="wall_right2" type="MeshInstance" parent="Building/walls" index="3"] -transform = Transform( -6.12822, -1.14249, -5.98427e-08, 0, -2.8759e-07, 7.88397, -1.08057, 6.47934, 3.39384e-07, -5.52464, 2.21218, -6.18509 ) +[node name="wall_right2" type="MeshInstance3D" parent="Building/walls" index="3"] +transform = Transform3D( -6.12822, -1.14249, -5.98427e-08, 0, -2.8759e-07, 7.88397, -1.08057, 6.47934, 3.39384e-07, -5.52464, 2.21218, -6.18509 ) use_in_baked_light = true mesh = ExtResource( 36 ) material/0 = ExtResource( 39 ) -[node name="wall_background" type="MeshInstance" parent="Building/walls" index="4"] -transform = Transform( -3.92366, 6.98897, 3.66077e-07, 0, -3.1021e-07, 8.50407, 22.2522, 1.23234, 6.45493e-08, -7.48147, 2.21218, -0.975186 ) +[node name="wall_background" type="MeshInstance3D" parent="Building/walls" index="4"] +transform = Transform3D( -3.92366, 6.98897, 3.66077e-07, 0, -3.1021e-07, 8.50407, 22.2522, 1.23234, 6.45493e-08, -7.48147, 2.21218, -0.975186 ) use_in_baked_light = true mesh = ExtResource( 36 ) material/0 = ExtResource( 39 ) @@ -553,45 +553,45 @@ cell_center_y = false cell_center_z = false baked_meshes = [ SubResource( 17 ) ] data = { -"cells": PoolIntArray( 0, 0, 536870912, 65531, 0, 536870915, 65532, 0, 536870912, 65533, 0, 1073741824, 65534, 0, 0, 65535, 0, 0, 0, 1, 536870912, 65531, 1, 536870915, 65532, 1, 0, 65533, 1, 536870912, 65534, 1, 536870912, 65535, 1, 0, 0, 2, 536870912, 65531, 2, 536870915, 65532, 2, 536870912, 65533, 2, 536870912, 65534, 2, 0, 65535, 2, 0, 0, 65533, 0, 65532, 65533, 0, 65533, 65533, 536870912, 65534, 65533, 0, 65535, 65533, 536870912, 0, 65534, 0, 65531, 65534, 3, 65532, 65534, 536870912, 65533, 65534, 536870912, 65534, 65534, 536870912, 65535, 65534, 536870912, 0, 65535, 536870912, 65531, 65535, 536870915, 65532, 65535, 0, 65533, 65535, 1073741824, 65534, 65535, 1073741824, 65535, 65535, 1073741824 ) +"cells": PackedInt32Array( 0, 0, 536870912, 65531, 0, 536870915, 65532, 0, 536870912, 65533, 0, 1073741824, 65534, 0, 0, 65535, 0, 0, 0, 1, 536870912, 65531, 1, 536870915, 65532, 1, 0, 65533, 1, 536870912, 65534, 1, 536870912, 65535, 1, 0, 0, 2, 536870912, 65531, 2, 536870915, 65532, 2, 536870912, 65533, 2, 536870912, 65534, 2, 0, 65535, 2, 0, 0, 65533, 0, 65532, 65533, 0, 65533, 65533, 536870912, 65534, 65533, 0, 65535, 65533, 536870912, 0, 65534, 0, 65531, 65534, 3, 65532, 65534, 536870912, 65533, 65534, 536870912, 65534, 65534, 536870912, 65535, 65534, 536870912, 0, 65535, 536870912, 65531, 65535, 536870915, 65532, 65535, 0, 65533, 65535, 1073741824, 65534, 65535, 1073741824, 65535, 65535, 1073741824 ) } __meta__ = { "_editor_clip_": 0, "_editor_floor_": Vector3( 0, 0, 0 ) } -[node name="sm_column" type="MeshInstance" parent="Building" index="2"] -transform = Transform( 0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, 0.173648, -6.41226, 0, -3.39909 ) +[node name="sm_column" type="MeshInstance3D" parent="Building" index="2"] +transform = Transform3D( 0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, 0.173648, -6.41226, 0, -3.39909 ) use_in_baked_light = true mesh = ExtResource( 35 ) material/0 = null -[node name="sm_column2" type="MeshInstance" parent="Building" index="3"] -transform = Transform( 0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, 0.173648, -7.23782, 0, 1.51736 ) +[node name="sm_column2" type="MeshInstance3D" parent="Building" index="3"] +transform = Transform3D( 0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, 0.173648, -7.23782, 0, 1.51736 ) use_in_baked_light = true mesh = ExtResource( 35 ) material/0 = null -[node name="sm_column3" type="MeshInstance" parent="Building" index="4"] -transform = Transform( 0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, 0.173648, -7.73765, 0, 4.20657 ) +[node name="sm_column3" type="MeshInstance3D" parent="Building" index="4"] +transform = Transform3D( 0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, 0.173648, -7.73765, 0, 4.20657 ) use_in_baked_light = true mesh = ExtResource( 35 ) material/0 = null -[node name="sm_column4" type="MeshInstance" parent="Building" index="5"] -transform = Transform( 0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, 0.173648, -5.90352, 0, -6.13626 ) +[node name="sm_column4" type="MeshInstance3D" parent="Building" index="5"] +transform = Transform3D( 0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, 0.173648, -5.90352, 0, -6.13626 ) use_in_baked_light = true mesh = ExtResource( 35 ) material/0 = null -[node name="sm_fireplace" type="MeshInstance" parent="Building" index="6"] -transform = Transform( 0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, 0.173648, -7.17176, -2.38419e-07, -1.02066 ) +[node name="sm_fireplace" type="MeshInstance3D" parent="Building" index="6"] +transform = Transform3D( 0.173648, 0, 0.984808, 0, 1, 0, -0.984808, 0, 0.173648, -7.17176, -2.38419e-07, -1.02066 ) use_in_baked_light = true mesh = ExtResource( 38 ) material/0 = null -[node name="FireplaceLight" type="OmniLight" parent="Building/sm_fireplace" index="0"] -transform = Transform( 0.173304, -0.0109248, -0.984808, 0.0629123, 0.998019, -1.78701e-07, 0.982857, -0.0619565, 0.173648, 0.00967455, 0.654315, 0.510273 ) +[node name="FireplaceLight" type="OmniLight3D" parent="Building/sm_fireplace" index="0"] +transform = Transform3D( 0.173304, -0.0109248, -0.984808, 0.0629123, 0.998019, -1.78701e-07, 0.982857, -0.0619565, 0.173648, 0.00967455, 0.654315, 0.510273 ) visible = false light_color = Color( 0.960784, 0.611765, 0.00784314, 1 ) light_energy = 1.4 @@ -602,10 +602,10 @@ editor_only = true omni_range = 1.8 omni_attenuation = 1.23114 -[node name="Lighting" type="Spatial" parent="." index="10"] +[node name="Lighting" type="Node3D" parent="." index="10"] -[node name="Red Color Left" type="SpotLight" parent="Lighting" index="0"] -transform = Transform( 0.949107, 0.151161, -0.276307, 0, 0.877297, 0.479948, 0.314953, -0.455522, 0.832649, -4.0515, 2.45338, 4.26157 ) +[node name="Red Color Left" type="SpotLight3D" parent="Lighting" index="0"] +transform = Transform3D( 0.949107, 0.151161, -0.276307, 0, 0.877297, 0.479948, 0.314953, -0.455522, 0.832649, -4.0515, 2.45338, 4.26157 ) visible = false light_color = Color( 0.643137, 0.109804, 0.152941, 1 ) light_energy = 11.3 @@ -619,8 +619,8 @@ spot_range = 5.43268 spot_attenuation = 1.41421 spot_angle = 31.2 -[node name="Red Color Left2" type="SpotLight" parent="Lighting" index="1"] -transform = Transform( 0.80562, 0.042778, 0.590886, -0.18969, 0.963507, 0.18887, -0.561244, -0.264243, 0.784335, 0.631187, 2.3448, 4.15934 ) +[node name="Red Color Left2" type="SpotLight3D" parent="Lighting" index="1"] +transform = Transform3D( 0.80562, 0.042778, 0.590886, -0.18969, 0.963507, 0.18887, -0.561244, -0.264243, 0.784335, 0.631187, 2.3448, 4.15934 ) visible = false light_color = Color( 0.643137, 0.109804, 0.152941, 1 ) light_energy = 0.4 @@ -635,8 +635,8 @@ spot_attenuation = 1.41 [node name="WorldEnvironment" type="WorldEnvironment" parent="Lighting" index="2"] environment = SubResource( 19 ) -[node name="Blue Color Right" type="SpotLight" parent="Lighting" index="3"] -transform = Transform( -0.994228, 0.0863279, -0.0637094, 0.0626716, 0.949248, 0.308222, 0.0870842, 0.302451, -0.949179, -4.00108, 2.13555, -5.73587 ) +[node name="Blue Color Right" type="SpotLight3D" parent="Lighting" index="3"] +transform = Transform3D( -0.994228, 0.0863279, -0.0637094, 0.0626716, 0.949248, 0.308222, 0.0870842, 0.302451, -0.949179, -4.00108, 2.13555, -5.73587 ) visible = false light_color = Color( 0.501961, 0.529412, 1, 1 ) light_energy = 4.0 @@ -648,8 +648,8 @@ spot_range = 7.07277 spot_attenuation = 1.46409 spot_angle = 29.7 -[node name="Blue Color Right2" type="SpotLight" parent="Lighting" index="4"] -transform = Transform( -0.596615, 0.0976924, 0.79656, 0.0626716, 0.995204, -0.0751143, -0.800077, 0.00510741, -0.599875, -0.159195, 1.47445, -4.78163 ) +[node name="Blue Color Right2" type="SpotLight3D" parent="Lighting" index="4"] +transform = Transform3D( -0.596615, 0.0976924, 0.79656, 0.0626716, 0.995204, -0.0751143, -0.800077, 0.00510741, -0.599875, -0.159195, 1.47445, -4.78163 ) visible = false light_color = Color( 0.501961, 0.529412, 1, 1 ) light_energy = 32.0 @@ -659,8 +659,8 @@ spot_range = 7.07277 spot_attenuation = 1.86607 spot_angle = 28.7038 -[node name="BakedLightmap" type="BakedLightmap" parent="." index="11"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3.06928, 2.35676, -0.183365 ) +[node name="LightmapGI" type="LightmapGI" parent="." index="11"] +transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3.06928, 2.35676, -0.183365 ) extents = Vector3( 6.50885, 3.63237, 10 ) bounces = 5 environment_mode = 1 diff --git a/scenes/levels/warcraft/env_warcraft.tres b/scenes/levels/warcraft/env_warcraft.tres index e78bbbc..9d82e1e 100644 --- a/scenes/levels/warcraft/env_warcraft.tres +++ b/scenes/levels/warcraft/env_warcraft.tres @@ -1,8 +1,8 @@ [gd_resource type="Environment" load_steps=3 format=2] -[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture" id=1] +[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture2D" id=1] -[sub_resource type="PanoramaSky" id=2] +[sub_resource type="Sky" id=2] panorama = ExtResource( 1 ) [resource] diff --git a/scripts/Animation.gd b/scripts/Animation.gd index 4152be5..ff6850c 100644 --- a/scripts/Animation.gd +++ b/scripts/Animation.gd @@ -5,7 +5,7 @@ var current_material = null func level_hud_slide(node): var animation = Animation.new() var track_index = animation.add_track(Animation.TYPE_BEZIER) - var node_element = String(node.get_path()) + ":rect_position:x" + var node_element = String(node.get_path()) + ":position:x" animation.track_set_path(track_index, node_element) animation.bezier_track_insert_key(track_index, 0.0, 0.0, Vector2(-0.25, 0), Vector2(0.031, 190.492)) @@ -16,7 +16,7 @@ func level_hud_slide(node): func level_hud_warning(node): var animation = Animation.new() var track_index = animation.add_track(Animation.TYPE_BEZIER) - var node_element = String(node.get_path()) + ":rect_position:x" + var node_element = String(node.get_path()) + ":position:x" animation.track_set_path(track_index, node_element) animation.bezier_track_insert_key(track_index, 0.0, 0.0, Vector2(-0.25, 0), Vector2(0, 78.1)) @@ -34,4 +34,4 @@ func start_dissolve(node, material): node.start() func animate_dissolve(progress: float) -> void: - current_material.set_shader_param("dissolve_amount", ease(progress, 0.4)) + current_material.set_shader_parameter("dissolve_amount", ease(progress, 0.4)) diff --git a/scripts/Global.gd b/scripts/Global.gd index 750ba6b..ee82991 100644 --- a/scripts/Global.gd +++ b/scripts/Global.gd @@ -2,13 +2,13 @@ extends Control const TICKS_TIME_MAX = 100 # msec -onready var current_scene = null -onready var current_scene_int = null -onready var loader = null -onready var wait_frames = 1 -onready var database = null -onready var loaded = false -onready var animation = Loading.get_node("AnimLoading") +@onready var current_scene = null +@onready var current_scene_int = null +@onready var loader = null +@onready var wait_frames = 1 +@onready var database = null +@onready var loaded = false +@onready var animation = Loading.get_node("AnimLoading") func _ready(): database = load("res://scripts/Database.gd").new().initialize() @@ -17,12 +17,12 @@ func _ready(): _initialize_loading_scene() func _initialize_loading_scene(): - animation.connect("animation_started", Event, "_loading_is_started") - animation.connect("animation_finished", Event, "_loading_is_finished") + animation.connect("animation_started", Callable(Event, "_loading_is_started")) + animation.connect("animation_finished", Callable(Event, "_loading_is_finished")) func goto_scene(path): print("[global#goto_scene] : load scene "+String(path)) - loader = ResourceLoader.load_interactive(path) + loader = ResourceLoader.load_threaded_request(path) if loader == null: print("Error loading ....") return @@ -43,10 +43,10 @@ func _process(_delta): if wait_frames > 0: wait_frames -= 1 - var tick = OS.get_ticks_msec() + var tick = Time.get_ticks_msec() # Use "TICKS_TIME_MAX" to control for how long we block this thread - while OS.get_ticks_msec() < tick + TICKS_TIME_MAX: + while Time.get_ticks_msec() < tick + TICKS_TIME_MAX: if loaded: var err = loader.poll() @@ -75,6 +75,6 @@ func _update_progress(): func _set_new_scene(): var resource = loader.get_resource() loader = null - current_scene = resource.instance() + current_scene = resource.instantiate() get_node("/root").add_child(current_scene) Loading.hide() diff --git a/scripts/Setting.gd b/scripts/Setting.gd index 639aac6..eb0302e 100644 --- a/scripts/Setting.gd +++ b/scripts/Setting.gd @@ -1,6 +1,6 @@ extends Node -onready var setting = load("res://db/MSetting.gd").new() +@onready var setting = load("res://db/MSetting.gd").new() func _ready(): apply_language(translate_int_to_locale(get_setting_language())) @@ -24,10 +24,10 @@ func translate_int_to_locale(id): func apply_resolution(): var screen_size = Vector2(get_setting_resolution()[0], get_setting_resolution()[1]) var margin_size = Vector2(0, 0) - get_viewport().set_size_override(true, screen_size, margin_size) + get_viewport().set_size_2d_override(true, screen_size, margin_size) func apply_fullscreen(): - OS.set_window_fullscreen(get_setting_fullscreen()) + get_window().mode = Window.MODE_EXCLUSIVE_FULLSCREEN if (get_setting_fullscreen()) else Window.MODE_WINDOWED func get_setting_language(): return setting.get_langue()