SpriteAnimation.lua
Tile.lua
Neo3D.lua
QuadTree.lua
Widget.lua
Sprite.lua
Collision.lua
OEntity.lua
Button.lua
Graphics2D.lua
InputField.lua
LuaUnit.lua
Tests.lua
OCamera.lua
Object3d.lua
class.lua
OLight.lua
SpriteSheet.lua
OSound.lua
Utils.lua
Canvas.lua
Label.lua
Api.lua

The InputField class

The InputField class contains primitives to display and configure
UI based edit fields. You can retrieve and change the current text data by
using the 'setLabel' and 'getLabel' methods.

See also: Widget

Example:


-- Create an input field
input = InputField(10, 10, 100, 20, "This is an input field!")

-- Add it to the main canvas
mainCanvas:addWidget(input)

function onSceneUpdate()
-- Get input field content
    local value = input:getLabel()
    print("Input field has value: " .. value)
end

InputField(x,y,w,h,text)

Creates a new button.

Parameter

x

The x position on the canvas

y

The y position on the canvas

w

The width of the widget

h

The height of the widget

text

The label of the widget