get rid of to_text
[?]
Apr 1, 2023, 9:48 PM
R3KXFRZNL4CAT5OSKIIGWR3CHL2YJ5S4TKQDIPEHIJ2HW2WS46BQCDependencies
- [2]
HKV72RZVbugfix: save modified files in save directory - [3]
UN7GKYV5support hyperlinks in the source editor - [4]
D3FLL7SLstart showing source menu file navigation state graphically - [5]
FFAPDHHHshow partial items in the menu - [6]
2CK5QI7Wmake love event names consistent - [7]
QFTLLRGLindent - [8]
ZQZX364Vuse a helper - [9]
3QWK3GSAsupport mouse clicks in file navigator - [10]
VHQCNMARseveral more modules - [11]
AVTNUQYRbasic test-enabled framework - [12]
7CLGG7J2test: autosave after any shape - [13]
RQUVBX62filter candidates in file navigator - [14]
KYNGDE2Cconsistent names in a few more places - [15]
2Y7YH7UPinfrastructure for caching LÖVE text objects - [16]
XW7ANEJXswitch shortcuts for bifold text - [17]
NYRESFK6source: show all files in navigator - [18]
ME7WBLF5bugfix: log filenames can have 2 formats - [19]
JMUD7T3Oget rid of ugly side-effects in tests - [20]
OI4FPFINsupport drawings in the source editor - [21]
IOCATA27bugfix: never skip files in file navigator - [22]
MDGHRTIFsource: up/down in file navigator - [23]
KKMFQDR4editing source code from within the app - [24]
PX7DDEMOautosave slightly less aggressively - [25]
AD34IX2Zcouple more tests - [*]
3QNOKBFMbeginnings of a test harness - [*]
2L4DL7PGgo through App in a couple more places
Change contents
- replacement in source_text.lua at line 48
local filename_text = App.newText(love.graphics.getFont(), filename)button(State, 'link', {x=x+App.width(to_text('[[')), y=y, w=App.width(filename_text), h=State.line_height, color={1,1,1},button(State, 'link', {x=x+App.width('[['), y=y, w=App.width(filename), h=State.line_height, color={1,1,1}, - edit in source.lua at line 419
endend-- use this sparinglyfunction to_text(s)if Text_cache[s] == nil thenText_cache[s] = App.newText(love.graphics.getFont(), s) - edit in source.lua at line 420
return Text_cache[s] - replacement in run.lua at line 200
-- use this sparinglyfunction to_text(s)if Text_cache[s] == nil thenText_cache[s] = App.newText(love.graphics.getFont(), s)endreturn Text_cache[s]function width(s)return love.graphics.getFont():getWidth(s) - edit in log_browser.lua at line 101
local section_text = to_text(line.section_name) - replacement in log_browser.lua at line 106
love.graphics.draw(section_text, xleft+50,y)love.graphics.line(xleft+50+App.width(section_text)+2,sectiony, xright,sectiony)love.graphics.print(line.section_name, xleft+50,y)love.graphics.line(xleft+50+App.width(line.section_name)+2,sectiony, xright,sectiony) - replacement in log_browser.lua at line 113
love.graphics.draw(section_text, xleft+50,y)love.graphics.line(xleft+50+App.width(section_text)+2,sectiony, xright,sectiony)love.graphics.print(line.section_name, xleft+50,y)love.graphics.line(xleft+50+App.width(line.section_name)+2,sectiony, xright,sectiony) - replacement in log_browser.lua at line 150
love.graphics.print(line.section_stack[i].name, x+State.font_height+5, App.screen.height-App.width(to_text(line.section_stack[i].name))-5, --[[vertically]] math.pi/2)love.graphics.print(line.section_stack[i].name, x+State.font_height+5, App.screen.height-App.width(line.section_stack[i].name)-5, --[[vertically]] math.pi/2) - replacement in log_browser.lua at line 165
love.graphics.print(line.section_stack[i].name, x, App.screen.height-App.width(to_text(line.section_stack[i].name))-5, --[[vertically]] math.pi/2)love.graphics.print(line.section_stack[i].name, x, App.screen.height-App.width(line.section_stack[i].name)-5, --[[vertically]] math.pi/2) - replacement in help.lua at line 150
return App.width(to_text('* '))return App.width('* ') - replacement in commands.lua at line 46
local s_text = to_text(s)local width = App.width(s_text)local width = App.width(s) - replacement in commands.lua at line 51
App.screen.draw(s_text, Menu_cursor,5)App.screen.print(s, Menu_cursor,5) - replacement in commands.lua at line 57
local filter_text = to_text(File_navigation.filter)App.screen.draw(filter_text, 5, 5)draw_cursor(5 + App.width(filter_text), 5)App.screen.print(File_navigation.filter, 5, 5)draw_cursor(5 + App.width(File_navigation.filter), 5) - replacement in commands.lua at line 98
local width = App.width(to_text(filename))local width = App.width(filename) - replacement in commands.lua at line 110
local s_text = to_text(s)local width = App.width(s_text)local width = App.width(s) - replacement in commands.lua at line 125
App.screen.draw(s_text, x,y)App.screen.print(s, x,y) - replacement in commands.lua at line 189
local filename_text = to_text(filename)width = App.width(filename_text)width = App.width(filename) - replacement in commands.lua at line 206
local filename_text = to_text(filename)width = App.width(filename_text)width = App.width(filename) - replacement in commands.lua at line 217
App.screen.draw(filename_text, x + x3-menu_xmin, y3)App.screen.print(filename, x + x3-menu_xmin, y3) - replacement in commands.lua at line 244
local width = App.width(to_text(filename))local width = App.width(filename) - replacement in commands.lua at line 262
local width = App.width(to_text(filename))local width = App.width(filename) - edit in app.lua at line 222[28.296][28.296]
if type(text) == 'string' thenreturn love.graphics.getFont():getWidth(text)end - replacement in app.lua at line 431
App.width = function(text) return text:getWidth() endApp.width = function(text)if type(text) == 'string' thenreturn love.graphics.getFont():getWidth(text)endreturn text:getWidth()end