aboutsummaryrefslogtreecommitdiff
path: root/src/sysapp/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysapp/login')
-rw-r--r--src/sysapp/login/main.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sysapp/login/main.lua b/src/sysapp/login/main.lua
index de258b9..6be064d 100644
--- a/src/sysapp/login/main.lua
+++ b/src/sysapp/login/main.lua
@@ -6,6 +6,8 @@ local draw = require 'lx.draw'
local gui = require 'lx.gui'
local mainloop = require 'lx.mainloop'
+local tk = require 'lx.tk'
+
print("Hello, world!")
gui.open()
@@ -17,8 +19,13 @@ for x = 0, 255, 16 do
end
end
+local f = draw.load_image('root:/logo.png')
+local img = tk.image_widget(f)
+tk.init(gui, img)
+
gui.show_cursor()
+--[[
local fnt = draw.load_ttf_font('sys:/fonts/vera.ttf')
if fnt == nil then
print("Could not load vera.ttf!")
@@ -32,7 +39,7 @@ gui.on_mouse_down = function (lb, rb, mb)
gui.hide_cursor()
gui.surface:write(gui.mouse_x, gui.mouse_y, string.format("Click at %d, %d", gui.mouse_x, gui.mouse_y), fnt, 16, gui.surface:rgb(0, 0, 255))
txt_x = gui.mouse_x
- txt_y = gui.mouse_y + fnt:text_height(" ")
+ txt_y = gui.mouse_y + 16
gui.show_cursor()
end
end
@@ -40,9 +47,10 @@ end
gui.on_text_input = function(chr)
gui.hide_cursor()
gui.surface:write(txt_x, txt_y, chr, fnt, 16, gui.surface:rgb(0, 0, 255))
- txt_x = txt_x + fnt:text_width(chr)
+ txt_x = txt_x + fnt:text_width(chr, 16)
gui.show_cursor()
end
+--]]
mainloop.run()