aboutsummaryrefslogtreecommitdiff
path: root/graphics/font.h
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-29 18:40:36 +0100
committerEugene Sandulenko2017-01-29 18:41:07 +0100
commitdc640ab50a63b0383c6aec6df4e0427df1824c3e (patch)
tree69a1176c00f2d206c0d022848a1ec859e7d74976 /graphics/font.h
parent1c6b31397a382e4adb315456a321caf144766826 (diff)
downloadscummvm-rg350-dc640ab50a63b0383c6aec6df4e0427df1824c3e.tar.gz
scummvm-rg350-dc640ab50a63b0383c6aec6df4e0427df1824c3e.tar.bz2
scummvm-rg350-dc640ab50a63b0383c6aec6df4e0427df1824c3e.zip
GRAPHICS: Added optional initial line width ot text wrapper
Diffstat (limited to 'graphics/font.h')
-rw-r--r--graphics/font.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/graphics/font.h b/graphics/font.h
index 0478608708..6682ce015b 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -169,13 +169,14 @@ public:
* It returns the maximal width of any of the new lines (i.e. a value which is less
* or equal to maxWidth).
*
- * @param str the string to word wrap
- * @param maxWidth the maximum width a line may have
- * @param lines the string list to which the text lines from str are appended
+ * @param str the string to word wrap
+ * @param maxWidth the maximum width a line may have
+ * @param lines the string list to which the text lines from str are appended
+ * @param initWidth the starting width of the first line, for partially filled lines (optional)
* @return the maximal width of any of the lines added to lines
*/
- int wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const;
- int wordWrapText(const Common::U32String &str, int maxWidth, Common::Array<Common::U32String> &lines) const;
+ int wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines, int initWidth = 0) const;
+ int wordWrapText(const Common::U32String &str, int maxWidth, Common::Array<Common::U32String> &lines, int initWidth = 0) const;
private:
Common::String handleEllipsis(const Common::String &str, int w) const;