If listbox has more list items than listbox can display, scrollbar appears.
User can scroll down, but if user clicked list items on scrolled area, items won't be selected.
Issue only can be reproduced on master branch. It won't be reproduced on latest stable release(0.9.0).
Please check an image below.
Code(main.lua)
Slab = require "slab"
local Selected = nil
function love.load()
Slab.Initialize(args)
end
function love.draw()
Slab.Draw()
end
function love.update(dt)
Slab.Update(dt)
Slab.BeginWindow('ListBox', {Title = "List Box", AutoSizeWindow = false})
Slab.BeginListBox('ListBoxExample')
for I = 1, 10, 1 do
Slab.BeginListBoxItem('ListBoxExample_Item_' .. I, {Selected = Selected == I})
Slab.Text("Item " .. I)
if Slab.IsListBoxItemClicked() then
Selected = I
end
Slab.EndListBoxItem()
end
Slab.EndListBox()
Slab.EndWindow()
end
If listbox has more list items than listbox can display, scrollbar appears. User can scroll down, but if user clicked list items on scrolled area, items won't be selected. Issue only can be reproduced on master branch. It won't be reproduced on latest stable release(0.9.0). Please check an image below.
Code(main.lua)
.love file: Listbox.zip