hoist a temporary inside a function

akkartik
Nov 26, 2023, 5:50 PM
XG6DGBFEVRSTPPOWYYMHCEDM45NEZAJZSVKILLFQ4Y4BZ2H7GBVQC

Dependencies

  • [2] W3RRTO4P extract a second helper for buttons
  • [3] 5RUFNRJO start of the visual skeleton
  • [4] RK2ASPN7 add lots of buttons to the toolbar
  • [5] JV27LDDK sliders for font size and color settings
  • [6] 5MEJ7XNH lay out buttons based on device dimensions
  • [7] 5JMR2IJS bugfix: save settings on mobile devices
  • [8] YS4AQXJC hide other menus when opening one

Change contents

  • replacement in 0072-settings_button at line 1
    [3.1362][3.1363:1396]()
    settings_button = function(x, w)
    [3.1362]
    [2.685]
    settings_button = function(x)
    local w = App.width('settings')
    local x = x-5-w-5
  • replacement in 0072-settings_button at line 13
    [2.748][3.1716:1731](),[3.1716][3.1716:1731]()
    return x+w+10
    [2.748]
    [3.1731]
    return x
  • replacement in 0021-draw_menu at line 5
    [3.4141][3.4141:4226]()
    local w = App.width('settings')
    local r = Safe_width-w-10-5
    settings_button(r, w)
    [3.4141]
    [3.4226]
    local r = settings_button(Safe_width-5)