2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04: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
parent db5e451622
commit 1f0277e3e0
3 changed files with 80 additions and 29 deletions

View File

@ -197,9 +197,9 @@ void pfGUIEditBoxMod::IUpdate( void )
oldCursorPos = cursorPos;
cursorPos -= (Int16)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 )
{