start of the visual skeleton
Dependencies
- [2]
ICS45BILeditor widget now takes a bottom margin - [3]
ZM7NOBRMnew fork: carousel shell - [*]
R5QXEHUIsomebody stop me
Change contents
- file addition: 0028-draw_output_border[5.2]
draw_output_border = function()-- hack: computing based on editor before output existslocal x1 = Editor_state.left-5-Line_number_paddinglocal x2 = Editor_state.right+5local y1 = Editor_state.bottom+5+10-- upper borderlove.graphics.line(x1,y1, x2,y1)love.graphics.line(x1,y1, x1,y1+10)love.graphics.line(x2,y1, x2,y1+10)end - file addition: 0027-Menu_background[5.2]
Menu_background = {r=0.2, g=0.2, b=0.2} - file addition: 0026-Menu_bottom[5.2]
Menu_bottom = 0 - file addition: 0025-Menu_height[5.2]
Menu_height = 0 - file addition: 0024-Menu_left[5.2]
Menu_left = 0 - file addition: 0023-Menu_top[5.2]
Menu_top = 0 - file addition: 0021-draw_menu[5.2]
draw_menu = function()App.color(Menu_background)love.graphics.rectangle('fill', 0,0, App.screen.width, Menu_bottom)button(Editor_state, 'run', {x=Menu_left+5, y=Menu_top+5, w=App.width('Run')+10, h=Line_height, bg={r=0.5, g=0.8, b=0.5},icon = function(p)App.color{r=0,g=0,b=0}love.graphics.print('Run', p.x+5,p.y+2)end,onpress1 = function()print('run')end,})end - file addition: 0020-draw_editor_border[5.2]
draw_editor_border = function()local x1 = Editor_state.left-5-Line_number_paddinglocal y1 = Editor_state.top-5local x2 = Editor_state.right+5local y2 = Editor_state.bottom+5-- upper borderlove.graphics.line(x1,y1, x2,y1)love.graphics.line(x1,y1, x1,y1+10)love.graphics.line(x2,y1, x2,y1+10)-- lower borderlove.graphics.line(x1,y2, x2,y2)love.graphics.line(x1,y2, x1,y2-10)love.graphics.line(x2,y2, x2,y2-10)end - edit in 0016-on.mouse_press at line 2
if mouse_press_consumed_by_any_button_handler(Editor_state, x,y, mouse_button) thenreturnend - replacement in 0012-on.draw at line 2
love.graphics.rectangle('line', 100-5-Line_number_padding,100-5, 400+10, 200+10, 5,5)Editor_state.button_handlers = {}draw_editor_border()-- love.graphics.rectangle('line', 100-5-Line_number_padding,100-5, 300+Line_number_padding+10, 200+10, 5,5) - edit in 0012-on.draw at line 6
draw_output_border()draw_menu() - replacement in 0011-on.initialize at line 5
Editor_state = edit.initialize_state(100, 300, 100, 400, love.graphics.getFont():getHeight(), Line_height)Menu_left, Menu_top = love.window.getSafeArea()Menu_height = 5 + Line_height + 5Menu_bottom = Menu_top + Menu_heightEditor_state = edit.initialize_state(--[[top]] Menu_bottom + 20, --[[bottom]] App.screen.height/2-5,--[[left]] 100, --[[right]] 400,love.graphics.getFont():getHeight(), Line_height) - replacement in 0011-on.initialize at line 13
end[3.3410]end