1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Pixel-accurately clip characters to the available space instead of omitting whole characters that stick out.

In addition to being a prerequisite for shadowed text, this also fixes an issue sometimes seen at the bottom of the mini KI player list where characters with a descender were missing.
This commit is contained in:
Christian Walther
2014-04-03 22:17:45 +02:00
committed by Anne Marije v/d Meer
parent 4cd2b2f7dd
commit b34577103e
3 changed files with 80 additions and 29 deletions

View File

@ -138,9 +138,9 @@ void pfGUIEditBoxMod::IUpdate( void )
oldCursorPos = cursorPos;
cursorPos -= (int16_t)fScrollPos;
if( 4 + cursorPos > fDynTextMap->GetVisibleWidth() - 18 )
if( 4 + cursorPos > fDynTextMap->GetVisibleWidth() - 4 - 2 )
{
fScrollPos += ( 4 + cursorPos ) - ( fDynTextMap->GetVisibleWidth() - 18 );
fScrollPos += ( 4 + cursorPos ) - ( fDynTextMap->GetVisibleWidth() - 4 - 2 );
}
else if( 4 + cursorPos < 4 )
{