* Fixed GUI bug which allowed entering character names that are too long (>12 chars)

* Removed warning spam in ByteBuffer.h (Not sure if that helps for 32bit systems...)
This commit is contained in:
shlainn 2010-09-11 00:54:25 +02:00
parent ec19c39c2b
commit f9bf453483
2 changed files with 5 additions and 4 deletions

View File

@ -219,6 +219,7 @@ void SceneCharSelection::OnUpdate(s32 timepassed)
//newcharwin->addChild(classselect);
guienv->addStaticText(L"Char Name", CalcRelativeScreenPos(dim,0.1f,0.3f,0.8f,0.05f),false,true,newcharwin);
charname = guienv->addEditBox(L"", CalcRelativeScreenPos(dim,0.1f,0.35f,0.8f,0.05f),true, newcharwin);
charname->setMax(12);
msgbox = guienv->addStaticText(L"",CalcRelativeScreenPos(dim,0.2f,0.6f,0.6f,0.1f), true, true, newcharwin);
}
if(eventrecv->buttons & BUTTON_SELECT_REALM || scenedata[ISCENE_CHARSEL_REALMFIRST])

View File

@ -297,7 +297,7 @@ class ByteBuffer
}
void print_storage()
{
printf("STORAGE_SIZE: %u\n", size() );
printf("STORAGE_SIZE: %lu\n", size() );
for(uint32 i = 0; i < size(); i++)
printf("%u - ", read<uint8>(i) );
printf("\n");
@ -305,7 +305,7 @@ class ByteBuffer
void textlike()
{
printf("STORAGE_SIZE: %u\n", size() );
printf("STORAGE_SIZE: %lu\n", size() );
for(uint32 i = 0; i < size(); i++)
printf("%c", read<uint8>(i) );
printf("\n");
@ -314,7 +314,7 @@ class ByteBuffer
void hexlike()
{
uint32 j = 1, k = 1;
printf("STORAGE_SIZE: %u\n", size() );
printf("STORAGE_SIZE: %lu\n", size() );
for(uint32 i = 0; i < size(); i++)
{
if ((i == (j*8)) && ((i != (k*16))))
@ -364,7 +364,7 @@ class ByteBuffer
{
uint32 line = 1;
uint32 countpos = 0;
printf("STORAGE_SIZE: %u\n", size() );
printf("STORAGE_SIZE: %lu\n", size() );
printf("|------------------------------------------------|----------------|\r\n");
printf("|00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |0123456789ABCDEF|\r\n");
printf("|------------------------------------------------|----------------|\r\n");