diff options
author | Colin Snover | 2016-03-10 20:07:36 -0600 |
---|---|---|
committer | Colin Snover | 2016-03-10 20:07:36 -0600 |
commit | 22097018bb348b4c29def9f1d2de4d802661a6b0 (patch) | |
tree | d98c3d25bbb64830747e8cce692a51ee76cb021d /engines/sci/graphics/text32.h | |
parent | 7105fb23a84f6464149ab031a6eff3ce69bffdff (diff) | |
download | scummvm-rg350-22097018bb348b4c29def9f1d2de4d802661a6b0.tar.gz scummvm-rg350-22097018bb348b4c29def9f1d2de4d802661a6b0.tar.bz2 scummvm-rg350-22097018bb348b4c29def9f1d2de4d802661a6b0.zip |
SCI32: Implement GfxText32::getTextCount
Diffstat (limited to 'engines/sci/graphics/text32.h')
-rw-r--r-- | engines/sci/graphics/text32.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/sci/graphics/text32.h b/engines/sci/graphics/text32.h index 472d5e0956..5768ea0c59 100644 --- a/engines/sci/graphics/text32.h +++ b/engines/sci/graphics/text32.h @@ -458,6 +458,20 @@ public: * Retrieves the width of a line of text. */ int16 getStringWidth(const Common::String &text); + + /** + * Gets the number of characters of `text`, starting + * from `index`, that can be safely rendered into + * `textRect`. + */ + int16 getTextCount(const Common::String &text, const uint index, const Common::Rect &textRect, const bool doScaling); + + /** + * Gets the number of characters of `text`, starting + * from `index`, that can be safely rendered into + * `textRect` using the given font. + */ + int16 getTextCount(const Common::String &text, const uint index, const GuiResourceId fontId, const Common::Rect &textRect, const bool doScaling); }; } // End of namespace Sci |