diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-04-01 16:29:17 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-04-01 18:12:29 -0700 |
commit | 876d6298b40fc8b00bf559d4ec2d909ab1e6bc80 (patch) | |
tree | 8a949ceac0f9c6010a6de42518683ba9b75a3450 /run.lua | |
parent | 4ab901c92e11f47828bc7f5f16d8d2250812d53f (diff) | |
download | lines.love-876d6298b40fc8b00bf559d4ec2d909ab1e6bc80.tar.gz |
App.width can no longer take a Text
In the process I discovered the horrible fact that Text.x allocates a new Text. And it gets called (just once, thank goodness) on every single frame.
Diffstat (limited to 'run.lua')
-rw-r--r-- | run.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/run.lua b/run.lua index 6da1c59..f3364c2 100644 --- a/run.lua +++ b/run.lua @@ -71,12 +71,10 @@ end function run.initialize_default_settings() local font_height = 20 love.graphics.setFont(love.graphics.newFont(font_height)) - local em = App.newText(love.graphics.getFont(), 'm') - run.initialize_window_geometry(App.width(em)) + run.initialize_window_geometry(App.width('m')) Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right) Editor_state.font_height = font_height Editor_state.line_height = math.floor(font_height*1.3) - Editor_state.em = em Settings = run.settings() end |