add kanban

This commit is contained in:
algodoogle
2026-07-16 15:52:34 +01:00
parent 329bb1f984
commit 5e0b58a984
94 changed files with 5384 additions and 1 deletions
+43
View File
@@ -0,0 +1,43 @@
@tool
extends "kanban_resource.gd"
## Data of a category.
var title: String:
set(value):
title = value
__notify_changed()
var color: Color:
set(value):
color = value
__notify_changed()
func _init(p_title: String = "", p_color: Color = Color()) -> void:
title = p_title
color = p_color
super._init()
func to_json() -> Dictionary:
return {
"title": title,
"color": color.to_html(false),
}
func from_json(json: Dictionary) -> void:
title = "Missing data."
color = Color.CORNFLOWER_BLUE
if json.has("title"):
title = json["title"]
else:
push_warning("Loading incomplete json data which is missing a title.")
if json.has("color"):
color = Color.html(json["color"])
else:
push_warning("Loading incomplete json data which is missing a color.")