4I2LMNEXDHZTOTDKBJXHSZRQDHIBDXQOYJDNGQSZYXRNHZGP7YPAC 5FWVELA5XU72JOLKVJMIIEFUIFPJQD2MEQQZVGLB3PMNVJPJT2PAC UOTHQWM74AFOCPGQKKPLZXRI5HQFH3SRGI336AVZRGWPR6P256EAC KEFZWDCOCLPTLSZJKRV4VYAHRITV5T33YKG2VGT332YAUCOBS3EAC JGESC375DNF2CAB7ZOCSC45X5CGZVOXHSVCN643B3YHTRZRG6CIQC 3QQZ7W4EJ7G4HQM5IYWXICMAHVRGERY4X6AOC6LOV5NSZ4OBICSAC OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC JRLBUB6LR2JIAKVQNKF3T4BDICUIJ3HEMRRHX56YP5M5SP7ZS3WAC line.section_stack = deepcopy(Section_stack)elseif line.data:match('\u{250c}') thenline.section_stack = deepcopy(Section_stack) -- as it is at the beginninglocal section_name = line.data:match('\u{250c}%s*(.*)')table.insert(Section_stack, section_name)line.section_begin = trueline.section_name = section_nameline.data = nilelseif line.data:match('\u{2518}') thenlocal section_name = line.data:match('\u{2518}%s*(.*)')if array.find(Section_stack, section_name) thenwhile table.remove(Section_stack) ~= section_name do--endline.section_end = trueline.section_name = section_nameline.data = nilendline.section_stack = deepcopy(Section_stack)else-- stringline.section_stack = deepcopy(Section_stack)
if type(line.data) == 'string' theny = Text.draw(State, line_index, y, --[[startpos]] 1)
xleft = render_stack_left_margin(State, line_index, line, y)xright = render_stack_right_margin(State, line_index, line, y)if line.section_name thenApp.color(Section_border_color)local section_text = to_text(line.section_name)if line.section_begin thenlove.graphics.line(xleft,y+Section_border_padding_vertical, xleft,y+State.line_height)love.graphics.line(xright,y+Section_border_padding_vertical, xright,y+State.line_height)love.graphics.line(xleft,y+Section_border_padding_vertical, xleft+50-2,y+Section_border_padding_vertical)love.graphics.draw(section_text, xleft+50,y)love.graphics.line(xleft+50+App.width(section_text)+2,y+Section_border_padding_vertical, xright,y+Section_border_padding_vertical)else assert(line.section_end)love.graphics.line(xleft,y-Section_border_padding_vertical, xleft,y+State.line_height-Section_border_padding_vertical)love.graphics.line(xright,y-Section_border_padding_vertical, xright,y+State.line_height-Section_border_padding_vertical)love.graphics.line(xleft,y+State.line_height-Section_border_padding_vertical, xleft+50-2,y+State.line_height-Section_border_padding_vertical)love.graphics.draw(section_text, xleft+50,y)love.graphics.line(xleft+50+App.width(section_text)+2,y+State.line_height-Section_border_padding_vertical, xright,y+State.line_height-Section_border_padding_vertical)end
--? love.graphics.print('aaa', State.left, y)--? y = y + State.line_heightline.height = debug_log_render[line.data.name](line.data, State.left, y, State.right-State.left)y = y + line.height
if type(line.data) == 'string' thenlocal old_left, old_right = State.left,State.rightState.left,State.right = xleft,xrighty = Text.draw(State, line_index, y, --[[startpos]] 1)State.left,State.right = old_left,old_righty = y + State.line_heightelseline.height = debug_log_render[line.data.name](line.data, xleft, y, xright-xleft)y = y + line.heightendendendendfunction render_stack_left_margin(State, line_index, line, y)if line.section_stack == nil then-- assertion messagefor k,v in pairs(line) doprint(k)endendApp.color(Section_border_color)for i=1,#line.section_stack dolocal x = State.left + (i-1)*Section_border_padding_horizontallove.graphics.line(x,y, x,y+tenonauger.height(State, line_index))if y < 30 thenlove.graphics.print(line.section_stack[i], x+State.font_height+5, y+5, --[[vertically]] math.pi/2)endif y > App.screen.height-tenonauger.height(State, line_index) thenlove.graphics.print(line.section_stack[i], x+State.font_height+5, App.screen.height-App.width(to_text(line.section_stack[i]))-5, --[[vertically]] math.pi/2)endendreturn State.left + #line.section_stack*Section_border_padding_horizontalendfunction render_stack_right_margin(State, line_index, line, y)App.color(Section_border_color)for i=1,#line.section_stack dolocal x = State.right - (i-1)*Section_border_padding_horizontallove.graphics.line(x,y, x,y+tenonauger.height(State, line_index))if y < 30 thenlove.graphics.print(line.section_stack[i], x, y+5, --[[vertically]] math.pi/2)
-- use this sparinglyfunction to_text(s)if Text_cache[s] == nil thenText_cache[s] = App.newText(love.graphics.getFont(), s)endreturn Text_cache[s]end