[Scummvm-cvs-logs] SF.net SVN: scummvm: [23134] scummvm/trunk/gui
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Thu Jun 15 16:26:09 CEST 2006
Revision: 23134
Author: lordhoto
Date: 2006-06-15 07:25:59 -0700 (Thu, 15 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23134&view=rev
Log Message:
-----------
- Adds 'THEME_HINT_NO_BACKGROUND_RESTORE' for buttons which don't want restored background (example: the tab scrolling buttons).
- Call _theme->drawAll() at the end of the redraw method of NewGui
Modified Paths:
--------------
scummvm/trunk/gui/TabWidget.cpp
scummvm/trunk/gui/ThemeNew.cpp
scummvm/trunk/gui/newgui.cpp
scummvm/trunk/gui/theme.h
Modified: scummvm/trunk/gui/TabWidget.cpp
===================================================================
--- scummvm/trunk/gui/TabWidget.cpp 2006-06-15 13:56:10 UTC (rev 23133)
+++ scummvm/trunk/gui/TabWidget.cpp 2006-06-15 14:25:59 UTC (rev 23134)
@@ -65,9 +65,9 @@
int x = _w - _butRP - _butW * 2 - 2;
int y = _butTP - _tabHeight;
_navLeft = new ButtonWidget(this, x, y, _butW, _butH, "<", kCmdLeft, 0);
- _navLeft->clearHints(THEME_HINT_SAVE_BACKGROUND);
+ _navLeft->setHints(THEME_HINT_NO_BACKGROUND_RESTORE);
_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, ">", kCmdRight, 0);
- _navRight->clearHints(THEME_HINT_SAVE_BACKGROUND);
+ _navRight->setHints(THEME_HINT_NO_BACKGROUND_RESTORE);
}
TabWidget::~TabWidget() {
Modified: scummvm/trunk/gui/ThemeNew.cpp
===================================================================
--- scummvm/trunk/gui/ThemeNew.cpp 2006-06-15 13:56:10 UTC (rev 23133)
+++ scummvm/trunk/gui/ThemeNew.cpp 2006-06-15 14:25:59 UTC (rev 23134)
@@ -400,7 +400,7 @@
Common::Rect r2 = shadowRect(r, kShadowButton);
- if (hints & THEME_HINT_SAVE_BACKGROUND)
+ if (!(hints & THEME_HINT_NO_BACKGROUND_RESTORE) || state == kStateDisabled)
restoreBackground(r2);
// shadow
Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp 2006-06-15 13:56:10 UTC (rev 23133)
+++ scummvm/trunk/gui/newgui.cpp 2006-06-15 14:25:59 UTC (rev 23134)
@@ -148,6 +148,8 @@
_dialogStack[i]->drawDialog();
}
+
+ _theme->drawAll();
}
void NewGui::runLoop() {
Modified: scummvm/trunk/gui/theme.h
===================================================================
--- scummvm/trunk/gui/theme.h 2006-06-15 13:56:10 UTC (rev 23133)
+++ scummvm/trunk/gui/theme.h 2006-06-15 14:25:59 UTC (rev 23134)
@@ -59,7 +59,13 @@
THEME_HINT_PLAIN_COLOR = 1 << 4,
// Indictaes that a shadows should be drawn around the background
- THEME_HINT_USE_SHADOW = 1 << 5
+ THEME_HINT_USE_SHADOW = 1 << 5,
+
+ // Indicates that no background should be restored when drawing the widget
+ // (note that this can be silently ignored if for example the theme does
+ // alpha blending and would blend over a allready drawn widget)
+ // TODO: currently only ThemeNew::drawButton supports this
+ THEME_HINT_NO_BACKGROUND_RESTORE = 1 << 6
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list