Add Classes model
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
extends Object
|
||||
|
||||
var table = null
|
||||
|
||||
func _get_data(datas, index):
|
||||
return datas[index].get_data()
|
||||
|
||||
func _set_data(value, id, type):
|
||||
table.edit_data(id, type, String(value))
|
||||
Global.database.save_db()
|
||||
return value
|
||||
|
||||
func _get_data_id(prop_name, index):
|
||||
print("[mbase#_get_data_id] : prop_name : "+String(prop_name))
|
||||
print("[mbase#_get_data_id] : index : "+String(index))
|
||||
|
||||
if table.get_prop_at(index).get_prop_name() == prop_name:
|
||||
print("[mbase#_get_data_id] : find prop with ID ")
|
||||
var id = table.get_prop_at(index).get_prop_id()
|
||||
|
||||
print("[mbase#_get_data_id] : "+String(id))
|
||||
return id
|
||||
else:
|
||||
return null
|
||||
Reference in New Issue
Block a user