Update navigate example

This commit is contained in:
Insality
2021-04-05 21:57:54 +03:00
parent b3e7f63e64
commit 4f621274c1
6 changed files with 881 additions and 20 deletions

View File

@@ -273,7 +273,8 @@ nodes {
}
type: TYPE_TEXT
blend_mode: BLEND_MODE_ALPHA
text: "Data List with horizontal Static Grid:"
text: "Data List with horizontal Static Grid,\n"
"without buttons:"
font: "game"
id: "text_hint_horizontal"
xanchor: XANCHOR_NONE

View File

@@ -19,16 +19,11 @@ end
local function create_horizontal_element(self, data, index, data_list)
-- Here we will create elements without druid components, just nodes
local instance = gui.clone_tree(self.prefab_square)
gui.set_enabled(instance["prefab_square"], true)
gui.set_text(instance["text_square"], data)
local button = self.druid:new_button(instance["prefab_square"], function()
print("Data list element click on", data)
end)
button:set_click_zone(data_list.scroll.view_node)
return instance["prefab_square"], button
return instance["prefab_square"]
end