use a helper

[?]
Sep 18, 2022, 6:01 AM
ZQZX364VYRZOGYDPN25FIQLCKIAK2DJ2U6FJUP54X72HXQAGG5VQC

Dependencies

  • [2] KKMFQDR4 editing source code from within the app
  • [3] OI4FPFIN support drawings in the source editor
  • [4] XW7ANEJX switch shortcuts for bifold text
  • [5] QZ2SXLHF some debug prints

Change contents

  • replacement in commands.lua at line 45
    [2.205905][2.205905:206043]()
    if Text_cache[s] == nil then
    Text_cache[s] = App.newText(love.graphics.getFont(), s)
    end
    local width = App.width(Text_cache[s])
    [2.205905]
    [2.206043]
    local s_text = to_text(s)
    local width = App.width(s_text)
  • replacement in commands.lua at line 51
    [2.206145][2.206145:206193]()
    App.screen.draw(Text_cache[s], Menu_cursor,5)
    [2.206145]
    [2.206193]
    App.screen.draw(s_text, Menu_cursor,5)
  • replacement in commands.lua at line 69
    [2.206600][2.206600:206738]()
    if Text_cache[s] == nil then
    Text_cache[s] = App.newText(love.graphics.getFont(), s)
    end
    local width = App.width(Text_cache[s])
    [2.206600]
    [2.206738]
    local s_text = to_text(s)
    local width = App.width(s_text)
  • replacement in commands.lua at line 77
    [2.206871][2.206871:206985]()
    love.graphics.rectangle('fill', Menu_cursor-5,5-2, App.width(Text_cache[s])+5*2,Editor_state.line_height+2*2)
    [2.206871]
    [2.206985]
    love.graphics.rectangle('fill', Menu_cursor-5,5-2, App.width(s_text)+5*2,Editor_state.line_height+2*2)
  • replacement in commands.lua at line 80
    [2.207023][2.207023:207071]()
    App.screen.draw(Text_cache[s], Menu_cursor,5)
    [2.207023]
    [2.207071]
    App.screen.draw(s_text, Menu_cursor,5)