ddnet/src/game/client/components
Robert Müller 9693d4beac Fix vertical centering of multi-line UI labels
Also calculate text height in `TextWidth`.

Use calculated text height to verically center UI labels.

The text cursor flags (in particular, the `TEXTFLAG_STOP_AT_END` flag) must also be passed to `TextWidth`. Otherwise, for example, when `TEXTFLAG_STOP_AT_END` is missing, the wrong text height is calculated, as text is rendered over multiple lines instead of stopping at the end of the first line.

Closes #5396.
2023-04-09 20:10:09 +02:00
..
background.cpp Port some code to str_copy() template 2022-07-09 19:40:58 +03:00
background.h Replace all usages of C standard headers with C++ headers 2023-03-01 19:26:51 +01:00
binds.cpp Rename variable aBuf to pBuf, use size_t for buffer size 2022-10-27 22:21:08 +02:00
binds.h Rename variable aBuf to pBuf, use size_t for buffer size 2022-10-27 22:21:08 +02:00
broadcast.cpp Port some code to str_copy() template 2022-07-09 19:40:58 +03:00
broadcast.h Add some checksum functions to the client 2022-01-31 21:31:26 +01:00
camera.cpp Replace usages of C math functions 2023-03-01 19:26:53 +01:00
camera.h Move src/game/bezier.cpp/h to src/base/bezier.cpp/h 2022-09-24 20:53:59 +02:00
chat.cpp Fix dummy tee being able to ping main tee in chat 2023-03-23 20:24:28 +01:00
chat.h Add chat message constants from upstream, remove redundant comments 2023-02-21 20:46:17 +01:00
console.cpp Don't add duplicate consecutive commands to console history 2023-03-14 23:33:06 +01:00
console.h Smooth console completion scrolling 2022-08-15 23:20:37 +02:00
controls.cpp Replace usages of C math functions 2023-03-01 19:26:53 +01:00
controls.h Huge variable naming format 2022-07-08 18:01:29 +02:00
countryflags.cpp Improve "couldn't open..." error messages by listing target 2022-08-16 17:35:47 +02:00
countryflags.h Huge variable naming format 2022-07-08 18:01:29 +02:00
damageind.cpp Add random_angle function 2023-03-18 12:07:52 +01:00
damageind.h Huge variable naming format 2022-07-08 18:01:29 +02:00
debughud.cpp Remove unused argument of Text/TextWidth/TextLineCount 2023-02-20 20:06:17 +01:00
debughud.h Player position, speed and angle can now be displayed in the HUD. 2022-04-14 13:42:19 +02:00
effects.cpp fix start size of freezing flakes particles & vel of player death 2023-03-28 21:33:48 +02:00
effects.h Add freezing snow flakes effect and fix 50HZ timer + add 10Hz Timer to particle system 2022-06-15 22:05:40 +02:00
emoticon.cpp Replace usages of C math functions 2023-03-01 19:26:53 +01:00
emoticon.h Move CRenderTools::DrawCircle to IGraphics::DrawCircle 2022-08-12 17:42:03 +02:00
flow.cpp Fix all Multiplication type alerts by CodeQL 2020-10-05 19:03:54 +02:00
flow.h Add some checksum functions to the client 2022-01-31 21:31:26 +01:00
freezebars.cpp do an int check for m_FreezeEnd instad of float, becuase it is int 2022-08-13 15:43:38 +02:00
freezebars.h add vertical ninja bar 2022-04-14 13:40:44 +02:00
ghost.cpp Merge #6035 2022-12-05 20:00:07 +00:00
ghost.h Pass parameters by const reference instead of value when possible 2022-11-29 23:32:25 +01:00
hud.cpp Replace usages of C math functions 2023-03-01 19:26:53 +01:00
hud.h Rename "NoSomething" to "SomethingDisabled" 2022-07-11 13:40:01 +02:00
items.cpp Add random_float functions with min and max arguments 2023-03-18 12:09:37 +01:00
items.h Add DDNetLaser to have more info about a laser shot 2022-09-15 01:01:32 +02:00
killmessages.cpp Mark absolute #includes as absolute 2023-02-23 10:53:16 +01:00
killmessages.h Add some checksum functions to the client 2022-01-31 21:31:26 +01:00
mapimages.cpp Replace usages of C math functions 2023-03-01 19:26:53 +01:00
mapimages.h Merge most entity textures again 2023-01-13 15:25:38 +01:00
maplayers.cpp Replace usages of C math functions 2023-03-01 19:26:53 +01:00
maplayers.h Reworked color system 2022-07-06 11:39:51 +02:00
mapsounds.cpp Reworked color system 2022-07-06 11:39:51 +02:00
mapsounds.h Use std::vector<CSourceQueueEntry> instead of array 2022-05-27 16:31:18 +02:00
menu_background.cpp fix formatting and include array 2023-03-18 08:07:25 +01:00
menu_background.h fix formatting and include array 2023-03-18 08:07:25 +01:00
menus.cpp Move generic popup handling to UI (port from editor and upstream) 2023-04-07 17:16:16 +02:00
menus.h Implement random skin button 2023-03-25 13:11:47 +01:00
menus_browser.cpp highlight game type 2023-04-05 20:02:25 +02:00
menus_demo.cpp Bring every Font Icon unicode into a namespace 2023-04-03 20:25:28 -04:00
menus_ingame.cpp Bring every Font Icon unicode into a namespace 2023-04-03 20:25:28 -04:00
menus_settings.cpp Fix vertical centering of multi-line UI labels 2023-04-09 20:10:09 +02:00
menus_settings_assets.cpp Bring every Font Icon unicode into a namespace 2023-04-03 20:25:28 -04:00
menus_start.cpp Handle return value of kill_process 2023-03-10 17:59:36 +01:00
motd.cpp Ensure texture is cleared when rendering MOTD background 2023-03-26 13:15:36 +02:00
motd.h Use std::size(g_Config.m_SvMotd) instead of magic number 900 2023-03-10 00:32:51 +01:00
nameplates.cpp Replace usages of C math functions 2023-03-01 19:26:53 +01:00
nameplates.h Organize game-client and editor includes 2022-06-17 20:32:56 +02:00
particles.cpp Add random_float functions with min and max arguments 2023-03-18 12:09:37 +01:00
particles.h Add freezing snow flakes effect and fix 50HZ timer + add 10Hz Timer to particle system 2022-06-15 22:05:40 +02:00
players.cpp Replace usages of C math functions 2023-03-01 19:26:53 +01:00
players.h Huge variable naming format 2022-07-08 18:01:29 +02:00
race_demo.cpp Port some code to str_copy() template 2022-07-09 19:40:58 +03:00
race_demo.h Switch to nanoseconds 2022-05-18 18:05:41 +02:00
scoreboard.cpp Replace usages of C math functions 2023-03-01 19:26:53 +01:00
scoreboard.h no goals hud when empty 2022-06-16 16:28:50 +02:00
skins.cpp Implement random skin button 2023-03-25 13:11:47 +01:00
skins.h Implement random skin button 2023-03-25 13:11:47 +01:00
sounds.cpp Suppress more events while skipping in demos: 2022-08-28 15:20:50 +02:00
sounds.h Add IsPlaying to sounds client component 2022-06-26 22:43:32 +02:00
spectator.cpp Remove unused argument of Text/TextWidth/TextLineCount 2023-02-20 20:06:17 +01:00
spectator.h Integrate joystick with game controls and menus/editor UI 2022-06-13 20:40:37 +02:00
statboard.cpp Remove unused argument of Text/TextWidth/TextLineCount 2023-02-20 20:06:17 +01:00
statboard.h Organize game-client includes 2022-05-29 21:24:43 +02:00
tooltips.cpp Let CUI::Screen return a const pointer 2023-04-07 11:50:48 +02:00
tooltips.h Replace ui.h include with ui_rect.h, organize other includes 2022-08-12 19:37:08 +02:00
voting.cpp Improve callvote arguments by making them more specific 2022-10-29 14:45:24 +02:00
voting.h Organize game-client and editor includes 2022-06-17 20:32:56 +02:00