Fix: Scroll widget background.

svn-id: r33174
This commit is contained in:
Vicent Marti 2008-07-21 16:14:06 +00:00
parent f218ab3a9d
commit 8bfaacf587
3 changed files with 8 additions and 13 deletions

View file

@ -93,7 +93,7 @@ bool ThemeRenderer::loadDefaultXML() {
"<drawdata id = 'popup_hover' cache = false>" "<drawdata id = 'popup_hover' cache = false>"
"<drawstep func = 'square' stroke = 0 fg_color = '0, 0, 0' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' shadow = 3 />" "<drawstep func = 'square' stroke = 0 fg_color = '0, 0, 0' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' shadow = 0 />"
"<drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = '12' height = '12' xpos = '-16' ypos = 'center' orientation = 'bottom' />" "<drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = '12' height = '12' xpos = '-16' ypos = 'center' orientation = 'bottom' />"
"<text vertical_align = 'center' horizontal_align = 'right' color = '255, 255, 255' />" "<text vertical_align = 'center' horizontal_align = 'right' color = '255, 255, 255' />"
"</drawdata>" "</drawdata>"
@ -109,7 +109,7 @@ bool ThemeRenderer::loadDefaultXML() {
"<drawdata id = 'button_hover' cache = false>" "<drawdata id = 'button_hover' cache = false>"
"<text vertical_align = 'center' horizontal_align = 'center' color = '255, 255, 255' />" "<text vertical_align = 'center' horizontal_align = 'center' color = '255, 255, 255' />"
"<drawstep func = 'roundedsq' radius = '8' stroke = '1' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 3 />" "<drawstep func = 'roundedsq' radius = '8' stroke = '1' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 0 />"
"</drawdata>" "</drawdata>"
"<drawdata id = 'button_disabled' cache = false>" "<drawdata id = 'button_disabled' cache = false>"

View file

@ -54,7 +54,7 @@ const ThemeRenderer::DrawDataInfo ThemeRenderer::kDrawData[] = {
{kDDButtonHover, "button_hover", false, kDDButtonIdle}, {kDDButtonHover, "button_hover", false, kDDButtonIdle},
{kDDButtonDisabled, "button_disabled", true, kDDNone}, {kDDButtonDisabled, "button_disabled", true, kDDNone},
{kDDSliderFull, "slider_full", false, kDDWidgetBackgroundSlider}, {kDDSliderFull, "slider_full", false, kDDNone},
{kDDCheckboxEnabled, "checkbox_enabled", false, kDDCheckboxDisabled}, {kDDCheckboxEnabled, "checkbox_enabled", false, kDDCheckboxDisabled},
{kDDCheckboxDisabled, "checkbox_disabled", true, kDDNone}, {kDDCheckboxDisabled, "checkbox_disabled", true, kDDNone},
@ -306,18 +306,15 @@ void ThemeRenderer::queueDD(DrawData type, const Common::Rect &r, uint32 dynamic
q.dynData = dynamic; q.dynData = dynamic;
if (_buffering) { if (_buffering) {
warning("Queued up a '%s' for the %s", kDrawData[type].name, _widgets[type]->_buffer ? "buffer" : "screen"); if (_widgets[type]->_buffer) {
_bufferQueue.push_back(q);
if (_widgets[type]->_buffer) } else {
_bufferQueue.push_back(q); if (kDrawData[type].parent != kDDNone && kDrawData[type].parent != type)
else {
if (kDrawData[type].parent != kDDNone)
queueDD(kDrawData[type].parent, r); queueDD(kDrawData[type].parent, r);
_screenQueue.push_back(q); _screenQueue.push_back(q);
} }
} else { } else {
warning("Drawing a '%s' directly!", kDrawData[type].name);
drawDD(q, !_widgets[type]->_buffer, _widgets[type]->_buffer); drawDD(q, !_widgets[type]->_buffer, _widgets[type]->_buffer);
} }
} }
@ -439,6 +436,7 @@ void ThemeRenderer::drawSlider(const Common::Rect &r, int width, WidgetStateInfo
Common::Rect r2 = r; Common::Rect r2 = r;
r2.setWidth(MIN((int16)width, r.width())); r2.setWidth(MIN((int16)width, r.width()));
drawWidgetBackground(r, 0, kWidgetBackgroundSlider, kStateEnabled);
queueDD(kDDSliderFull, r2); queueDD(kDDSliderFull, r2);
} }

View file

@ -194,7 +194,6 @@ void NewGui::redraw() {
case kRedrawCloseDialog: case kRedrawCloseDialog:
case kRedrawFull: case kRedrawFull:
case kRedrawTopDialog: case kRedrawTopDialog:
warning("Full screen redraw. Oops");
_theme->clearAll(); _theme->clearAll();
_theme->closeAllDialogs(); _theme->closeAllDialogs();
@ -207,8 +206,6 @@ void NewGui::redraw() {
//_theme->startBuffering(); //_theme->startBuffering();
_dialogStack.top()->drawDialog(); _dialogStack.top()->drawDialog();
_theme->finishBuffering(); _theme->finishBuffering();
warning("Dialog opened");
break; break;
default: default: