From 22097018bb348b4c29def9f1d2de4d802661a6b0 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Thu, 10 Mar 2016 20:07:36 -0600 Subject: SCI32: Implement GfxText32::getTextCount --- engines/sci/graphics/text32.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'engines/sci/graphics/text32.h') 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 -- cgit v1.2.3