rluck
04-09-2007 03:22:01
this->mainMenu->getSheet()->getWindow("ControlOptionsWindow")->getTextBox("MoveUnits")->setText("");
I can setText fine when the textbox is created, afterwards though it crashes the program.
rluck
04-09-2007 03:22:01
this->mainMenu->getSheet()->getWindow("ControlOptionsWindow")->getTextBox("MoveUnits")->setText("");
kungfoomasta
04-09-2007 06:00:02
void TextBox::setText(const Ogre::UTFString& text)
{
if(text == mCaption)
return;
mCaption = text;
if(mCaption == "")
return;
mVisibleStart = 0;
mVisibleEnd = 0;
// This function determines the visibleStart and visibleEnd, and
// updates the text before setting the cursor position.
setCursorIndex(static_cast<int>(mCaption.length()));
mTextCursor->setVisible(false);
}
void TextBox::setText(const Ogre::UTFString& text)
{
if(text == mCaption)
return;
mCaption = text;
mVisibleStart = 0;
mVisibleEnd = 0;
mSelectStart = 0;
mSelectEnd = 0;
if(mCaption == "")
{
mText->setCaption("");
return;
}
// This function determines the visibleStart and visibleEnd, and
// updates the text before setting the cursor position.
setCursorIndex(static_cast<int>(mCaption.length()));
mTextCursor->setVisible(false);
}