App.width can no longer take a Text
[?]
Apr 1, 2023, 11:29 PM
ISOFHXB2DX6IRN4HVBYWLADZM7QXQKRNAAS577G542KS4L6G5H3QCDependencies
- [2]
6WDBV52Zmove a var closer to its use - [3]
BE3WIEVKupdate cursor in search box - [4]
OYVFFWBKmove - [5]
R3KXFRZNget rid of to_text - [6]
356GY7IQunify two similar functions - [7]
B4JEWKWIhide editor cursor while in file navigator - [8]
IFTYOERMline.y -> line_cache.starty in a few more places - [9]
7JH2ZT3Fadd state arg to Drawing.draw - [10]
5ZA3BRNYadd state arg to a few functions - [11]
TXHMMX25move caching behavior inside compute_fragments - [12]
5DOTWNVMright margin - [13]
AH744RFRshow when we're naming a point - [14]
QCPXQ2E3add state arg to a few functions - [15]
M6TH7VSZrip out notion of Line_width - [16]
MYC7XR5Qbugfix: lines that aren't drawn from the start - [17]
RRDO6H7Hbugfix - [18]
FHSZYAZ2more precise search highlighting - [19]
2L5MEZV3experiment: new edit namespace - [20]
ILOA5BYFseparate data structure for each line's cache data - [21]
MTJEVRJRadd state arg to a few functions - [22]
HALS7E5Umore clearly skip prints before screen top - [23]
JLU2RMC4allow Text.nearest_pos_less_than to return 0 - [24]
MP2TBKU6bugfix: crash in Text.up() after return - [25]
F3NPUCCMupdate stale information - [26]
CQYKYJJUremember window positions across restart/ctrl+e - [27]
LXTTOB33extract a couple of files - [28]
IWYLK45Kclicking to the right of a line within line width - [29]
UHB4GARJleft/right margin -> left/right coordinates - [30]
H22OAXWEcouple of TODOs - [31]
AVTNUQYRbasic test-enabled framework - [32]
HGC5RGJPswitch to line index in a function - [33]
JMUD7T3Oget rid of ugly side-effects in tests - [34]
HIKLULFQextract a function - [35]
TYFAGQWSrepeat bugfix on source editor - [36]
IX5YTLSVstate validation in source editor as well - [37]
KMSL74GAsupport selections in the source editor - [38]
4EGQRXDAbugfix: naming points - [39]
PV2YA7KSsubsection headings in a long switch - [40]
4J4TX7ISget typed in keystrokes to show on screen on iPad - [41]
4KC7I3E2make colors easier to edit - [42]
2CK5QI7Wmake love event names consistent - [43]
YRJFJNUDbugfix - [44]
X3F7ECSLadd state arg to some functions - [45]
AJB4LFRBtry to maintain a reasonable line width - [46]
2L4DL7PGgo through App in a couple more places - [47]
HOSPP2ANcrisp font rendering - [48]
LNUHQOGHstart passing in Editor_state explicitly - [49]
G54H3YG2get rid of all bifold text - [50]
5DOC2CBMextract a function - [51]
UPCIYZEUdrop an unnecessary level of indent - [52]
S2MISTTMadd state arg to a few functions - [53]
2WGHUWE6self-documenting 0 Test_right_margin - [54]
AOZX2G5Fsource: no commandline args - [55]
PFT5Y2ZYmove - [56]
LIKTH6HMupdate stale source X-( - [57]
LF7BWEG4group all editor globals - [58]
PX7DDEMOautosave slightly less aggressively - [59]
QYIFOHW3first test! - [60]
OI4FPFINsupport drawings in the source editor - [61]
HKV72RZVbugfix: save modified files in save directory - [62]
NDHQN23Gdone passing left/right margins everywhere - [63]
GL4Q5WCVkeep text from overflowing right margin - [64]
EGH7XDBKsupport non-text lines in Text.to2 - [65]
H6QZ7GRRmore precise name - [66]
5RDWSYK2consistently use App names for methods everywhere - [67]
IMEJA43Lsnapshot - [68]
MXA3RZYKdeduce left/right from state where possible - [69]
VSBSWTE4bugfix: where cursor is drawn - [70]
2Y7YH7UPinfrastructure for caching LÖVE text objects - [71]
EAEGCJV5rename - [72]
KKMFQDR4editing source code from within the app - [73]
ZJOSQFN6bugfix: path munging on Windows - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
BLWAYPKVextract a module - [*]
3QNOKBFMbeginnings of a test harness
Change contents
- replacement in text.lua at line 26
local frag_width = App.width(frag_text)local frag_width = App.width(f.data) - replacement in text.lua at line 93
local frag_width = App.width(frag_text)local frag_width = App.width(f.data) - replacement in text.lua at line 117
local frag_width = App.width(frag_text)local frag_width = App.width(frag) - replacement in text.lua at line 132
local frag1_width = App.width(frag1_text)local frag1_width = App.width(frag1) - replacement in text.lua at line 138
frag_width = App.width(frag_text)frag_width = App.width(frag) - replacement in text.lua at line 762
local screen_line_text = App.newText(love.graphics.getFont(), screen_line)return App.width(screen_line_text)return App.width(screen_line) - replacement in text.lua at line 850
local text_before = App.newText(love.graphics.getFont(), s_before)return App.width(text_before)return App.width(s_before) - replacement in text.lua at line 856
local text_before = App.newText(love.graphics.getFont(), s_before)return App.width(text_before)return App.width(s_before) - replacement in source_text.lua at line 29
local frag_width = App.width(frag_text)local frag_width = App.width(f.data) - replacement in source_text.lua at line 109
local frag_width = App.width(frag_text)local frag_width = App.width(f.data) - replacement in source_text.lua at line 133
local frag_width = App.width(frag_text)local frag_width = App.width(frag) - replacement in source_text.lua at line 148
local frag1_width = App.width(frag1_text)local frag1_width = App.width(frag1) - replacement in source_text.lua at line 154
frag_width = App.width(frag_text)frag_width = App.width(frag) - replacement in source_text.lua at line 778
local screen_line_text = App.newText(love.graphics.getFont(), screen_line)return App.width(screen_line_text)return App.width(screen_line) - replacement in source_text.lua at line 866
local text_before = App.newText(love.graphics.getFont(), s_before)return App.width(text_before)return App.width(s_before) - replacement in source_text.lua at line 872
local text_before = App.newText(love.graphics.getFont(), s_before)return App.width(text_before)return App.width(s_before) - replacement in source_select.lua at line 63
local before_text = App.newText(love.graphics.getFont(), before)lo_px = App.width(before_text)lo_px = App.width(before) - edit in source_select.lua at line 67
local text = App.newText(love.graphics.getFont(), s)local text_width = App.width(text) - replacement in source_select.lua at line 68
love.graphics.rectangle('fill', x+lo_px,y, text_width,State.line_height)love.graphics.rectangle('fill', x+lo_px,y, App.width(s),State.line_height) - edit in source_edit.lua at line 107
search_text = nil, - edit in source_edit.lua at line 327
State.search_text = nil - edit in source_edit.lua at line 357
State.search_text = nil - edit in source_edit.lua at line 363
State.search_text = nil - edit in source_edit.lua at line 368
State.search_text = nil - edit in source_edit.lua at line 381
assert(State.search_text == nil) - edit in source_edit.lua at line 512
State.em = App.newText(love.graphics.getFont(), 'm') - replacement in source.lua at line 165
local em = App.newText(love.graphics.getFont(), 'm')source.initialize_window_geometry(App.width(em))source.initialize_window_geometry(App.width('m')) - edit in source.lua at line 170
Editor_state.em = em - replacement in select.lua at line 61
local before_text = App.newText(love.graphics.getFont(), before)lo_px = App.width(before_text)lo_px = App.width(before) - edit in select.lua at line 65
local text = App.newText(love.graphics.getFont(), s)local text_width = App.width(text) - replacement in select.lua at line 66
love.graphics.rectangle('fill', x+lo_px,y, text_width,State.line_height)love.graphics.rectangle('fill', x+lo_px,y, App.width(s),State.line_height) - replacement in search.lua at line 16[6.232]→[6.1672:1787](∅→∅),[6.1787]→[6.49593:49599](∅→∅),[6.82027]→[6.49593:49599](∅→∅),[6.49593]→[6.49593:49599](∅→∅),[6.49599]→[3.6:69](∅→∅)
if State.search_text == nil thenState.search_text = App.newText(love.graphics.getFont(), State.search_term)endText.draw_cursor(State, 25+App.width(State.search_text),y-5)Text.draw_cursor(State, 25+App.width(State.search_term),y-5) - replacement in run.lua at line 74
local em = App.newText(love.graphics.getFont(), 'm')run.initialize_window_geometry(App.width(em))run.initialize_window_geometry(App.width('m')) - edit in run.lua at line 78
Editor_state.em = em - edit in edit.lua at line 106
search_text = nil, - edit in edit.lua at line 326
State.search_text = nil - edit in edit.lua at line 356
State.search_text = nil - edit in edit.lua at line 362
State.search_text = nil - edit in edit.lua at line 367
State.search_text = nil - edit in edit.lua at line 380
assert(State.search_text == nil) - edit in edit.lua at line 511
State.em = App.newText(love.graphics.getFont(), 'm') - replacement in drawing.lua at line 63
local name_text-- TODO: avoid computing name width on every repaintlocal name_width - replacement in drawing.lua at line 65
name_text = State.emname_width = App.width('m') - replacement in drawing.lua at line 67
name_text = App.newText(love.graphics.getFont(), p.name)name_width = App.width(p.name) - replacement in drawing.lua at line 69
love.graphics.rectangle('fill', x,y, App.width(name_text), State.line_height)love.graphics.rectangle('fill', x,y, name_width, State.line_height) - replacement in app.lua at line 222
if type(text) == 'string' thenreturn love.graphics.getFont():getWidth(text)endreturn text.text:getWidth()return love.graphics.getFont():getWidth(text) - edit in app.lua at line 428
App.width = function(text)if type(text) == 'string' thenreturn love.graphics.getFont():getWidth(text)endreturn text:getWidth()end