UHQQZ6T4AAORLMRQIPHW6DHKTMLS6P45E44RCU5K654IO7PRFMTQC on.keychord_press = function(chord, key)if Move then return endif Manifest_navigator.reload thenload_manifest()endif chord == 'C-=' then-- zoom inViewport.zoom = Viewport.zoom+0.1A()elseif chord == 'C--' then-- zoom outViewport.zoom = Viewport.zoom-0.1A()elseif chord == 'C-0' then-- reset zoomViewport.zoom = 1.0A()elseif chord == 'C-q' thenlive.send_to_app('QUIT')elseif Manifest_navigator.show thenkeychord_press_on_manifest_navigator(chord, key)elseif chord == 'C-n' thennew_definition()elseif chord == 'C-l' thenManifest_navigator.show = trueManifest_navigator.for_delete = falseelseif chord == 'C-d' thenManifest_navigator.show = trueManifest_navigator.for_delete = trueelseif Cursor_node thenlocal old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)edit.keychord_press(Cursor_node.editor, chord, key)if not eq(Cursor_node.editor.screen_top1, old_top) thenViewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)endlocal definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)A(--[[preserve screen_top of cursor node]] true)elseif chord == 'up' thenViewport.y = Viewport.y - scale(20)B()elseif chord == 'down' thenViewport.y = Viewport.y + scale(20)B()elseif chord == 'left' thenViewport.x = Viewport.x - scale(50)B()elseif chord == 'right' thenViewport.x = Viewport.x + scale(50)B()elseif chord == 'pageup' thenViewport.y = Viewport.y - App.screen.height/Viewport.zoomB()elseif chord == 'S-up' thenViewport.y = Viewport.y - App.screen.height/Viewport.zoomB()elseif chord == 'pagedown' thenViewport.y = Viewport.y + App.screen.height/Viewport.zoomB()elseif chord == 'S-down' thenViewport.y = Viewport.y + App.screen.height/Viewport.zoomB()elseif chord == 'S-left' thenViewport.x = Viewport.x - App.screen.width/Viewport.zoomB()elseif chord == 'S-right' thenViewport.x = Viewport.x + App.screen.width/Viewport.zoomB()endendend
{"Manifest":494,"maybe_update_key_in_definitions":529,"on_handle":547,"scale":7,"on_text":539,"on.mouse_press":556,"box_height":345,"on.initialize":506,"compute_layout":385,"vx":545,"line_height":365,"on.code_change":306,"on":1,"on.key_release":552,"sy":469,"Surface":422,"A":507,"on.text_input":521,"B":379,"Manifest_navigator":495,"mouse_cursor":558,"Viewport":567,"copy_shape":396,"update_editor_box":479,"vy":546,"set_mouse_cursor":562,"add_thick_line":400,"draw_ticks":566,"Cursor_node":172,"on.draw":565,"load_manifest":496,"on.mouse_release":554,"get_manifest":497,"on.update":561,"Mouse_cursor":559,"on.keychord_press":568,"parent":567,"Page":475,"Definitions":503,"new_definition":504,"y_of_schema1":364,"sx":544,"schema1_of_y":467,"font":353,"initialize_editor":450}
{"draw_ticks":566,"on_text":539,"Viewport":567,"sx":544,"vx":545,"update_editor_box":479,"on.mouse_press":556,"font":353,"initialize_editor":450,"parent":566,"Manifest":494,"schema1_of_y":467,"Page":475,"on.text_input":521,"mouse_cursor":558,"y_of_schema1":364,"Mouse_cursor":559,"set_mouse_cursor":562,"load_manifest":496,"get_manifest":497,"on.initialize":506,"on.mouse_release":554,"on.keychord_press":553,"on":1,"Surface":422,"Definitions":503,"sy":469,"new_definition":504,"scale":7,"box_height":345,"vy":546,"compute_layout":385,"A":507,"Manifest_navigator":495,"on.code_change":306,"on.draw":565,"on.key_release":552,"line_height":365,"add_thick_line":400,"Cursor_node":172,"copy_shape":396,"on_handle":547,"maybe_update_key_in_definitions":529,"B":379,"on.update":561}
Viewport = {x=-50, y=-50, w=800,h=600, zoom=1.0}
{"draw_ticks":566,"on_text":539,"Viewport":505,"sx":544,"vx":545,"update_editor_box":479,"on.mouse_press":556,"font":353,"initialize_editor":450,"parent":565,"Manifest":494,"schema1_of_y":467,"Page":475,"on.text_input":521,"mouse_cursor":558,"y_of_schema1":364,"Mouse_cursor":559,"set_mouse_cursor":562,"load_manifest":496,"get_manifest":497,"on.initialize":506,"on.mouse_release":554,"on.keychord_press":553,"on":1,"Surface":422,"Definitions":503,"sy":469,"new_definition":504,"scale":7,"box_height":345,"vy":546,"compute_layout":385,"A":507,"Manifest_navigator":495,"on.code_change":306,"on.draw":565,"on.key_release":552,"line_height":365,"add_thick_line":400,"Cursor_node":172,"copy_shape":396,"on_handle":547,"maybe_update_key_in_definitions":529,"B":379,"on.update":561}
draw_ticks = function()-- x axislocal lo, hi = Viewport.x, sx(App.screen.width)print('viewport width scale is', hi-lo, lo, hi)-- y axislocal lo, hi = Viewport.y, sy(App.screen.height)print('viewport height scale is', hi-lo, lo, hi)end
on.draw = function()love.graphics.setColor(1,0,0)for _,obj in ipairs(Surface) dolove.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)if obj.type == 'rectangle' thenlove.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))elseif obj.type == 'line' thenlove.graphics.line(unpack(obj.zdata))elseif obj.type == 'circle' thenlove.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))elseif obj.type == 'arc' thenlove.graphics.arc(obj.drawmode or 'line', obj.arctype or 'open', vx(obj.x), vy(obj.y), scale(obj.radius), obj.angle1, obj.angle2, obj.segments)elseif obj.type == 'ellipse' thenlove.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))elseif obj.type == 'bezier' thenlove.graphics.line(unpack(obj.zdata))elseif obj.type == 'text' thenif obj.w == nil thenlove.graphics.draw(obj.text, vx(obj.x), vy(obj.y))elselove.graphics.setColor(0.5,0.5,0.5)love.graphics.rectangle('fill', vx(obj.x),vy(obj.y-30), scale(obj.w/2-5), scale(20))edit.draw(obj.editor, obj.fg, not obj.show_cursor)endendenddraw_ticks()draw_menu_bar()end
{"draw_ticks":564,"on_text":539,"Viewport":505,"sx":544,"vx":545,"update_editor_box":479,"on.mouse_press":556,"font":353,"initialize_editor":450,"parent":564,"Manifest":494,"schema1_of_y":467,"Page":475,"on.text_input":521,"mouse_cursor":558,"y_of_schema1":364,"Mouse_cursor":559,"set_mouse_cursor":562,"load_manifest":496,"get_manifest":497,"on.initialize":506,"on.mouse_release":554,"on.keychord_press":553,"on":1,"Surface":422,"Definitions":503,"sy":469,"new_definition":504,"scale":7,"box_height":345,"vy":546,"compute_layout":385,"A":507,"Manifest_navigator":495,"on.code_change":306,"on.draw":565,"on.key_release":552,"line_height":365,"add_thick_line":400,"Cursor_node":172,"copy_shape":396,"on_handle":547,"maybe_update_key_in_definitions":529,"B":379,"on.update":561}
{"draw_ticks":564,"on_text":539,"Viewport":505,"sx":544,"vx":545,"update_editor_box":479,"on.mouse_press":556,"font":353,"initialize_editor":450,"parent":563,"Manifest":494,"schema1_of_y":467,"Page":475,"on.text_input":521,"mouse_cursor":558,"y_of_schema1":364,"Mouse_cursor":559,"set_mouse_cursor":562,"load_manifest":496,"get_manifest":497,"on.initialize":506,"on.mouse_release":554,"on.keychord_press":553,"on":1,"Surface":422,"Definitions":503,"sy":469,"new_definition":504,"scale":7,"box_height":345,"vy":546,"compute_layout":385,"A":507,"Manifest_navigator":495,"on.code_change":306,"on.draw":538,"on.key_release":552,"line_height":365,"add_thick_line":400,"Cursor_node":172,"copy_shape":396,"on_handle":547,"maybe_update_key_in_definitions":529,"B":379,"on.update":561}
draw_ticks = function()-- x axislocal lo, hi = Viewport.x, sx(App.screen.width)print('viewport width scale is', hi-lo)-- y axislocal lo, hi = Viewport.y, sy(App.screen.height)print('viewport height scale is', hi-lo)end
{"draw_ticks":563,"on_text":539,"Viewport":505,"sx":544,"vx":545,"update_editor_box":479,"on.mouse_press":556,"font":353,"initialize_editor":450,"parent":562,"Manifest":494,"schema1_of_y":467,"Page":475,"on.text_input":521,"mouse_cursor":558,"y_of_schema1":364,"Mouse_cursor":559,"set_mouse_cursor":562,"load_manifest":496,"get_manifest":497,"on.initialize":506,"on.mouse_release":554,"on.keychord_press":553,"on":1,"Surface":422,"Definitions":503,"sy":469,"new_definition":504,"scale":7,"box_height":345,"vy":546,"compute_layout":385,"A":507,"Manifest_navigator":495,"on.code_change":306,"on.draw":538,"on.key_release":552,"line_height":365,"add_thick_line":400,"Cursor_node":172,"copy_shape":396,"on_handle":547,"maybe_update_key_in_definitions":529,"B":379,"on.update":561}
draw_ticks = function()-- x axislocal lo, hi = Viewport.x, Viewport.x+App.screen.width/Viewport.zoomend