Popup widget, separator widget.

svn-id: r33059
This commit is contained in:
Vicent Marti 2008-07-14 18:42:38 +00:00
parent 23101e3dee
commit d3d34ef295
3 changed files with 28 additions and 5 deletions

View File

@ -50,9 +50,21 @@ bool ThemeRenderer::loadDefaultXML() {
"<drawstep func = 'fill' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' />"
"</drawdata>"
"<drawdata id = 'popup' cache = false>"
"<drawdata id = 'separator' cache = false>"
"<drawstep func = 'square' fill = 'foreground' height = '3' ypos = 'center' fg_color = '0, 0, 0' />"
"</drawdata>"
"<drawdata id = 'popup_idle' 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 = '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 = '0, 0, 0' />"
"</drawdata>"
"<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 = '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' />"
"</drawdata>"
"<drawdata id = 'default_bg' cache = false>"

View File

@ -65,7 +65,9 @@ const char *ThemeRenderer::kDrawDataStrings[] = {
"scrollbar_base",
"scrollbar_handle",
"popup",
"popup_idle",
"popup_hover",
"caret",
"separator"
};
@ -390,8 +392,15 @@ void ThemeRenderer::drawPopUpWidget(const Common::Rect &r, const Common::String
if (!ready())
return;
drawDD(kDDPopUp, r);
DrawData dd = (state == kStateHighlight) ? kDDPopUpHover : kDDPopUpIdle;
drawDD(dd, r);
if (!sel.empty()) {
Common::Rect text(r.left, r.top, r.right - 16, r.bottom);
drawDDText(dd, text, sel);
}
debugWidgetPosition("Popup Widget", r);
}

View File

@ -107,7 +107,9 @@ public:
kDDScrollbarBase,
kDDScrollbarHandle,
kDDPopUp,
kDDPopUpIdle,
kDDPopUpHover,
kDDCaret,
kDDSeparator,
kDrawDataMAX