5MEJ7XNHNFG2BIX3TFU6PDJHSJOS2Z45L25QAZKFGRW7ZNOFEUKAC GAKJROFZ5QBGUKTCAFC53JT5U2NYWVMUZHPYRALERQD7UUXSRHYAC GWLETNMWE7L7P3YBVUFZGBNT3DKHB7IT7ZJ54FUCNYLC72UNCXGAC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC RK2ASPN7A55RCEG2YRFZLFXNPSME2VKBE2ZXO257DYZPS5TPXC5QC I52S4E5FT6E6FHH3QEDJPWO7C6W7AIMAFDP2KQ5FEWXFQX7RY6CAC FPSPT5TMWUJXWC4GYWRXHS3ZB6MBLRJACIRMGE3ACQI75CV72X4AC 5RUFNRJOK3PXQKJTPDEN5K5PI67MGB25QUA44WOCCH2O5KHXT45QC JV27LDDKKY57IEBWGBFPSHEARMOEGLBYGBJD27PDPTNWWYXA4T6AC PRE6XPRNICDCHMF7C45A6DRPVT47IPAIWW6Q7AHNGW3D2PBGOPNAC ZM7NOBRMD5HHA35Y4JDC76EOA2RD4KQOQCPURXYKXA6ABMKOJIGQC VAVXKWZVOFJGWHCWYLTPDKSKKMSJEBKXNKXUW3T6IZAC3HE6HOIQC maybe_draw_overflow_button = function(x, y, w, r, final_button)if Overflow_button then return x, y endlocal after = x+w+10if not final_button thenlocal w2 = App.width('>>')+10-- only draw a button if there's going to be at least space for the overflow button afterwardsafter = after+w2+10endif after > r thenx, y = overflow_button(x, y)Overflow_button = Global_state.button_handlers[#Global_state.button_handlers]return x, yelsereturn x, yendend
overflow_button = function(x, y)local w = App.width('>>')+10button(Global_state, 'overflow', {x=x, y=y, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},icon = function(p)App.color(Normal_color)love.graphics.rectangle('line', p.x,p.y, p.w,p.h, 2,2)love.graphics.print('>>', p.x+5,p.y+2)end,onpress1 = function()Show_overflow = not Show_overflowend,})return x+w+10, y+Line_heightend
Overflow_button = nil -- location and dimensions of the overflow button if it's been drawn this frame
-- True if the overflow menu has been opened and we want to render buttons within it.Show_overflow = false
button(Global_state, 'delete', {x=x, y=Menu_top+5, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
local x2, y2 = maybe_draw_overflow_button(x, y, w, r, --[[final button]] true)if Overflow_button then-- overflowif Show_overflow theny = y2elsereturn x, yendendbutton(Global_state, 'delete', {x=x, y=y, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
button(Global_state, 'clear', {x=x, y=Menu_top+5, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)if Overflow_button then-- overflowif not Show_overflow thenreturn x, yelsey = y2endendbutton(Global_state, 'clear', {x=x, y=y, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
button(Global_state, 'paste', {x=x, y=Menu_top+5, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)if Overflow_button then-- overflowif not Show_overflow thenreturn x, yelsey = y2endendbutton(Global_state, 'paste', {x=x, y=y, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
button(Global_state, 'copy', {x=x, y=Menu_top+5, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)if Overflow_button then-- overflowif not Show_overflow thenreturn x, yendendbutton(Global_state, 'copy', {x=x, y=y, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
button(Global_state, 'hide', {x=x, y=Menu_top+5, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)if Overflow_button then-- overflowif not Show_overflow thenreturn x, yendendbutton(Global_state, 'hide', {x=x, y=y, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
button(Global_state, 'new', {x=x, y=Menu_top+5, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)if Overflow_button then-- overflowif not Show_overflow thenreturn x, yelsey = y2endendbutton(Global_state, 'new', {x=x, y=y, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
x = copy_button(x)x = paste_button(x)x = clear_pane_button(x)App.color{r=0.5, g=0.5, b=0.5}love.graphics.print('screen', x, Menu_top+5)x = x+App.width('screen')+10x = new_pane_button(x)x = delete_pane_button(x)-- settings button on rightlocal w = App.width('settings')settings_button(Safe_width-w-10-5, w)
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 thenlocal w = App.width('screen')+10local w2 = App.width('>>')+10if x+w+10+w2+10 < r thenApp.color{r=0.5, g=0.5, b=0.5}love.graphics.print('screen', x, y)x = x+App.width('screen')+10endendx, y = new_pane_button(x, y, r)x, y = delete_pane_button(x, y, r)