From 5fda0cc6f1addedb4e3c671a9f124e6c5b253323 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 28 Jan 2006 23:03:39 +0000 Subject: - Fixes a bug that the debugger crashed while opening - Changed gradient calculating - added background saving for all dialog/widget backgrounds for now (change that later maybe) - changed ScummDialog to use the colors of our launcher dialog svn-id: r20276 --- gui/theme.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'gui/theme.h') diff --git a/gui/theme.h b/gui/theme.h index 474e233f4f..f251e9888c 100644 --- a/gui/theme.h +++ b/gui/theme.h @@ -41,7 +41,13 @@ enum { // Indicates that the widget will be redrawn often, e.g. list widgets. // It may therefore be a good idea to save the background so that it // can be redrawn quickly. - THEME_HINT_SAVE_BACKGROUND = 1 << 1 + THEME_HINT_SAVE_BACKGROUND = 1 << 1, + + // Indicates that this is the launcher dialog (maybe delete this in the future) + THEME_HINT_MAIN_DIALOG = 1 << 2, + + // Indicates special colorfade + THEME_HINT_SPECIAL_COLOR = 1 << 3 }; class Theme { @@ -101,7 +107,7 @@ public: virtual int getStringWidth(const Common::String &str) const = 0; virtual int getCharWidth(byte c) const = 0; - virtual void drawDialogBackground(const Common::Rect &r, kState state = kStateEnabled, bool mainDialog = false) = 0; + virtual void drawDialogBackground(const Common::Rect &r, uint16 hints, kState state = kStateEnabled) = 0; virtual void drawText(const Common::Rect &r, const Common::String &str, kState state = kStateEnabled, kTextAlign align = kTextAlignCenter, bool inverted = false, int deltax = 0, bool useEllipsis = true) = 0; // this should ONLY be used by the debugger until we get a nicer solution virtual void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, kState state = kStateEnabled) = 0; @@ -181,7 +187,7 @@ public: int getStringWidth(const Common::String &str) const { if (_initOk) return _font->getStringWidth(str); return 0; } int getCharWidth(byte c) const { if (_initOk) return _font->getCharWidth(c); return 0; } - void drawDialogBackground(const Common::Rect &r, kState state, bool mainDialog); + void drawDialogBackground(const Common::Rect &r, uint16 hints, kState state); void drawText(const Common::Rect &r, const Common::String &str, kState state, kTextAlign align, bool inverted, int deltax, bool useEllipsis); void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, kState state); @@ -249,7 +255,7 @@ public: int getStringWidth(const Common::String &str) const { if (_font) return _font->getStringWidth(str); return 0; } int getCharWidth(byte c) const { if (_font) return _font->getCharWidth(c); return 0; } - void drawDialogBackground(const Common::Rect &r, kState state, bool mainDialog); + void drawDialogBackground(const Common::Rect &r, uint16 hints, kState state); void drawText(const Common::Rect &r, const Common::String &str, kState state, kTextAlign align, bool inverted, int deltax, bool useEllipsis); void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, kState state); -- cgit v1.2.3