7d285bd607
- added user switching - added Topic Panel functionality (features are missing) - some basic refactoring
32 lines
537 B
GDScript
32 lines
537 B
GDScript
extends Node
|
|
class_name TopicData
|
|
|
|
|
|
signal topic_added(topic)
|
|
|
|
var dirty_flag = false
|
|
var loaded_topics = []
|
|
|
|
|
|
func add_topic(position: int):
|
|
var topic = Topic.new()
|
|
topic.type = position # Delete this line later.
|
|
loaded_topics.append(topic)
|
|
|
|
# TODO: Make it possible to vary in position in the array!!
|
|
emit_signal("topic_added", topic)
|
|
|
|
|
|
func load_data():
|
|
# TODO: Load data.
|
|
pass
|
|
|
|
|
|
func save_data():
|
|
if dirty_flag:
|
|
# TODO: Save data.
|
|
pass
|
|
|
|
# dirty_flag needs to be set to false after successful save!
|
|
dirty_flag = false
|