This commit is contained in:
Paul 2001-01-12 21:21:32 +00:00
parent 9bc47a36d2
commit 3a59634c25
2 changed files with 28 additions and 3 deletions

View File

@ -98,6 +98,30 @@ void CGUITextBox::render()
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
int CGUITextBox::getTextWidth()
{
return getFontBank()->getStringWidth((char*)TranslationDatabase::getString(getTextId()));
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
int CGUITextBox::getTextHeight()
{
return getFontBank()->getStringHeight((char*)TranslationDatabase::getString(getTextId()));
}
/*----------------------------------------------------------------------
Function:
Purpose:

View File

@ -43,10 +43,14 @@ public:
virtual void render();
int getTextWidth();
int getTextHeight();
protected:
void recalc();
int getTextId() {return m_textId;}
private:
unsigned int m_textId;
@ -55,9 +59,6 @@ private:
};
/*----------------------------------------------------------------------
Globals
------- */