diff options
author | stevenhoefel | 2017-01-15 18:42:50 +1100 |
---|---|---|
committer | stevenhoefel | 2017-01-15 18:42:50 +1100 |
commit | 2e48529fa1f1d865299db81bc99cb7537656b19f (patch) | |
tree | d1f0f7ebf5a60bd17dc40b11f8dd77ce491daace /graphics/macgui/mactext.h | |
parent | 8b4460e310886499f5018cdd264c0e3e835fe6fa (diff) | |
download | scummvm-rg350-2e48529fa1f1d865299db81bc99cb7537656b19f.tar.gz scummvm-rg350-2e48529fa1f1d865299db81bc99cb7537656b19f.tar.bz2 scummvm-rg350-2e48529fa1f1d865299db81bc99cb7537656b19f.zip |
DIRECTOR: Utilise MacText class to provide Text Wrapping.
Diffstat (limited to 'graphics/macgui/mactext.h')
-rw-r--r-- | graphics/macgui/mactext.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/graphics/macgui/mactext.h b/graphics/macgui/mactext.h index e035eb123f..21c063f896 100644 --- a/graphics/macgui/mactext.h +++ b/graphics/macgui/mactext.h @@ -30,7 +30,7 @@ namespace Graphics { class MacText { public: - MacText(Common::String s, Graphics::Font *font, int fgcolor, int bgcolor, int maxWidth = -1); + MacText(Common::String s, const Graphics::Font *font, int fgcolor, int bgcolor, int maxWidth = -1); void setInterLinear(int interLinear) { _interLinear = interLinear; } @@ -38,16 +38,18 @@ public: void appendText(Common::String str); void replaceLastLine(Common::String str); + void render(); + Graphics::ManagedSurface *getSurface() { return _surface; } + private: void splitString(Common::String &s); - void render(); void render(int from, int to); void calcMaxWidth(); void reallocSurface(); private: Common::String _str; - Graphics::Font *_font; + const Graphics::Font *_font; int _fgcolor, _bgcolor; int _maxWidth; |