diff options
| -rw-r--r-- | sky/control.cpp | 7 | ||||
| -rw-r--r-- | sky/control.h | 1 | 
2 files changed, 6 insertions, 2 deletions
| diff --git a/sky/control.cpp b/sky/control.cpp index f9f069db31..ff9878a5eb 100644 --- a/sky/control.cpp +++ b/sky/control.cpp @@ -739,6 +739,8 @@ void SkyControl::handleKeyPress(uint8 key, uint8 *textBuf) {  			textBuf++;  		textBuf[0] = 0;  	} else { +		if (_enteredTextWidth >= PAN_LINE_WIDTH - 10) +			return;          if (((key >= 'A') && (key <= 'Z')) || ((key >= 'a') && (key <= 'z')) ||  			((key >= '0') && (key <= '9')) || checkKeyList(key)) {  				uint8 strLen = 0; @@ -771,9 +773,10 @@ void SkyControl::setUpGameSprites(uint8 *nameBuf, dataFileHeader **nameSprites,  		}  		nameBuf += MAX_TEXT_LEN;  		nameSprites[cnt] = (dataFileHeader*)textSpr.textData; -		if (firstNum + cnt == selectedGame) +		if (firstNum + cnt == selectedGame) {  			nameSprites[cnt]->flag = 1; -		else +			_enteredTextWidth = (uint16)textSpr.textWidth; +		} else  			nameSprites[cnt]->flag = 0;  	}  } diff --git a/sky/control.h b/sky/control.h index f96bafcf64..fe2da43111 100644 --- a/sky/control.h +++ b/sky/control.h @@ -229,6 +229,7 @@ private:  	uint32 _curButtonText;  	uint16 _firstText;  	uint16 _savedMouse; +	uint16 _enteredTextWidth;  	SkyConResource *createResource(void *pSpData, uint32 pNSprites, uint32 pCurSprite, int16 pX, int16 pY, uint32 pText, uint8 pOnClick, uint8 panelType); | 
