From 500ee24e22aae7b457118d152b4480e99969092e Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sat, 27 Feb 2010 21:50:25 -0700 Subject: Make the gui more themeable and distribute two themes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The older gray theme and the new wood theme are available as themes. The gray theme needs some new graphics for hilights. Add a theme option for branding and add path/to/branding/data to the PhysFS search path. Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Chuck Miller --- src/gui/widgets/dropdown.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/gui/widgets/dropdown.cpp') diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 32b42553..eb0cdef2 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -32,7 +32,6 @@ #include "gui/widgets/scrollarea.h" #include "resources/image.h" -#include "resources/resourcemanager.h" #include "utils/dtor.h" @@ -54,17 +53,16 @@ DropDown::DropDown(gcn::ListModel *listModel): if (instances == 0) { // Load the background skin - ResourceManager *resman = ResourceManager::getInstance(); // Get the button skin buttons[1][0] = - resman->getImage("graphics/gui/vscroll_up_default.png"); + SkinLoader::getImageFromTheme("vscroll_up_default.png"); buttons[0][0] = - resman->getImage("graphics/gui/vscroll_down_default.png"); + SkinLoader::getImageFromTheme("vscroll_down_default.png"); buttons[1][1] = - resman->getImage("graphics/gui/vscroll_up_pressed.png"); + SkinLoader::getImageFromTheme("vscroll_up_pressed.png"); buttons[0][1] = - resman->getImage("graphics/gui/vscroll_down_pressed.png"); + SkinLoader::getImageFromTheme("vscroll_down_pressed.png"); buttons[0][0]->setAlpha(mAlpha); buttons[0][1]->setAlpha(mAlpha); @@ -72,7 +70,7 @@ DropDown::DropDown(gcn::ListModel *listModel): buttons[1][1]->setAlpha(mAlpha); // get the border skin - Image *boxBorder = resman->getImage("graphics/gui/deepbox.png"); + Image *boxBorder = SkinLoader::getImageFromTheme("deepbox.png"); int gridx[4] = {0, 3, 28, 31}; int gridy[4] = {0, 3, 28, 31}; int a = 0, x, y; -- cgit v1.2.3-70-g09d2