diff options
-rw-r--r-- | gui/ThemeDefaultXML.cpp | 14 | ||||
-rw-r--r-- | gui/ThemeRenderer.cpp | 15 | ||||
-rw-r--r-- | gui/ThemeRenderer.h | 4 |
3 files changed, 28 insertions, 5 deletions
diff --git a/gui/ThemeDefaultXML.cpp b/gui/ThemeDefaultXML.cpp index dc26920b48..ace3debfc2 100644 --- a/gui/ThemeDefaultXML.cpp +++ b/gui/ThemeDefaultXML.cpp @@ -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>" diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp index 5f4c43dc79..15d8b7d67b 100644 --- a/gui/ThemeRenderer.cpp +++ b/gui/ThemeRenderer.cpp @@ -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); } diff --git a/gui/ThemeRenderer.h b/gui/ThemeRenderer.h index aa4008c0e8..a9c597f60f 100644 --- a/gui/ThemeRenderer.h +++ b/gui/ThemeRenderer.h @@ -107,7 +107,9 @@ public: kDDScrollbarBase, kDDScrollbarHandle, - kDDPopUp, + kDDPopUpIdle, + kDDPopUpHover, + kDDCaret, kDDSeparator, kDrawDataMAX |