extract a function

[?]
Jun 7, 2022, 8:24 PM
NEXUNNCF5PJC57XAMQGMSSYNI7MJ4ARWDY3HFGVYMGWG3MPHG7CQC

Dependencies

  • [2] RF5ALVNY allow the window to be resized
  • [3] AVTNUQYR basic test-enabled framework
  • [4] OTIBCAUJ love2d scaffold
  • [5] Z4KNS42N to open a file without a terminal, drag it on!
  • [6] XSLCFVFH .
  • [7] AD34IX2Z couple more tests
  • [8] 73OCE2MC after much struggle, a brute-force undo
  • [9] AJB4LFRB try to maintain a reasonable line width
  • [10] AVQ5MC5D finish uppercasing all globals

Change contents

  • replacement in main.lua at line 88
    [3.1738][3.1738:1800](),[3.1800][2.8:88](),[2.88][3.1862:2002](),[3.1862][3.1862:2002](),[3.2002][2.89:330]()
    -- maximize window
    love.window.setMode(0, 0) -- maximize
    App.screen.width, App.screen.height, App.screen.flags = love.window.getMode()
    -- shrink slightly to account for window decoration
    App.screen.width = App.screen.width-100
    App.screen.height = App.screen.height-100
    App.screen.flags.resizable = true
    App.screen.flags.minwidth = math.min(App.screen.width, 200)
    App.screen.flags.minheight = math.min(App.screen.width, 200)
    love.window.updateMode(App.screen.width, App.screen.height, App.screen.flags)
    [3.1738]
    [3.47]
    initialize_window_geometry()
  • edit in main.lua at line 104
    [3.746]
    [3.1319]
    end -- App.initialize
  • replacement in main.lua at line 106
    [3.1320][3.34:57]()
    end -- App.initialize
    [3.1320]
    [3.40]
    function initialize_window_geometry()
    -- maximize window
    love.window.setMode(0, 0) -- maximize
    App.screen.width, App.screen.height, App.screen.flags = love.window.getMode()
    -- shrink slightly to account for window decoration
    App.screen.width = App.screen.width-100
    App.screen.height = App.screen.height-100
    App.screen.flags.resizable = true
    App.screen.flags.minwidth = math.min(App.screen.width, 200)
    App.screen.flags.minheight = math.min(App.screen.width, 200)
    love.window.updateMode(App.screen.width, App.screen.height, App.screen.flags)
    end