SIJ5I4NZN5LFATNT5QIWUK75Z5W6P4B4AKNPVYFQ7IVRMOCVWR3AC
VQYLKEGDS4KNR3LOKUZUK435L77IT4LE6S356QTN5N6POTCYMJRAC
6MQCFHXML2SDC6NMWJFOPQFQTMRUVKNNUBYZQ3HBSJQZOWA6XD2QC
X2YWEIZSRESZM4LE5JNEXIRP6YIBPGTYRJLXLUI45FS2QBPMFNAQC
YCPA257VEFZTLAMDGZ7ZJTJOFHM36ID3O7OGCBYPAMIA4QAOFWVAC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
5MEJ7XNHNFG2BIX3TFU6PDJHSJOS2Z45L25QAZKFGRW7ZNOFEUKAC
RK2ASPN7A55RCEG2YRFZLFXNPSME2VKBE2ZXO257DYZPS5TPXC5QC
overflowable_button = function(name, x, y, r, onpress1)
local w = App.width(name)+10
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)
if Overflow_button then
-- overflow
if not Show_overflow then
return x, y
else
y = y2
end
end
button(Global_state, name, {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(name, p.x+5,p.y+2)
end,
onpress1 = onpress1,
})
if Overflow_button then
return x, y+Line_height
else
return x+w+10, y
end
end
local w = App.width('delete')+10
local x2, y2 = maybe_draw_overflow_button(x, y, w, r, --[[final button]] true)
if Overflow_button then
-- overflow
if Show_overflow then
y = y2
else
return x, y
end
end
button(Global_state, 'delete', {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('delete', p.x+5,p.y+2)
end,
onpress1 = function()
return overflowable_button('delete', x, y, r,
function()
local w = App.width('clear')+10
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)
if Overflow_button then
-- overflow
if not Show_overflow then
return x, y
else
y = y2
end
end
button(Global_state, 'clear', {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('clear', p.x+5,p.y+2)
end,
onpress1 = clear_pane,
})
if Overflow_button then
return x, y+Line_height
else
return x+w+10, y
end
return overflowable_button('clear', x, y, r,
clear_pane)
local w = App.width('paste')+10
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)
if Overflow_button then
-- overflow
if not Show_overflow then
return x, y
else
y = y2
end
end
button(Global_state, 'paste', {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('paste', p.x+5,p.y+2)
end,
onpress1 = function()
return overflowable_button('paste', x, y, r,
function()
local w = App.width('copy')+10
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)
if Overflow_button then
-- overflow
if not Show_overflow then
return x, y
else
y = y2
end
end
button(Global_state, 'copy', {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('copy', p.x+5,p.y+2)
end,
onpress1 = function()
return overflowable_button('copy', x, y, r,
function()
local w = App.width('hide')+10
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)
if Overflow_button then
-- overflow
if not Show_overflow then
return x, y
else
y = y2
end
end
button(Global_state, 'hide', {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('hide', p.x+5,p.y+2)
end,
onpress1 = function()
return overflowable_button('hide', x, y, r,
function()
local w = App.width('show')+10
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)
if Overflow_button then
-- overflow
if not Show_overflow then
return x, y
else
y = y2
end
end
button(Global_state, 'show', {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('show', p.x+5,p.y+2)
end,
onpress1 = function()
return overflowable_button('show', x, y, r,
function()
local w = App.width('new')+10
local x2, y2 = maybe_draw_overflow_button(x, y, w, r)
if Overflow_button then
-- overflow
if not Show_overflow then
return x, y
else
y = y2
end
end
button(Global_state, 'new', {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('new', p.x+5,p.y+2)
end,
onpress1 = function()
return overflowable_button('new', x, y, r,
function()