diff options
author | nokoe <nokoe@mailbox.org> | 2024-11-18 18:12:59 +0100 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2024-11-18 18:12:59 +0100 |
commit | 2fd2a7171091f3c4de9e47f7eb1164c408510c13 (patch) | |
tree | f194472661a4e2621cec15586c4531a1ba8cf56b | |
parent | 97eeeaa912898be613c79e23888fff4f3799c3c2 (diff) | |
download | hurrycurry-2fd2a7171091f3c4de9e47f7eb1164c408510c13.tar hurrycurry-2fd2a7171091f3c4de9e47f7eb1164c408510c13.tar.bz2 hurrycurry-2fd2a7171091f3c4de9e47f7eb1164c408510c13.tar.zst |
add table to document
-rw-r--r-- | client/menu/document/document.gd | 13 |
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" |