POB4XJEYI3J32C4Q3OJCY26AFGCNQLQZD4B5BUXXWBUGHHXD6BDQC
GE7YT55JWPF5YGO2UPE6JDDBUKCP27CPHAE75XQ77IJWGFM2AJIQC
KPWYBO552F3AJBCX5QOOBRH5OT677YYKLJMA3OIKDQYPNF2SFZMQC
5CEQPLOCMBWBLWWUN2NDJ32RIV6YDE3HM42LX42XP7ZWAKJJZHXQC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
T7T66GEUFLP3YHZN5UNOVBYK33KISJWJQKCPZU6MQH45KSU7CZZQC
QUEMVUYEJDMX2YR3FKTSEZ2IUSTSW6H7GV7XQ3A3BDIITALYH7KAC
J62CVGNGJZSN7TMTE2SG53O47YG4SJGJFTUFKVOZY4TM4KAC566QC
ZUXG2RU4WF5WF7EYU2XQJ6AERLJLOMGDEXWRMGWHT5DR3B7X7MWQC
BBJCF6PTCLGQJ37LINJKTG3BBFYTLB6AV3NFJOEWNZYONQYQXU2QC
UJ2RZ43LIVRIBWIXHXMLIQIQTL32VVEN4CVU7PEBTITQFPO4EXXQC
-- Compute screen_top1 in viewport coordinates because the editor's font takes scaling into account.
if vy(node.y) > 0 then
node.editor.screen_top1, node.editor.top = schema1_of_y(node.editor, -vy(node.y))
end
if node.editor.font_height ~= scale(20) then
edit.update_font_settings(node.editor, scale(20))
node.editor.width = node.editor.right - node.editor.left
end
edit.update_font_settings(node.editor, scale(20))
Text.redraw_all(node.editor)
end
node.editor.left = math.floor(vx(node.x))
node.editor.right = math.ceil(vx(node.x+node.w))
if not preserve_screen_top_of_cursor_node or node ~= Cursor_node then
node.editor.screen_top1.line = 1
node.editor.screen_top1.pos = 1
end
node.editor.top = vy(node.y)
else
love.graphics.setFont(love.graphics.newFont(scale(20))) -- editor objects implicitly depend on current font
end
-- translate Page to Surface
while #Surface > 3 do table.remove(Surface) end -- HACK
local red = false
for x=-1000,2000,300 do
for y=-10000,10000,200 do
add_thick_line({type='line', data={x,y, x+200,y+200, x,y+400}, r=red and 1 or 0,g=red and 0 or 0.5,b=0}, 10)
red = not red
end
end
compute_layout(Page, Page.x,Page.y, Surface, preserve_screen_top_of_cursor_node)
compute_layout(Page2, Page2.x,Page2.y, Surface, preserve_screen_top_of_cursor_node)
-- continue the pipeline
B(preserve_screen_top_of_cursor_node)
-- TODO: ugly that we're manipulating editor objects twice
-- position cursor in node
return
-- pan surface
Pan = {x=Viewport.x+x/Viewport.zoom,y=Viewport.y+y/Viewport.zoom}
end
end
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)