Add stub presentation for Tree.

This commit is contained in:
Nolan Darilek 2018-06-10 21:02:45 +00:00
parent 1ef8886876
commit 9c9c4c4af5

View File

@ -21,11 +21,24 @@ func present_line_edit():
type = "text" type = "text"
print("%s: %s" % [text, type]) print("%s: %s" % [text, type])
func item_or_items(count):
if count == 1:
return "item"
else:
return "items"
func present_tree():
var root = node.get_root()
var count = 0
print("tree: %s %s" % [count, item_or_items(count)])
func focused(): func focused():
if node is Button: if node is Button:
present_button() present_button()
elif node is LineEdit: elif node is LineEdit:
present_line_edit() present_line_edit()
elif node is Tree:
present_tree()
else: else:
print("Focus entered.", self.node) print("Focus entered.", self.node)