summaryrefslogtreecommitdiff
path: root/src/textfile_gui.h
AgeCommit message (Collapse)Author
2021-04-29Fix: 'Cache' top and bottom lines of textfile viewer to avoid overdraw. (#9131)PeterN
* Fix: 'Cache' top and bottom lines of textfile viewer to avoid overdraw. The text file viewer calculated the number of lines required to set the scrollbar, but did not retain this information, so this was recalculated on every draw operation. This includes overdrawing text outside the bounds of the current scroll position. With this change the top and bottom lines for each line of text are remembered, and reflowing is avoided where possible. Text outside the current scroll bounds is not drawn. Additionally the scroll interval is now based on text lines instead of pixel lines, which increases the text capacity depending on the font size. * Fix: Limit text viewer to showing 64k lines. Text files with more than 64k wrapped lines would exceed the scrollbar capacity and cause an assert. This is harder to reach now that the scrollbar counts lines instead of pixels.
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-05-14Codechange: [Win32] Pass a native GDI font description around when we have ↵Michael Lutz
one, instead of repeatedly guessing the font.
2019-03-26Codechange: Removed SmallVector completelyHenry Wilson
2019-03-24Codechange: More use of override keyword.peter1138
2013-10-06(svn r25816) -Add [FS#5748]: Toggle button for wrapping lines in the ↵frosch
textfile GUI (LordAro)
2012-02-12(svn r23936) -Feature [FS#5047]: readme/licence/changelog viewer for AI and ↵rubidium
game scripts (LordAro)
2012-02-12(svn r23935) -Codechange: generalise GetTextfilerubidium
2012-02-12(svn r23932) -Codechange: split the NewGRF text window into its own source filesrubidium