mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Update navigate example
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user