VUF2SX7BSB6DYFUCIS24UAMIQB4F3FLYSDLS5UXDCKIKPTWH4WWQC
CAKSFMAV5JKI7EYXER2AZTUYYZWPLDSVA3KK767YKPINZOZDUCKQC
VAVXKWZVOFJGWHCWYLTPDKSKKMSJEBKXNKXUW3T6IZAC3HE6HOIQC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
PRE6XPRNICDCHMF7C45A6DRPVT47IPAIWW6Q7AHNGW3D2PBGOPNAC
5RUFNRJOK3PXQKJTPDEN5K5PI67MGB25QUA44WOCCH2O5KHXT45QC
ZM7NOBRMD5HHA35Y4JDC76EOA2RD4KQOQCPURXYKXA6ABMKOJIGQC
VEAVIL4X64VGFCIKDQQTPGS2NSEX77VTSSZIJQMFH65D3EQMX7UAC
Z5M23NTKKGEACSQJT27DRNS7NEK6OSLR2IOWVAH2C2PRAIU46BIQC
new_pane = function()
local result = {}
result.editor_state = edit.initialize_state(
Menu_bottom + 20, -- top
Safe_height/2-Line_height, -- bottom
Menu_left + 50 + Line_number_padding, -- left
math.min(100+30*App.width('m'), Safe_width*2/3), -- right
love.graphics.getFont():getHeight(), Line_height)
Text.redraw_all(result.editor_state)
result.output_editor_state = edit.initialize_state(
result.editor_state.bottom+5+10+5, -- top
nil, -- buttom
result.editor_state.left, result.editor_state.right,
love.graphics.getFont():getHeight(), Line_height)
Text.redraw_all(result.output_editor_state)
return result
end
Panes = {}
Current_pane_index = 0
button(Global_state, 'left', {x=0, y=Menu_bottom, w=Menu_left+30, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},
icon = function(p)
App.color{r=0.4,g=0.4,b=0.4}
love.graphics.polygon('fill', Menu_left+5, App.screen.height/2, Menu_left+25, App.screen.height/2-10, Menu_left+25, App.screen.height/2+10)
end,
})
if Current_pane_index > 1 then
button(Global_state, 'left', {x=0, y=Menu_bottom, w=Menu_left+30, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},
icon = function(p)
App.color{r=0.4,g=0.4,b=0.4}
love.graphics.polygon('fill', Menu_left+5, App.screen.height/2, Menu_left+25, App.screen.height/2-10, Menu_left+25, App.screen.height/2+10)
end,
onpress1 = function()
Current_pane_index = Current_pane_index-1
Current_pane = Panes[Current_pane_index]
end,
})
end
button(Global_state, 'left', {x=r-30, y=Menu_bottom, w=100, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},
icon = function(p)
App.color{r=0.4,g=0.4,b=0.4}
love.graphics.polygon('fill', r-25, App.screen.height/2-10, r-25, App.screen.height/2+10, r-5, App.screen.height/2)
end,
})
if Current_pane_index == #Panes then
button(Global_state, 'right', {x=r-30, y=Menu_bottom, w=100, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},
icon = function(p)
App.color{r=0.4,g=0.4,b=0.4}
love.graphics.print('+', r-25, App.screen.height/2-10)
end,
onpress1 = function()
table.insert(Panes, new_pane())
Current_pane_index = Current_pane_index+1
Current_pane = Panes[Current_pane_index]
end,
})
else
button(Global_state, 'right', {x=r-30, y=Menu_bottom, w=100, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},
icon = function(p)
App.color{r=0.4,g=0.4,b=0.4}
love.graphics.polygon('fill', r-25, App.screen.height/2-10, r-25, App.screen.height/2+10, r-5, App.screen.height/2)
end,
onpress1 = function()
Current_pane_index = Current_pane_index+1
Current_pane = Panes[Current_pane_index]
end,
})
end
Current_pane.editor_state = edit.initialize_state(
Menu_bottom + 20, -- top
Safe_height/2-Line_height, -- bottom
Menu_left + 50 + Line_number_padding, -- left
math.min(100+30*App.width('m'), Safe_width*2/3), -- right
love.graphics.getFont():getHeight(), Line_height)
Text.redraw_all(Current_pane.editor_state)
Current_pane.output_editor_state = edit.initialize_state(
Current_pane.editor_state.bottom+5+10+5, -- top
nil, -- buttom
Current_pane.editor_state.left, Current_pane.editor_state.right,
love.graphics.getFont():getHeight(), Line_height)
Text.redraw_all(Current_pane.output_editor_state)
table.insert(Panes, new_pane())
Current_pane_index = 1
Current_pane = Panes[Current_pane_index]