Editor state initialization now depends on window dimensions, so we have to more carefully orchestrate startup.
UHB4GARJI5AB5UCDCZRFSCJNXGJSLU5DYGUGX5ITYEXI7Q43Z4CAC
HPVT467W763S6XQWS5Q47BAK4GMVY57LDXS7LSTFM23Y5XGKZMMQC
APYPFFS3G6TDEUMIHQGMDBJNRNDTCNTPKI5M2AFACJ73P725XQRQC
DLQAEAC76KLM3KZXQ2C5DASP4IBS64GR6L7QYEP67CNXJ6LRL7LQC
7JH2ZT3FCW4WX52IJFSLGRVZWQQVYJXULSQM2BM4BJUZWG3IVGKAC
PJEQCTBL2ZX5Q7NJQ3KCWSHHBV2QWGYS5NVMRDNK5LOOIIRRIPHAC
5ZA3BRNYWKSGEBJ4JLA4UBC3LJPT5JBWYCU7PQYRSGX6MJMEWDIQC
P4376EXKQXGN6KUOKIZDSGN65J5C33XVX3RDXHYVOOTG7P2ISZWQC
QCPXQ2E3USF3Z6R6WJ2JKHTRMPKA6QWXFKKRMLXA3MXABJEL543AC
3HVBAZPADERJZTVHKZWOBNGDWYPJKPOEDZCCI6TLAFU4BFEKFOKAC
DSLD74DK3P6J2VAFCYF5BGTHZ637QTW3PDHOUHFACDZU66YNM3IAC
LF7BWEG4DKQI7NMXMZC4LC2BE5PB42HK5PD6OYBNIDMAZBJASOKQC
LXTTOB33N2HCUZFIUDRQGGBVHK2HODRG4NBLH6RXRQZDCHF27BSAC
LNUHQOGHIOFGJXNGA3DZLYEASLYYDGLN2I3EDZY5ANASQAHCG3YQC
KOTI3MFGQ4PDS4I75JIJG734LTET6745VGTSMNFYYASVIO6H2KPAC
AJP4OSTJSREBMJ5FOAHMOF6D4LKMKMRHU5NUURDLVCB4ADPX66TAC
NUZFHX6IUV2KXZOIJQTD5VIU7ELDQCFPDXYBUNQGWLKH3OMYND5QC
2LC3BM2NCIR76UILI5D4DVC5KYJSBVHDNMOC5G3TOJNCRLX6PZEQC
V3EABA35RWCOOU5OMIYRWXAKZOLHO4XPGTPOKY24RR2LOAD7ZQAQC
Y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HQVKPGTN6VQC
SRVDX4I5QKWAH3Y5DX25PG34U7NY55H46ZYG2APH47BUZT3EJ2HAC
QXVD2RIFQPTO3H6J3IJHRHRDRBW6C6MLUWMCEDQ6Z75SW2TMRBIQC
23MA4T3GWPOLM5S6JCNQJU2SRT7VQGYZ2JZJN26KA5MKI4LOCC4QC
YCDYGEZUKVVFRLV5TKF2VYPDXWIHDSZD32KINFARWAJX4X3JPSFAC
3RGHOJ25MCTQ5CRQADFIVJ53QZWRSIQOFGXLFGKQ765QABJ5S54AC
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+8,Editor_state.margin_top+5, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+8,Editor_state.margin_top+5, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+20,Editor_state.margin_top+5, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+20,Editor_state.margin_top+Editor_state.line_height+5, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+20,Editor_state.top+5, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+20,Editor_state.top+Editor_state.line_height+5, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+8,Editor_state.margin_top+5, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+8,Editor_state.margin_top+5, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+20,Editor_state.margin_top+5, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+20,Editor_state.margin_top+Editor_state.line_height+5, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+20,Editor_state.top+5, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+20,Editor_state.top+Editor_state.line_height+5, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+20,Editor_state.margin_top+5, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+8,Editor_state.margin_top+Editor_state.line_height+5, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+20,Editor_state.top+5, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+Editor_state.line_height+5, 1)
App.screen.init{width=Editor_state.margin_left+30, height=60}
App.screen.init{width=Editor_state.left+30, height=60}
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
App.screen.init{width=Editor_state.margin_left+30, height=60}
App.screen.init{width=Editor_state.left+30, height=60}
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
App.screen.init{width=Editor_state.margin_left+30, height=60}
App.screen.init{width=Editor_state.left+30, height=60}
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
App.screen.init{width=Editor_state.margin_left+30, height=60}
App.screen.init{width=Editor_state.left+30, height=60}
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
App.screen.init{width=Editor_state.margin_left+30, height=60}
App.screen.init{width=Editor_state.left+30, height=60}
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
App.screen.init{width=Editor_state.margin_left+30, height=60}
App.screen.init{width=Editor_state.left+30, height=60}
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
App.screen.init{width=Editor_state.margin_left+30, height=60}
App.screen.init{width=Editor_state.left+30, height=60}
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], State.margin_left, App.screen.width-State.margin_right)
Text.snap_cursor_to_bottom_of_screen(State, State.margin_left, App.screen.width-State.margin_right)
Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], State.left, State.right)
Text.snap_cursor_to_bottom_of_screen(State, State.left, State.right)
Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], State.margin_left, App.screen.width-State.margin_right)
Text.snap_cursor_to_bottom_of_screen(State, State.margin_left, App.screen.width-State.margin_right)
Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], State.left, State.right)
Text.snap_cursor_to_bottom_of_screen(State, State.left, State.right)
local top2 = Text.to2(State, State.screen_top1, State.margin_left, App.screen.width-State.margin_right)
top2 = Text.previous_screen_line(State, top2, State.margin_left, App.screen.width-State.margin_right)
local top2 = Text.to2(State, State.screen_top1, State.left, State.right)
top2 = Text.previous_screen_line(State, top2, State.left, State.right)
App.screen.init{width=Editor_state.margin_left+300, height=300}
check_eq(App.screen.width, Editor_state.margin_left+300, 'F - test_resize_window/baseline/width')
App.screen.init{width=Editor_state.left+300, height=300}
check_eq(App.screen.width, Editor_state.left+300, 'F - test_resize_window/baseline/width')
initialize_font_settings(settings.font_height)
Editor_state.font_height = settings.font_height
love.graphics.setFont(love.graphics.newFont(Editor_state.font_height))
Editor_state.line_height = math.floor(Editor_state.font_height*1.3)
Editor_state.em = App.newText(love.graphics.getFont(), 'm')
function load_defaults()
initialize_font_settings(20)
initialize_window_geometry()
function initialize_default_settings()
local font_height = 20
love.graphics.setFont(love.graphics.newFont(font_height))
local em = App.newText(love.graphics.getFont(), 'm')
initialize_window_geometry(App.width(em))
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right)
Editor_state.font_height = font_height
Editor_state.line_height = math.floor(font_height*1.3)
Editor_state.em = em
end
function initialize_font_settings(font_height)
Editor_state.font_height = font_height
love.graphics.setFont(love.graphics.newFont(Editor_state.font_height))
Editor_state.line_height = math.floor(font_height*1.3)
Editor_state.em = App.newText(love.graphics.getFont(), 'm')
love.graphics.rectangle('fill', State.margin_left,drawing.y, App.screen.width-State.margin_width, math.max(Drawing.pixels(drawing.h),y-drawing.y))
love.graphics.rectangle('fill', State.left,drawing.y, State.width, math.max(Drawing.pixels(drawing.h),y-drawing.y))
love.graphics.rectangle('fill', State.margin_left,drawing.y, App.screen.width-State.margin_width, math.max(Drawing.pixels(drawing.h),y-drawing.y))
love.graphics.rectangle('fill', State.left,drawing.y, State.width, math.max(Drawing.pixels(drawing.h),y-drawing.y))
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_line/baseline/y')
check_eq(Editor_state.lines[1].y, Editor_state.top+Editor_state.drawing_padding_top, 'F - test_draw_line/baseline/y')
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_horizontal_line/baseline/y')
check_eq(Editor_state.lines[1].y, Editor_state.top+Editor_state.drawing_padding_top, 'F - test_draw_horizontal_line/baseline/y')
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+26, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_circle/baseline/y')
check_eq(Editor_state.lines[1].y, Editor_state.top+Editor_state.drawing_padding_top, 'F - test_draw_circle/baseline/y')
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35+30, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35+30, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_cancel_stroke/baseline/y')
check_eq(Editor_state.lines[1].y, Editor_state.top+Editor_state.drawing_padding_top, 'F - test_cancel_stroke/baseline/y')
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_circle_mid_stroke/baseline/y')
check_eq(Editor_state.lines[1].y, Editor_state.top+Editor_state.drawing_padding_top, 'F - test_draw_circle_mid_stroke/baseline/y')
App.mouse_move(Editor_state.margin_left+4, Editor_state.margin_top+Editor_state.drawing_padding_top+4) -- hover on drawing
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
App.mouse_move(Editor_state.left+4, Editor_state.top+Editor_state.drawing_padding_top+4) -- hover on drawing
edit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35+30, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35+30, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
App.mouse_move(Editor_state.margin_left+35+30, Editor_state.margin_top+Editor_state.drawing_padding_top+36)
edit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
App.mouse_move(Editor_state.left+35+30, Editor_state.top+Editor_state.drawing_padding_top+36)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35+50, Editor_state.margin_top+Editor_state.drawing_padding_top+36+50, 1) -- 45°
edit.run_after_mouse_release(Editor_state, Editor_state.left+35+50, Editor_state.top+Editor_state.drawing_padding_top+36+50, 1) -- 45°
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_polygon/baseline/y')
check_eq(Editor_state.lines[1].y, Editor_state.top+Editor_state.drawing_padding_top, 'F - test_draw_polygon/baseline/y')
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+26, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_rectangle/baseline/y')
check_eq(Editor_state.lines[1].y, Editor_state.top+Editor_state.drawing_padding_top, 'F - test_draw_rectangle/baseline/y')
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+15, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+15, Editor_state.top+Editor_state.drawing_padding_top+26, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_rectangle_intermediate/baseline/y')
check_eq(Editor_state.lines[1].y, Editor_state.top+Editor_state.drawing_padding_top, 'F - test_draw_rectangle_intermediate/baseline/y')
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_square/baseline/y')
check_eq(Editor_state.lines[1].y, Editor_state.top+Editor_state.drawing_padding_top, 'F - test_draw_square/baseline/y')
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+15, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+15, Editor_state.top+Editor_state.drawing_padding_top+26, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_click(Editor_state, Editor_state.margin_left+26, Editor_state.margin_top+Editor_state.drawing_padding_top+44, 1)
edit.run_after_mouse_click(Editor_state, Editor_state.left+26, Editor_state.top+Editor_state.drawing_padding_top+44, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+46, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+46, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+55, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+55, Editor_state.top+Editor_state.drawing_padding_top+26, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+55, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+55, Editor_state.top+Editor_state.drawing_padding_top+26, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+14, Editor_state.margin_top+Editor_state.drawing_padding_top+16, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+14, Editor_state.top+Editor_state.drawing_padding_top+16, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+14, Editor_state.margin_top+Editor_state.drawing_padding_top+16, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+14, Editor_state.top+Editor_state.drawing_padding_top+16, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_click(Editor_state, Editor_state.margin_left+26, Editor_state.margin_top+Editor_state.drawing_padding_top+44, 1)
edit.run_after_mouse_click(Editor_state, Editor_state.left+26, Editor_state.top+Editor_state.drawing_padding_top+44, 1)
App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
App.screen.init{width=Margin_left+256, height=300} -- drawing coordinates 1:1 with pixels
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width) -- zero right margin
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.margin_left+55, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Editor_state.drawing_padding_top+6, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Editor_state.drawing_padding_top+36, 1)
edit.run_after_mouse_release(Editor_state, Editor_state.left+55, Editor_state.top+Editor_state.drawing_padding_top+26, 1)
return y >= drawing.y and y < drawing.y + Drawing.pixels(drawing.h) and x >= Editor_state.margin_left and x < App.screen.width-Editor_state.margin_right
return y >= drawing.y and y < drawing.y + Drawing.pixels(drawing.h) and x >= Editor_state.left and x < Editor_state.right