-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
49 lines (37 loc) · 1.44 KB
/
Copy pathmain.lua
File metadata and controls
49 lines (37 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
local application = require("application")
local button = require("button")
local textBox = require("textbox")
local selectBox = require("select")
local listBox = require('list')
local app, buttonSend, textBoxHistory, selectCommand, listCommand
function love.load()
app = application.new()
textBoxHistory = textBox.new(app, 10,10, 570, 500, true)
textBoxHistory:appendText("Hello World!")
buttonSend = button.new(app, 310, 520, "Send")
selectCommand = selectBox.new(app, 10, 520, {"First", "Second", "Third"}, "up")
textBoxHistory:appendText("Hello World!")
listBoxCommand = listBox.new(app, 590,10,200,500, {"Fourth", "Fifth", "Sixth", "Seventh", "Eighth", "Ninth", "Tenth", "Fourth", "Fifth", "Sixth", "Seventh", "Eighth", "Ninth", "Tenth", "Fourth", "Fifth", "Sixth", "Seventh", "Eighth", "Ninth", "Tenth", "Fourth", "Fifth", "Sixth", "Seventh", "Eighth", "Ninth", "Tenth"})
end
function love.update(dt)
app:update(dt)
end
function love.draw()
app:draw()
end
function love.mousereleased(x, y, button, istouch)
app:mouseReleased(x, y, button, istouch)
end
function love.mousepressed(x, y, button, istouch)
app:mousePressed(x, y, button, istouch)
end
function love.wheelmoved(x, y)
app:wheelMoved(x, y)
end
function love.keypressed(key, keycode, isRepeat)
app:keyPressed(key, keycode, isRepeat)
end
function love.textinput(text)
-- for some reason this is never called! -- Because Love 11.1 is broken
app:textInput(text)
end