2023-11-15 15:04:34 +00:00
|
|
|
draw_menu = function()
|
|
|
|
App.color(Menu_background)
|
|
|
|
love.graphics.rectangle('fill', 0,0, App.screen.width, Menu_bottom)
|
2023-11-22 20:38:16 +00:00
|
|
|
-- settings button on right
|
|
|
|
local w = App.width('settings')
|
|
|
|
local r = Safe_width-w-10-5
|
|
|
|
settings_button(r, w)
|
|
|
|
local x, y = Menu_left+5, Menu_top+5
|
|
|
|
-- main menu on left
|
2023-11-21 07:46:22 +00:00
|
|
|
App.color(White)
|
2023-11-21 06:23:09 +00:00
|
|
|
love.graphics.print(Current_pane_index, x+5, Menu_top+5+2)
|
2023-11-21 07:46:22 +00:00
|
|
|
App.color(Normal_color)
|
2023-11-21 06:23:09 +00:00
|
|
|
x = x+5 + App.width(tostring(Current_pane_index)) + 10
|
2023-11-22 20:38:16 +00:00
|
|
|
x = run_button(x, y, r)
|
|
|
|
x = stop_button(x, y, r)
|
|
|
|
-- assume screen will always be wide enough to print this far without overflow
|
2023-11-23 03:37:30 +00:00
|
|
|
if not Overflow_button then
|
|
|
|
local w = App.width('code')+10
|
|
|
|
local w2 = App.width('>>')+10
|
|
|
|
if x+w+10+w2+10 < r then
|
|
|
|
App.color{r=0.5, g=0.5, b=0.5}
|
|
|
|
love.graphics.print('code', x, y)
|
|
|
|
x = x+w+10
|
|
|
|
end
|
|
|
|
end
|
2023-11-21 06:23:09 +00:00
|
|
|
if Show_code then
|
2023-11-22 20:38:16 +00:00
|
|
|
x, y = hide_code_button(x, y, r)
|
2023-11-21 06:23:09 +00:00
|
|
|
else
|
2023-11-22 20:38:16 +00:00
|
|
|
x, y = show_code_button(x, y, r)
|
2023-11-21 06:23:09 +00:00
|
|
|
end
|
2023-11-22 20:38:16 +00:00
|
|
|
x, y = copy_button(x, y, r)
|
|
|
|
x, y = paste_button(x, y, r)
|
|
|
|
x, y = clear_pane_button(x, y, r)
|
|
|
|
if not Overflow_button then
|
|
|
|
local w = App.width('screen')+10
|
|
|
|
local w2 = App.width('>>')+10
|
|
|
|
if x+w+10+w2+10 < r then
|
|
|
|
App.color{r=0.5, g=0.5, b=0.5}
|
|
|
|
love.graphics.print('screen', x, y)
|
2023-11-23 03:37:30 +00:00
|
|
|
x = x+w+10
|
2023-11-22 20:38:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
x, y = new_pane_button(x, y, r)
|
|
|
|
x, y = delete_pane_button(x, y, r)
|
2023-11-15 17:02:22 +00:00
|
|
|
-- nav buttons along sides
|
2023-11-19 21:37:41 +00:00
|
|
|
if Current_pane_index > 1 then
|
2023-11-21 06:23:09 +00:00
|
|
|
previous_pane_button()
|
2023-11-19 21:37:41 +00:00
|
|
|
end
|
2023-11-21 06:23:09 +00:00
|
|
|
if Current_pane_index < #Panes then
|
|
|
|
next_pane_button(Menu_left + Safe_width)
|
2023-11-19 21:37:41 +00:00
|
|
|
end
|
2023-11-21 10:19:56 +00:00
|
|
|
if Show_settings then
|
|
|
|
draw_settings_menu()
|
|
|
|
end
|
2023-11-15 15:04:34 +00:00
|
|
|
end
|