-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.lua
57 lines (47 loc) · 1.17 KB
/
main.lua
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
50
51
52
53
54
55
56
57
function love.load() -- called on start
local f = love.filesystem.load("/initlua.lua")
f()
love.keyboard.setKeyRepeat(true)
Time = 0
EGPD2.Initlsgil2Buttons()
end
function love.update(dt) -- dt is deltatime
Time = Time + dt
lsglil2.Update(dt)
--EGPD2.CurrZoom = math.cos(Time * 0.5) + 1
end
function love.textinput(t)
local cancel = lsglil2.UpdateTextEntry(t)
if not cancel then
return
--code to run if user isnt on a text entry
end
end
function love.keypressed(key)
local cancel lsglil2.UpdateTextEntryKeyPress(key)
if not cancel then
EGPD2.HandleInputs(key)
-- code to run if user isnt on a text entry
end
end
function love.draw() -- draw
--EGPD2.RenderBackground() -- scrapped, looks disgusting
EGPD2.StartTranslatedStuff()
EGPD2.RenderImageBase()
EGPD2.RenderObjects()
EGPD2.EndTranslatedStuff()
EGPD2.RenderBorderElements()
EGPD2.RenderInformation()
lsglil2.DrawElements()
end
function love.mousepressed(x, y, button, istouch, presses)
if EGPD2.CanInteract() then
EGPD2.HandleMouse(x, y, button)
end
end
function love.mousemoved(x, y, dx, dy)
EGPD2.HandleMoving(x, y, dx, dy)
end
function love.wheelmoved(x, y)
EGPD2.HandleScrolling(x, y)
end