Difference between revisions of "ListBox"

m (Darkmetalic moved page User:Dusoft to ListBox: User:Dusoft It was an error generated)
Line 1: Line 1:
is an Dynamic ListBox GUI library created by Luiz Renato for LÖVE.
+
ListBox is an Dynamic ListBox GUI library created by Luiz Renato for LÖVE.
  
 
https://github.com/darkmetalic/ListBox
 
https://github.com/darkmetalic/ListBox
 +
 +
'''Demo:'''
 +
<source lang="lua">
 +
function love.load()
 +
 +
font = love.graphics.newFont(15)
 +
 +
list = require "listbox"
 +
 +
local tlist={
 +
x=200, y=100,
 +
font=font,ismouse=true,
 +
rounded=true,
 +
w=200,h=300,showindex=true}
 +
 +
list:newprop(tlist)
 +
 +
list:additem("MySite","www.MySite.com")
 +
list:additem("MyNumber",123456)
 +
end
 +
 +
function love.keypressed(key)
 +
list:key(key,true)
 +
end
 +
 +
function love.wheelmoved(x,y)
 +
list:mousew(x,y)
 +
end
 +
 +
function love.update(dt)
 +
list:update(dt)
 +
end
 +
 +
function love.draw()
 +
list:draw()
 +
end
 +
</source>
  
 
{{#set:Name=DynamicListBox}}
 
{{#set:Name=DynamicListBox}}

Revision as of 09:44, 8 March 2017

ListBox is an Dynamic ListBox GUI library created by Luiz Renato for LÖVE.

https://github.com/darkmetalic/ListBox

Demo:

function love.load()

font = love.graphics.newFont(15)

list = require "listbox"

local tlist={
x=200, y=100,
font=font,ismouse=true,
rounded=true,
w=200,h=300,showindex=true}

list:newprop(tlist)

list:additem("MySite","www.MySite.com")
list:additem("MyNumber",123456)
end

function love.keypressed(key)
list:key(key,true)
end

function love.wheelmoved(x,y)
list:mousew(x,y)
end

function love.update(dt)
list:update(dt)
end

function love.draw()
list:draw()
end