diff options
Diffstat (limited to 'engines/tony/font.cpp')
-rw-r--r-- | engines/tony/font.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp index 2996b30f04..a0500047b6 100644 --- a/engines/tony/font.cpp +++ b/engines/tony/font.cpp @@ -125,6 +125,14 @@ void RMFont::Load(const byte *buf, int nChars, int dimx, int dimy, uint32 palRes nLetters=nChars; } +void RMFont::Load(uint32 resID, int nChars, int dimx, int dimy, uint32 palResID) { + RMRes res(resID); + + if ((int)res.Size() < nChars * (dimy * dimx + 8)) + nChars = res.Size() / (dimy * dimx + 8); + + Load(res, nChars, dimx, dimy, palResID); +} void RMFont::Unload(void) { if (m_letter != NULL) { @@ -2273,6 +2281,25 @@ void RMTextItemName::Draw(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) { RMText::Draw(bigBuf,prim); } +RMPoint RMTextItemName::GetHotspot() { + if (m_item == NULL) + return m_mpos + m_curscroll; + else + return m_item->Hotspot(); +} + +RMItem *RMTextItemName::GetSelectedItem() { + return m_item; +} + +bool RMTextItemName::IsItemSelected() { + return m_item != NULL; +} + +bool RMTextItemName::IsNormalItemSelected() { + return m_item != NULL && m_itemName.Length() > 0; +} + /****************************************************************************\ * Metodi di RMDialogChoice |