I am aiming to get @Insality’s attention, but maybe someone else can help me out?
In the video, you can see that the scrolling seems broken as I am allowed to go higher than the top most content entry. The content is entered via templates and I modify the data at run time.
I doubt druid is broken as I have used standard controls in my game in production. I am just trying to figure out what could cause it to go beyond the boundary.
I added some code, minus my module, to show what is happening
-- Create the grid for the colors
self.color_grid = createGrid(self, colors, "colors/content", "tile_prefab" )
-- Tasks
self.task_grid = createGrid(self, tasks, "tasks/content", "tile_prefab" )
-- Specials
self.special_grid = createGrid(self, specials, "specials/content", "tile_prefab" )
-- Blockers
self.blocker_grid = createGrid(self, blockers, "blockers/content", "tile_prefab" )
-- Locks
self.lock_grid = createGrid(self, locks, "locks/content", "tile_prefab" )
-------------------------------------------
-- Draw the dropdown items consecutively
-- Going downward
-------------------------------------------
local parent_top = 0
-- local roots = {
-- [1] = { root = "colors", anchor_bottom = "tasks", header_color = vmath.vector4(0xF9 / 255, 0xDD / 255, 0x12 / 255, 1) },
-- [2] = { root = "tasks", anchor_bottom = "specials", header_color = vmath.vector4(0xFD / 255, 0x51 / 255, 0x39 / 255, 1) },
-- [3] = { root = "specials", anchor_bottom = "blockers" },
-- [4] = { root = "blockers", anchor_bottom = "locks", header_color = vmath.vector4(0x10 / 255, 0xDC / 255, 0x67 / 255, 1) },
-- [5] = { root = "locks", header_color = vmath.vector4(0xFF / 255, 0xA6 / 255, 0x0A / 255, 1) },
-- }
-- --
for i, node in ipairs(roots) do
local root = gui.get_node(node.root .. "/root")
local content = gui.get_node(node.root .. "/content")
local header = gui.get_node(node.root .. "/header")
local size = gui.get_size(content)
-- Create an instance of a dropdown menu
self[node.root] = dd:new_dropdown(node.root)
-- Initialize the data: Druid, content_size, menu_position
self[node.root]:init(self.druid, size, vmath.vector3(0, parent_top, 1))
-- Header size defaults to 64 pixels high
parent_top = parent_top - 64
--
if node.header_color then
gui.set_color(header, node.header_color)
end
end
-- Set anchors
for i, node in ipairs(roots) do
local anchor_bottom = node.anchor_bottom
if anchor_bottom then
self[node.root]:setAnchor(self[anchor_bottom])
end
end
-- Drop down list scroll box
self.left_scroll = self.druid:new_scroll("list_container", "list_content")
