aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeRenderer.h
diff options
context:
space:
mode:
authorVicent Marti2008-07-15 10:50:31 +0000
committerVicent Marti2008-07-15 10:50:31 +0000
commitb44b37d4ca4f0bbfe2b578dc72d84ba71286cc92 (patch)
treebc9e53aa065e524cef9cfe7de3b9764ad929a18c /gui/ThemeRenderer.h
parentd3d34ef2959c6cf77dcf71689a747d6167a0873f (diff)
downloadscummvm-rg350-b44b37d4ca4f0bbfe2b578dc72d84ba71286cc92.tar.gz
scummvm-rg350-b44b37d4ca4f0bbfe2b578dc72d84ba71286cc92.tar.bz2
scummvm-rg350-b44b37d4ca4f0bbfe2b578dc72d84ba71286cc92.zip
More widgets.
svn-id: r33071
Diffstat (limited to 'gui/ThemeRenderer.h')
-rw-r--r--gui/ThemeRenderer.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/gui/ThemeRenderer.h b/gui/ThemeRenderer.h
index a9c597f60f..ba6cf633b0 100644
--- a/gui/ThemeRenderer.h
+++ b/gui/ThemeRenderer.h
@@ -112,8 +112,17 @@ public:
kDDCaret,
kDDSeparator,
+ kDDDefaultText,
kDrawDataMAX
};
+
+ enum TextColor {
+ kTextColorDefault,
+ kTextColorHover,
+ kTextColorDisabled,
+ kTextColorInverted,
+ kTextColorMAX
+ };
ThemeRenderer(Common::String themeName, GraphicsMode mode);
@@ -160,7 +169,7 @@ public:
void drawLineSeparator(const Common::Rect &r, WidgetStateInfo state = kStateEnabled);
void drawDialogBackground(const Common::Rect &r, uint16 hints, WidgetStateInfo state);
- void drawText(const Common::Rect &r, const Common::String &str, WidgetStateInfo state, TextAlign align, bool inverted, int deltax, bool useEllipsis, FontStyle font) {}
+ void drawText(const Common::Rect &r, const Common::String &str, WidgetStateInfo state, TextAlign align, bool inverted, int deltax, bool useEllipsis, FontStyle font);
void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, WidgetStateInfo state) {}
bool addDirtyRect(Common::Rect r, bool backup = false, bool special = false) {
@@ -254,6 +263,19 @@ protected:
int getTabPadding() const {
return 3;
}
+
+ uint32 getTextColor(WidgetStateInfo state) {
+ switch (state) {
+ case kStateDisabled:
+ return _textColors[kTextColorDisabled];
+
+ case kStateHighlight:
+ return _textColors[kTextColorHover];
+
+ default:
+ return _textColors[kTextColorDefault];
+ }
+ }
OSystem *_system;
Graphics::VectorRenderer *_vectorRenderer;
@@ -266,6 +288,7 @@ protected:
Common::String _fontName;
const Graphics::Font *_font;
+ uint32 _textColors[kTextColorMAX];
WidgetDrawData *_widgets[kDrawDataMAX];
Common::Array<Common::Rect> _dirtyScreen;