Run godot --convert-3to4 (automated conversion)
Apply Godot 4.6 automated conversion: renames Spatial.translate->position, margin_*->offset_*, tool->@tool, .empty()->.is_empty(), DynamicFont->FontFile, onready->@onready, export()->@export, and many more. 127 files changed by the tool. Manual fixes still required for: - godot_db_manager plugin (incompatible APIs: WindowDialog, Tabs, etc.) - lod plugin (Spatial -> Node3D renames) - ResourceLoader.load_interactive removed -> load_threaded_request - OS.set_window_fullscreen removed -> DisplayServer - Viewport.set_size_override removed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@tool
|
||||
"""
|
||||
class GDDBConstants
|
||||
"""
|
||||
|
||||
class_name GDDBConstants
|
||||
|
||||
tool
|
||||
extends Node
|
||||
|
||||
# GDDB signature
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@tool
|
||||
"""
|
||||
class GDDBTypes
|
||||
"""
|
||||
|
||||
class_name GDDBTypes
|
||||
|
||||
tool
|
||||
extends Node
|
||||
|
||||
# Database loading errors
|
||||
|
||||
@@ -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)):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 :
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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 ]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 )]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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__ = {
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Vendored
+2
-2
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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=""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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=""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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=""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/ambient-sound-level-warcraft.ogg-eca793b67538fcb6a049f7f31dff337d.oggstr"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/click-button.ogg-80b2cbbc4fed369d32c5a684038e7942.oggstr"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/Apple.ogg-f89120a96b14173404c312d1b4ef368e.oggstr"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/Beer.ogg-0e6bc95a6b45b804996f580a1be3aee0.oggstr"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/Coins.ogg-f9cdd1d56965eda212616a29dbbeb095.oggstr"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/Dagger.ogg-178fe92ff6535d2fb657b61a6eac19d3.oggstr"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/Fiole.ogg-1906e95d5cfcc7fb30df4ed47d615be2.oggstr"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/Spyglass.ogg-ba1068305c94ce71d19393b8c494b13c.oggstr"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/Weapon Gun.ogg-6fb518cb7a9f877d5716e766285221ac.oggstr"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/victory.ogg-f200c5ed87d76f20ec981fde28a9e56b.oggstr"
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
extends Spatial
|
||||
extends Node3D
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
+10
-9
@@ -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
|
||||
|
||||
+7
-7
@@ -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():
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user