-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lua
63 lines (47 loc) · 1.36 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
58
59
60
61
62
63
--[[
Core File
--]]
micro = require "micro"
BACKGROUNDCOLOR = {25,25,25,255}
function love.load()
love.graphics.setBackgroundColor(BACKGROUNDCOLOR)
love.graphics.setDefaultImageFilter("nearest","nearest")
love.keyboard.setKeyRepeat(.10, .10 )
--micro:load()
--test micro ui
ui = micro.new() --Initialize Micro
--Start creating containers and things
--Main Container
menu = ui:new "main"
--Add test button
local button = menu:button {x = 500, y = 20, outline = true, alias = "regbutton"}
button.action = function() menu:hide() menu:deactivate() ui.states["menu2"]:show() ui.states["menu2"]:activate() end --deactive makes it not interactable, visible, well if yous can sees it, dummy.
--Add test input
local input = menu:input {x = 500, y = 80, maxchars = 20}
--Textbloack
local t = menu:text {output = "Howdy",x = 500, y = 150}
local menu2 = ui:new "menu2"
menu2:hide()
menu2:deactivate()
local button2 = menu2:button {x = 20, y = 20}
end
function love.mousepressed()
ui:mousePressed()
end
function love.mousereleased()
ui:mouseReleased()
end
function love.wheelmoved()
ui:wheelMoved(x,y)
end
function love.keypressed(key, isrepeat)
ui:keyPressed(key)
end
function love.update(dt)
end
function love.draw()
--camera:set()
--display:draw()
--camera:unset()
ui:draw()
end