Now we can see new definitions being created.
AKQBXWCVTZ5LEG76QW54B7MHXYFA7GD2Y2GSEN7RUXO5CHMYCZKAC
on.mouse_press = function(x,y, mouse_button)
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
local node = on_text(x,y)
if node then
-- position cursor in node
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
return
end
local node = on_handle(x,y)
if node then
-- move node
Move = {xoff=App.mouse_x()-vx(node.x), yoff=App.mouse_y()-vy(node.y), node=node}
return
end
-- pan surface
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":547,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":555,"Definitions":503,"Manifest_navigator":495,"B":379,"on.key_release":552,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":553,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":555,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":554,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":556,"on.draw":538}
on.update = function(dt)
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-Move.xoff
Move.node.y = sy(App.mouse_y())-Move.yoff
A()
return
end
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":547,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":555,"Definitions":503,"Manifest_navigator":495,"B":379,"on.key_release":552,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":553,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":554,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":554,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":551,"on.draw":538}
on.mouse_release = function(x,y, mouse_button)
if Pan then
Pan = nil
elseif Move then
Move = nil
elseif Cursor_node then
Cursor_node.show_cursor = true
edit.mouse_release(Cursor_node.editor, x,y, mouse_button)
end
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":547,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"on.key_release":552,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":553,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":553,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":554,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":551,"on.draw":538}
on.keychord_press = function(chord, key)
if Move then return end
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-n' then
new_definition()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local 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) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
local 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)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":547,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"on.key_release":552,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":553,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":552,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":548,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":551,"on.draw":538}
on.key_release = function(key)
if Move then return end
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":547,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"on.key_release":552,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":549,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":551,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":548,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":551,"on.draw":538}
on.mouse_press = function(x,y, mouse_button)
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
local node = on_text(x,y)
if node then
-- position cursor in node
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
return
end
local node = on_handle(x,y)
if node then
-- move node
love.graphics.rectangle('fill', vx(obj.x),vy(obj.y-30), scale(obj.w/2-5), scale(20))
Move = {xoff=App.mouse_x()-vx(node.x), yoff=App.mouse_y()-vy(node.y), node=node}
return
end
-- pan surface
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":547,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"on.key_release":550,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":549,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":550,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":548,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":551,"on.draw":538}
on.key_release = function(key)
if Move_node then return end
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":547,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"on.key_release":550,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":549,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":549,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":548,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":542,"on.draw":538}
on.keychord_press = function(chord, key)
if Move_node then return end
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-n' then
new_definition()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local 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) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
local 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)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":547,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":549,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":548,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":548,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":542,"on.draw":538}
on.mouse_release = function(x,y, mouse_button)
if Pan then
Pan = nil
elseif Move_node then
Move_node = nil
elseif Cursor_node then
Cursor_node.show_cursor = true
edit.mouse_release(Cursor_node.editor, x,y, mouse_button)
end
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":547,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":547,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":548,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":542,"on.draw":538}
on_handle = function(x,y)
for _,node in ipairs(Surface) do
if node.type == 'text' then
if x >= vx(node.x) and node.w and x < vx(node.x + node.w/2-5) then
if y >= vy(node.y-30) and node.h and y < vy(node.y-10) then
return node
end
end
end
end
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":547,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":546,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":542,"on.draw":538}
vy = function(y)
-- turn surface coordinates into viewport coordinates
return Menu_bar_height + scale(y-Viewport.y)
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":546,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":545,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":542,"on.draw":538}
vx = function(sx)
-- turn surface coordinates into viewport coordinates
return scale(sx-Viewport.x)
end
{"Surface":422,"initialize_editor":450,"vx":545,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":544,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":542,"on.draw":538}
sx = function(vx)
-- turn viewport coordinates into surface coordinates
return vx/Viewport.zoom + Viewport.x
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"sx":544,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":543,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":542,"on.draw":538}
on.update = function(dt)
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move_node then
Move_node.x = sx(App.mouse_x())
Move_node.y = sy(App.mouse_y())
A()
return
end
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":543,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":542,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":542,"on.draw":538}
on.mouse_press = function(x,y, mouse_button)
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
local node = on_text(x,y)
if node then
-- position cursor in node
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
return
end
local node = on_handle(x,y)
if node then
-- move node
Move_node = node
return
end
-- pan surface
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":541,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":542,"on.draw":538}
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"on_text":539,"line_height":365,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":540,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":540,"on.draw":538}
on.mouse_press = function(x,y, mouse_button)
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
local node = on_text(x,y)
if node then
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
else
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"on_text":539,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":539,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":540,"on.draw":538}
on_text = function(x,y)
for _,node in ipairs(Surface) do
if node.type == 'text' then
if x >= vx(node.x) and node.w and x < vx(node.x + node.w) then
if y >= vy(node.y) and node.h and y < vy(node.y + node.h) then
return node
end
end
end
end
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"on_text":539,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":538,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":179,"on.draw":538}
on.draw = function()
love.graphics.setColor(1,0,0)
for _,obj in ipairs(Surface) do
love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)
if obj.type == 'rectangle' then
love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))
elseif obj.type == 'line' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'circle' then
love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))
elseif obj.type == 'arc' then
love.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' then
love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))
elseif obj.type == 'bezier' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'text' then
if obj.w == nil then
love.graphics.draw(obj.text, vx(obj.x), vy(obj.y))
else
love.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)
end
end
end
draw_menu_bar()
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":537,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":179,"on.draw":538}
on.draw = function()
love.graphics.setColor(1,0,0)
for _,obj in ipairs(Surface) do
love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)
if obj.type == 'rectangle' then
love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))
elseif obj.type == 'line' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'circle' then
love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))
elseif obj.type == 'arc' then
love.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' then
love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))
elseif obj.type == 'bezier' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'text' then
if obj.w == nil then
love.graphics.draw(obj.text, vx(obj.x), vy(obj.y))
else
love.graphics.setColor(0.5,0.5,0.5)
love.graphics.rectangle('fill', vx(obj.x),vy(obj.y-30), scale(obj.w/2-5), 20)
edit.draw(obj.editor, obj.fg, not obj.show_cursor)
end
end
end
draw_menu_bar()
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":536,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":179,"on.draw":537}
on.draw = function()
love.graphics.setColor(1,0,0)
for _,obj in ipairs(Surface) do
love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)
if obj.type == 'rectangle' then
love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))
elseif obj.type == 'line' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'circle' then
love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))
elseif obj.type == 'arc' then
love.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' then
love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))
elseif obj.type == 'bezier' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'text' then
if obj.w == nil then
love.graphics.draw(obj.text, vx(obj.x), vy(obj.y))
else
love.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)
end
end
end
draw_menu_bar()
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":535,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":179,"on.draw":536}
on_handle = function(x,y)
for _,node in ipairs(Surface) do
if node.type == 'text' then
love.graphics.rectangle('fill', vx(obj.x),vy(obj.y-30), obj.w/2-5, 20)
if x >= vx(node.x) and node.w and x < vx(node.x + node.w/2-5) then
if y >= vy(node.y-30) and node.h and y < vy(node.y-10) then
return node
end
end
end
end
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"on_handle":535,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":534,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":179,"on.draw":534}
on.draw = function()
love.graphics.setColor(1,0,0)
for _,obj in ipairs(Surface) do
love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)
if obj.type == 'rectangle' then
love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))
elseif obj.type == 'line' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'circle' then
love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))
elseif obj.type == 'arc' then
love.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' then
love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))
elseif obj.type == 'bezier' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'text' then
if obj.w == nil then
love.graphics.draw(obj.text, vx(obj.x), vy(obj.y))
else
love.graphics.setColor(0.5,0.5,0.5)
love.graphics.rectangle('fill', vx(obj.x),vy(obj.y-30), obj.w/2-5, 20)
edit.draw(obj.editor, obj.fg, not obj.show_cursor)
end
end
end
draw_menu_bar()
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":533,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":179,"on.draw":534}
on.draw = function()
love.graphics.setColor(1,0,0)
for _,obj in ipairs(Surface) do
love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)
if obj.type == 'rectangle' then
love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))
elseif obj.type == 'line' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'circle' then
love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))
elseif obj.type == 'arc' then
love.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' then
love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))
elseif obj.type == 'bezier' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'text' then
if obj.w == nil then
love.graphics.draw(obj.text, vx(obj.x), vy(obj.y))
else
love.graphics.setColor(0.5,0.5,0.5)
love.graphics.rectangle('fill', vx(obj.x),vy(obj.y-30), obj.w, 20)
edit.draw(obj.editor, obj.fg, not obj.show_cursor)
end
end
end
draw_menu_bar()
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":532,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":179,"on.draw":533}
on.draw = function()
love.graphics.setColor(1,0,0)
for _,obj in ipairs(Surface) do
love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)
if obj.type == 'rectangle' then
love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))
elseif obj.type == 'line' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'circle' then
love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))
elseif obj.type == 'arc' then
love.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' then
love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))
elseif obj.type == 'bezier' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'text' then
if obj.w == nil then
love.graphics.draw(obj.text, vx(obj.x), vy(obj.y))
else
love.graphics.setColor(0.5,0.5,0.5)
print(obj.x, obj.y)
love.graphics.rectangle('fill', obj.x,obj.y-30, obj.w, 20)
edit.draw(obj.editor, obj.fg, not obj.show_cursor)
end
end
end
draw_menu_bar()
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":531,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":179,"on.draw":532}
on.draw = function()
love.graphics.setColor(1,0,0)
for _,obj in ipairs(Surface) do
love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)
if obj.type == 'rectangle' then
love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))
elseif obj.type == 'line' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'circle' then
love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))
elseif obj.type == 'arc' then
love.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' then
love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))
elseif obj.type == 'bezier' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'text' then
if obj.w == nil then
love.graphics.draw(obj.text, vx(obj.x), vy(obj.y))
else
love.graphics.setColor(0.5,0.5,0.5)
love.graphics.rectangle('fill', obj.x,obj.y-30, obj.w, 20)
edit.draw(obj.editor, obj.fg, not obj.show_cursor)
end
end
end
draw_menu_bar()
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":530,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":179,"on.draw":531}
on.draw = function()
love.graphics.setColor(1,0,0)
for _,obj in ipairs(Surface) do
love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)
if obj.type == 'rectangle' then
love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))
elseif obj.type == 'line' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'circle' then
love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))
elseif obj.type == 'arc' then
love.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' then
love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))
elseif obj.type == 'bezier' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'text' then
if obj.w == nil then
love.graphics.draw(obj.text, vx(obj.x), vy(obj.y))
else
love.graphics.setColor(0.5,0.5,0.5)
love.graphics.rectangle(obj.x,obj.y-30, obj.w, 20)
edit.draw(obj.editor, obj.fg, not obj.show_cursor)
end
end
end
draw_menu_bar()
end
{"Surface":422,"initialize_editor":450,"vx":5,"Viewport":505,"schema1_of_y":467,"load_manifest":496,"get_manifest":497,"y_of_schema1":364,"Cursor_node":172,"scale":7,"on.update":368,"Definitions":503,"Manifest_navigator":495,"B":379,"Page":475,"on":1,"line_height":365,"to_text":180,"update_editor_box":479,"maybe_update_key_in_definitions":529,"new_definition":504,"vy":462,"on.keychord_press":522,"A":507,"box_height":345,"sy":469,"compute_layout":385,"parent":529,"add_thick_line":400,"on.code_change":306,"on.initialize":506,"on.mouse_release":367,"Manifest":494,"font":353,"on.text_input":521,"copy_shape":396,"on.mouse_press":179,"on.draw":530}