mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 05:01:43 +00:00
- 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 svn-id: r23134
This commit is contained in:
parent
4a1b8ccb86
commit
84b54c3173
@ -65,9 +65,9 @@ void TabWidget::init() {
|
||||
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() {
|
||||
|
@ -400,7 +400,7 @@ void ThemeNew::drawButton(const Common::Rect &r, const Common::String &str, Stat
|
||||
|
||||
Common::Rect r2 = shadowRect(r, kShadowButton);
|
||||
|
||||
if (hints & THEME_HINT_SAVE_BACKGROUND)
|
||||
if (!(hints & THEME_HINT_NO_BACKGROUND_RESTORE) || state == kStateDisabled)
|
||||
restoreBackground(r2);
|
||||
|
||||
// shadow
|
||||
|
@ -148,6 +148,8 @@ void NewGui::redraw() {
|
||||
|
||||
_dialogStack[i]->drawDialog();
|
||||
}
|
||||
|
||||
_theme->drawAll();
|
||||
}
|
||||
|
||||
void NewGui::runLoop() {
|
||||
|
@ -59,7 +59,13 @@ enum {
|
||||
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
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user