20 lines
406 B
GDScript
20 lines
406 B
GDScript
extends TextureButton
|
|
|
|
|
|
onready var scroll_container = get_node("../..")
|
|
|
|
|
|
func _ready():
|
|
# warning-ignore:return_value_discarded
|
|
Users.connect("switched", self, "_on_user_switched")
|
|
|
|
|
|
func _on_user_switched():
|
|
self_modulate = Users.get_current().add_topic_button_color
|
|
|
|
|
|
func _on_pressed():
|
|
Data.topics.insert_topic(get_index())
|
|
yield(get_tree(), "idle_frame")
|
|
scroll_container.scroll_vertical += 64
|