NJAMSN5EB7T7GLBYBP32OLNTCEEYYAAJCEPQH37HR3GFMPXWN6GAC CRM444VKLQV76NAW4P6WTWEWBBTRZ6PTURNXSFX2X6ZJOQLGR6LAC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC ZXQ2MMPAOIA4TN3TWMFPXZUL7NUE3EWXLV2JHBQXEINE7WCKFSIQC 7TQAF4BYIK75EEYCCK7VEUSZHNCWMWIA3HZGQKIILYESUZ5ZZRVQC 7KX3WBFEXMIHNKWNF4NUOBW5HO3PEL3ZEFFMTAXFOQG6V7BYXZ3AC FBDRJ53NJ5BWDQGU2GWZ6NEYHKCCRD7RODMIG7QQZBRFUB4HR7OAC draw_file_picker = function()local font = love.graphics.getFont()local y, x = Margin_top, Margin_leftfor _,f in ipairs(Files) dolocal w = font:getWidth(f)if x + w > App.screen.width theny = y + font:getHeight()*font:getLineHeight() + 10x = Margin_leftendbutton(Global_state, f, {x=x-5, y=y-2, w=w+10, h=font:getHeight()*font:getLineHeight()+4,color={0.7,0.7,1.0},icon=function(p)App.color{r=0.4,g=0.4,b=0.7}love.graphics.rectangle('line', p.x,p.y, p.w,p.h, 5,5)App.color{r=0,g=0,b=0}love.graphics.print(f, x,y)end,onpress1 = function()open_thread(f)end,})x = x + App.width(f) + 15endend
-- do nothing; everything happens on release
-- we're rendering the file picker-- check for any button clicksfor _,button in ipairs(Global_state.file_picker) do-- do nothing; everything happens on release-- (to avoid changing the surface between press and release)if in_rect(button, x,y) thenreturnendend-- no button clicked; pan surfacePan = {x=Viewport.x+x/Viewport.zoom,y=Viewport.y+y/Viewport.zoom}