extract variables for drawing padding

[?]
Jun 14, 2022, 5:22 PM
ZZ2B5RPQKANSIWAZA4ATDXVBK3XLYIORJ7I4IH2WQOG5JAPJFZ4AC

Dependencies

  • [2] LAW2O3NW extract variable Margin_left
  • [3] 3OKKTUT4 up and down arrow now moving by screen line where possible
  • [4] CVSRHMJ2 experiment: slightly adaptive scrolling
  • [5] DLQMM265 scroll past first page
  • [6] T3B4NLV3 include a unit test
  • [7] UWNHC4AA redo y computations
  • [8] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [9] ZPUQSPQP extract a few methods
  • [10] LXTTOB33 extract a couple of files
  • [11] 242L3OQX bugfix: ensure Cursor_line is always on a text line
  • [12] TRNWIQN6 more precise height calculation when scrolling up as much as possible while keeping cursor on screen
  • [13] 4C375P53 this is a bit clearer
  • [14] KOYAJWE4 extract a couple more methods
  • [15] U7M4M2F7 bugfix: don't rely on Screen_bottom1 while scrolling
  • [16] HOSPP2AN crisp font rendering
  • [17] YPHKZVWM extract a new variable
  • [18] OMTGHWMA yet another bugfix. But for how long?
  • [19] MDXGMZU2 disable all debug prints
  • [20] YJGADSGK delete unused arg
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] OTIBCAUJ love2d scaffold
  • [*] YKRF5V3Z starting to load/save

Change contents

  • replacement in text_tests.lua at line 430
    [3.7716][3.7716:7779]()
    local drawing_height = 20 + App.screen.width / 2 -- default
    [3.7716]
    [3.7779]
    local drawing_height = Drawing_padding_height + App.screen.width / 2 -- default
  • replacement in text.lua at line 405
    [3.494][3.494:555]()
    y = y - 20 - Drawing.pixels(Lines[Screen_top1.line].h)
    [3.494]
    [3.555]
    y = y - Drawing_padding_height - Drawing.pixels(Lines[Screen_top1.line].h)
  • replacement in text.lua at line 630
    [3.1553][3.753:808](),[3.753][3.753:808]()
    y = y + 20 + Drawing.pixels(Lines[Cursor1.line].h)
    [3.1553]
    [3.6764]
    y = y + Drawing_padding_height + Drawing.pixels(Lines[Cursor1.line].h)
  • replacement in text.lua at line 665
    [3.767][3.1:59]()
    local h = 20 + Drawing.pixels(Lines[top2.line-1].h)
    [3.767]
    [3.1425]
    local h = Drawing_padding_height + Drawing.pixels(Lines[top2.line-1].h)
  • edit in main.lua at line 72
    [2.2612]
    [24.3]
    Drawing_padding_top = 10
    Drawing_padding_bottom = 10
    Drawing_padding_height = Drawing_padding_top + Drawing_padding_bottom
  • replacement in main.lua at line 247
    [3.1432][3.90:118]()
    y = y+10 -- padding
    [3.1432]
    [3.118]
    y = y+Drawing_padding_top
  • replacement in main.lua at line 250
    [3.30][3.138:193]()
    y = y + Drawing.pixels(line.h) + 10 -- padding
    [3.30]
    [3.1499]
    y = y + Drawing.pixels(line.h) + Drawing_padding_bottom