summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-11-18 18:12:59 +0100
committernokoe <nokoe@mailbox.org>2024-11-18 18:12:59 +0100
commit2fd2a7171091f3c4de9e47f7eb1164c408510c13 (patch)
treef194472661a4e2621cec15586c4531a1ba8cf56b
parent97eeeaa912898be613c79e23888fff4f3799c3c2 (diff)
downloadhurrycurry-2fd2a7171091f3c4de9e47f7eb1164c408510c13.tar
hurrycurry-2fd2a7171091f3c4de9e47f7eb1164c408510c13.tar.bz2
hurrycurry-2fd2a7171091f3c4de9e47f7eb1164c408510c13.tar.zst
add table to document
-rw-r--r--client/menu/document/document.gd13
1 files changed, 12 insertions, 1 deletions
diff --git a/client/menu/document/document.gd b/client/menu/document/document.gd
index 69a0b852..ba7883dd 100644
--- a/client/menu/document/document.gd
+++ b/client/menu/document/document.gd
@@ -52,7 +52,18 @@ func build_document(element: Dictionary) -> Control:
for e in element["es"]:
node.add_child(text_node(e, true))
"table":
- push_warning("Table not yet implemented")
+ node = VBoxContainer.new()
+ node.name = "Rows"
+ node.size_flags_horizontal = Control.SIZE_EXPAND_FILL
+ for r in range(element["es"].size()):
+ var row = HBoxContainer.new()
+ node.add_child(row)
+ row.size_flags_horizontal = Control.SIZE_EXPAND_FILL
+ row.name = "Row%d" % r
+ for c in element["es"][r]:
+ var e = build_document(c)
+ e.size_flags_horizontal = Control.SIZE_EXPAND_FILL
+ row.add_child(e)
"par":
node = VBoxContainer.new()
node.name = "Paragraph"