ddnet/src/engine
Robert Müller 3cd294372a Fix text rendering over maximum line width with newline
When a word is rendered over the maximum line width it should be moved to the next line.

However, this was not working correctly if the word ends with a newline instead of a space, because then the text x-advance including this word did not exceed the maximum width, as the newline caused the x-advance to be reset before it can be used.

This is fixed by replacing the unused flag `TEXTFLAG_ALLOW_NEWLINE` with the flag `TEXTFLAG_DISALLOW_NEWLINE`, which causes newline characters to be replaced with space characters. This flag is then used when calculating whether the next word fits in the current line.

Closes #4541.
2023-02-21 23:38:41 +01:00
..
client Fix text rendering over maximum line width with newline 2023-02-21 23:38:41 +01:00
docs Merge #5918 2022-10-09 13:53:05 +00:00
external Update zlib to version 1.2.13 2022-10-14 14:53:24 +02:00
gfx Mark parameters as const when possible 2022-11-29 23:32:31 +01:00
server Merge #6328 2023-02-14 22:11:05 +00:00
shared Add comments explaining UUID generation 2023-02-20 20:05:26 +01:00
antibot.h Forgot to add target here 2021-07-22 00:22:12 +02:00
Cargo.toml Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
client.h Add a simpler IServer::SnapNewItem() API based on some more generated data 2023-02-10 23:12:24 +03:00
config.h Implement "reset" command 2021-12-27 01:13:11 +01:00
console.h Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
console.rs Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
demo.h Use sizeof(int32_t) instead of 4 2023-02-11 13:59:08 +01:00
discord.h Only announce servers using Steam/Discord integration which are registered 2022-10-09 16:16:54 +02:00
editor.h Use bool for Load, Save, Append result, true on success 2022-11-03 20:17:06 +01:00
engine.h Mark virtual function as override using a script: 2022-05-17 23:47:32 +02:00
favorites.h Allow multiple addresses per server in the serverbrowser 2022-07-10 16:52:07 +02:00
friends.h Bump friends limit from 1024 to 4096 (fixes #6096) 2022-12-06 10:31:43 +01:00
ghost.h Organize engine-shared includes 2022-05-29 20:02:22 +02:00
graphics.h Reset graphics container indices after deletion 2023-02-15 21:05:15 +01:00
input.h Increase relative joystick movement based on input update time 2023-01-26 23:37:52 +01:00
kernel.h Fix misspellings 2022-10-25 13:51:56 -03:00
keys.h Handle ordinal joystick hat keys as combined cardinal hat keys 2022-12-17 17:18:01 +01:00
lib.rs Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
map.h Huge variable naming format 2022-07-08 18:01:29 +02:00
message.h Add a simpler IServer::SnapNewItem() API based on some more generated data 2023-02-10 23:12:24 +03:00
rust.h Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
server.h Add a simpler IServer::SnapNewItem() API based on some more generated data 2023-02-10 23:12:24 +03:00
serverbrowser.h Add skin to serverbrowser player list 2023-01-07 09:20:25 +01:00
sound.h Let CKernel clean-up. Use unused CSound::Shutdown 2022-09-16 16:50:19 +02:00
sqlite.h Remove useless typedef in c++ 2022-06-25 21:05:54 +02:00
steam.h Only announce servers using Steam/Discord integration which are registered 2022-10-09 16:16:54 +02:00
storage.h Add IStorage::FileExists and IStorage::FolderExists 2023-01-22 17:22:11 +01:00
textrender.h Fix text rendering over maximum line width with newline 2023-02-21 23:38:41 +01:00
updater.h Overhauled job system 2017-11-23 15:47:38 +01:00
uuid.h Make sure headers compile standalone 2020-09-26 21:50:27 +02:00
warning.h Add block list for drivers 2020-11-05 21:07:14 +01:00