mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 00:12:59 +00:00
Popup widget, separator widget.
svn-id: r33059
This commit is contained in:
parent
23101e3dee
commit
d3d34ef295
@ -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>"
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,9 @@ public:
|
||||
kDDScrollbarBase,
|
||||
kDDScrollbarHandle,
|
||||
|
||||
kDDPopUp,
|
||||
kDDPopUpIdle,
|
||||
kDDPopUpHover,
|
||||
|
||||
kDDCaret,
|
||||
kDDSeparator,
|
||||
kDrawDataMAX
|
||||
|
Loading…
x
Reference in New Issue
Block a user