vectorator/draw_logic.lua
2023-06-06 21:16:52 -04:00

65 lines
1.3 KiB
Lua
Executable File

--draw logic
frame_color = 5
function _draw()
cls()
-- top
draw_top_ui()
-- bottom
draw_bottom_ui()
tab_x = 1
if (current_pane==1) tab_x=10
if (current_pane==2) tab_x=46
if (current_pane==3) tab_x=86
spr(48, tab_x, 7)
c_pane_draw()
r_pane_draw()
l_pane_draw()
end
function draw_top_ui()
rectfill(0,0,128,14, frame_color)
if current_pane == 2 then
color(6)
print(get_current_tooltip_text())
else
if (holding == nil) then
color(6)
print("the empty hand is strong")
else
color(6)
print("change the world")
end
if holding ~= nil then
bank = holding.address[1]
line_no = holding.address[2]
color(10)
print(bank.."::"..line_no.." "..join(holding.operation, " "))
elseif under ~= nil then
bank = under.address[1]
line_no = under.address[2]
color(6)
print(bank.."::"..line_no.." "..join(under.operation, " "))
end
end
end
function draw_bottom_ui()
rectfill(0,116,128,128, frame_color)
t="🅾️ to grab ❎+⬅️/➡️ for mode"
if current_pane == 2 then
t="🅾️ to use ❎+⬅️/➡️ for mode"
elseif current_pane == 3 then
t="🅾️ to grab ❎+⬅️/➡️ for mode\n"
t=t.."❎+⬆️ to add ❎+⬇️ to delete"
end
print(t, 0, 117, 6)
end