lualoader: Tweak positioning and fix an off-by-one
- All of our default positions were offset from forth - Our menu frame size was smaller than in forth - Logo/brand drawing had an off-by-one, drawing one column lower on the screen than they should have been. - While here, switch a print() to printc() as it's expected that logos may contain color and other escpae sequences that we'll need to honor.
This commit is contained in:
parent
54fc03834a
commit
1495c98f0b
@ -205,9 +205,9 @@ drawer.menu_name_handlers = {
|
||||
}
|
||||
|
||||
drawer.brand_position = {x = 2, y = 1}
|
||||
drawer.logo_position = {x = 46, y = 1}
|
||||
drawer.menu_position = {x = 6, y = 11}
|
||||
drawer.box_pos_dim = {x = 3, y = 10, w = 41, h = 11}
|
||||
drawer.logo_position = {x = 46, y = 4}
|
||||
drawer.menu_position = {x = 5, y = 10}
|
||||
drawer.frame_size = {w = 42, h = 13}
|
||||
|
||||
drawer.branddefs = {
|
||||
-- Indexed by valid values for loader_brand in loader.conf(5). Valid
|
||||
@ -337,10 +337,10 @@ function drawer.drawmenu(menudef)
|
||||
end
|
||||
|
||||
function drawer.drawbox()
|
||||
local x = drawer.box_pos_dim.x
|
||||
local y = drawer.box_pos_dim.y
|
||||
local w = drawer.box_pos_dim.w
|
||||
local h = drawer.box_pos_dim.h
|
||||
local x = drawer.menu_position.x - 3
|
||||
local y = drawer.menu_position.y - 1
|
||||
local w = drawer.frame_size.w
|
||||
local h = drawer.frame_size.h
|
||||
|
||||
local framestyle = loader.getenv("loader_menu_frame") or "double"
|
||||
local framespec = drawer.frame_styles[framestyle]
|
||||
@ -404,8 +404,8 @@ end
|
||||
|
||||
function drawer.draw(x, y, logo)
|
||||
for i = 1, #logo do
|
||||
screen.setcursor(x, y + i)
|
||||
print(logo[i])
|
||||
screen.setcursor(x, y + i - 1)
|
||||
printc(logo[i])
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -420,8 +420,8 @@ function menu.autoboot()
|
||||
end
|
||||
ab = tonumber(ab) or 10
|
||||
|
||||
local x = loader.getenv("loader_menu_timeout_x") or 5
|
||||
local y = loader.getenv("loader_menu_timeout_y") or 22
|
||||
local x = loader.getenv("loader_menu_timeout_x") or 4
|
||||
local y = loader.getenv("loader_menu_timeout_y") or 23
|
||||
|
||||
local endtime = loader.time() + ab
|
||||
local time
|
||||
|
Loading…
Reference in New Issue
Block a user