diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-03-05 07:39:43 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-03-05 07:58:02 -0700 |
commit | 78ab7c7a2877efd245293ad00cd36bcaa8646507 (patch) | |
tree | 28ea749d784a3dbee334f6a076a7ac77bc0333e1 /src/gui/widgets | |
parent | b60e6d82d6e843f9e65c81555ec281d237c3ce41 (diff) | |
download | mana-78ab7c7a2877efd245293ad00cd36bcaa8646507.tar.gz mana-78ab7c7a2877efd245293ad00cd36bcaa8646507.tar.bz2 mana-78ab7c7a2877efd245293ad00cd36bcaa8646507.tar.xz mana-78ab7c7a2877efd245293ad00cd36bcaa8646507.zip |
Rename SkinLoader to Theme
Also merge the guialpha ConfigListener into Theme.
Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/avatarlistbox.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/button.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/checkbox.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 18 | ||||
-rw-r--r-- | src/gui/widgets/emoteshortcutcontainer.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/itemshortcutcontainer.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/listbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/playerbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/popup.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/progressindicator.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/radiobutton.cpp | 14 | ||||
-rw-r--r-- | src/gui/widgets/resizegrip.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 26 | ||||
-rw-r--r-- | src/gui/widgets/slider.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/tab.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/textfield.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 8 |
19 files changed, 71 insertions, 75 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index 92386739..17651137 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -25,7 +25,7 @@ #include "gui/chat.h" #include "gui/gui.h" #include "gui/palette.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/image.h" #include "resources/resourcemanager.h" @@ -45,8 +45,8 @@ AvatarListBox::AvatarListBox(AvatarListModel *model): if (instances == 1) { - onlineIcon = SkinLoader::getImageFromTheme("circle-green.png"); - offlineIcon = SkinLoader::getImageFromTheme("circle-gray.png"); + onlineIcon = Theme::getImageFromTheme("circle-green.png"); + offlineIcon = Theme::getImageFromTheme("circle-gray.png"); } setWidth(200); diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index 36a47859..aff46b2a 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -25,7 +25,7 @@ #include "graphics.h" #include "gui/palette.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/image.h" @@ -90,7 +90,7 @@ void Button::init() for (mode = 0; mode < BUTTON_COUNT; mode++) { - btn[mode] = SkinLoader::getImageFromTheme(data[mode].file); + btn[mode] = Theme::getImageFromTheme(data[mode].file); a = 0; for (y = 0; y < 3; y++) { @@ -126,7 +126,7 @@ Button::~Button() void Button::updateAlpha() { float alpha = std::max(config.getValue("guialpha", 0.8f), - (double)SkinLoader::instance()->getMinimumOpacity()); + (double) Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) { diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index 0fefbfe9..5ca38727 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -25,7 +25,7 @@ #include "graphics.h" #include "gui/palette.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/image.h" @@ -44,7 +44,7 @@ CheckBox::CheckBox(const std::string &caption, bool selected): { if (instances == 0) { - Image *checkBox = SkinLoader::getImageFromTheme("checkbox.png"); + Image *checkBox = Theme::getImageFromTheme("checkbox.png"); checkBoxNormal = checkBox->getSubImage(0, 0, 9, 10); checkBoxChecked = checkBox->getSubImage(9, 0, 9, 10); checkBoxDisabled = checkBox->getSubImage(18, 0, 9, 10); @@ -93,7 +93,7 @@ void CheckBox::draw(gcn::Graphics* graphics) void CheckBox::updateAlpha() { float alpha = std::max(config.getValue("guialpha", 0.8f), - (double)SkinLoader::instance()->getMinimumOpacity()); + (double) Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) { diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index eb0cdef2..57a09ed2 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -26,7 +26,7 @@ #include "gui/palette.h" #include "gui/sdlinput.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "gui/widgets/listbox.h" #include "gui/widgets/scrollarea.h" @@ -55,14 +55,10 @@ DropDown::DropDown(gcn::ListModel *listModel): // Load the background skin // Get the button skin - buttons[1][0] = - SkinLoader::getImageFromTheme("vscroll_up_default.png"); - buttons[0][0] = - SkinLoader::getImageFromTheme("vscroll_down_default.png"); - buttons[1][1] = - SkinLoader::getImageFromTheme("vscroll_up_pressed.png"); - buttons[0][1] = - SkinLoader::getImageFromTheme("vscroll_down_pressed.png"); + buttons[1][0] = Theme::getImageFromTheme("vscroll_up_default.png"); + buttons[0][0] = Theme::getImageFromTheme("vscroll_down_default.png"); + buttons[1][1] = Theme::getImageFromTheme("vscroll_up_pressed.png"); + buttons[0][1] = Theme::getImageFromTheme("vscroll_down_pressed.png"); buttons[0][0]->setAlpha(mAlpha); buttons[0][1]->setAlpha(mAlpha); @@ -70,7 +66,7 @@ DropDown::DropDown(gcn::ListModel *listModel): buttons[1][1]->setAlpha(mAlpha); // get the border skin - Image *boxBorder = SkinLoader::getImageFromTheme("deepbox.png"); + Image *boxBorder = Theme::getImageFromTheme("deepbox.png"); int gridx[4] = {0, 3, 28, 31}; int gridy[4] = {0, 3, 28, 31}; int a = 0, x, y; @@ -115,7 +111,7 @@ DropDown::~DropDown() void DropDown::updateAlpha() { float alpha = std::max(config.getValue("guialpha", 0.8f), - (double)SkinLoader::instance()->getMinimumOpacity()); + (double) Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) { diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index dd13c679..aadc6f24 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -32,7 +32,7 @@ #include "log.h" #include "gui/palette.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/emotedb.h" #include "resources/image.h" @@ -49,7 +49,7 @@ EmoteShortcutContainer::EmoteShortcutContainer(): addMouseListener(this); addWidgetListener(this); - mBackgroundImg = SkinLoader::getImageFromTheme("item_shortcut_bgr.png"); + mBackgroundImg = Theme::getImageFromTheme("item_shortcut_bgr.png"); mBackgroundImg->setAlpha(config.getValue("guialpha", 0.8)); diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index b4270912..0a211d29 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -32,7 +32,7 @@ #include "gui/outfitwindow.h" #include "gui/palette.h" #include "gui/sdlinput.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "gui/viewport.h" #include "net/net.h" @@ -67,7 +67,7 @@ ItemContainer::ItemContainer(Inventory *inventory, bool forceQuantity): mItemPopup = new ItemPopup; setFocusable(true); - mSelImg = SkinLoader::getImageFromTheme("selection.png"); + mSelImg = Theme::getImageFromTheme("selection.png"); if (!mSelImg) logger->error("Unable to load selection.png"); diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index 92a3e7d0..da5d11c5 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -32,7 +32,7 @@ #include "gui/inventorywindow.h" #include "gui/itempopup.h" #include "gui/palette.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "gui/viewport.h" #include "resources/image.h" @@ -50,7 +50,7 @@ ItemShortcutContainer::ItemShortcutContainer(): mItemPopup = new ItemPopup; - mBackgroundImg = SkinLoader::getImageFromTheme("item_shortcut_bgr.png"); + mBackgroundImg = Theme::getImageFromTheme("item_shortcut_bgr.png"); mMaxItems = itemShortcut->getItemCount(); mBackgroundImg->setAlpha(config.getValue("guialpha", 0.8)); diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index bfef9e2f..138cf3a0 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -25,7 +25,7 @@ #include "gui/palette.h" #include "gui/sdlinput.h" -#include "gui/skin.h" +#include "gui/theme.h" #include <guichan/font.hpp> #include <guichan/graphics.hpp> @@ -46,7 +46,7 @@ ListBox::~ListBox() void ListBox::updateAlpha() { float alpha = std::max(config.getValue("guialpha", 0.8), - (double)SkinLoader::instance()->getMinimumOpacity()); + (double) Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) mAlpha = alpha; diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp index 24395db7..d2c16dbc 100644 --- a/src/gui/widgets/playerbox.cpp +++ b/src/gui/widgets/playerbox.cpp @@ -26,7 +26,7 @@ #include "graphics.h" #include "player.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/image.h" @@ -44,7 +44,7 @@ PlayerBox::PlayerBox(const Player *player): if (instances == 0) { // Load the background skin - Image *textbox = SkinLoader::getImageFromTheme("deepbox.png"); + Image *textbox = Theme::getImageFromTheme("deepbox.png"); int bggridx[4] = {0, 3, 28, 31}; int bggridy[4] = {0, 3, 28, 31}; int a = 0, x, y; diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp index 970b21ec..5cc8fad6 100644 --- a/src/gui/widgets/popup.cpp +++ b/src/gui/widgets/popup.cpp @@ -26,7 +26,7 @@ #include "graphics.h" #include "log.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/windowcontainer.h" @@ -51,7 +51,7 @@ Popup::Popup(const std::string &name, const std::string &skin): setPadding(3); // Loads the skin - mSkin = SkinLoader::instance()->load(skin, mDefaultSkinPath); + mSkin = Theme::instance()->load(skin, mDefaultSkinPath); // Add this window to the window container windowContainer->add(this); @@ -86,7 +86,7 @@ void Popup::loadPopupConfiguration() if (skinName.compare(mSkin->getFilePath()) != 0) { mSkin->instances--; - mSkin = SkinLoader::instance()->load(skinName, mDefaultSkinPath); + mSkin = Theme::instance()->load(skinName, mDefaultSkinPath); } } diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 31c32132..99a8c36a 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -27,7 +27,7 @@ #include "gui/gui.h" #include "gui/palette.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/image.h" @@ -58,7 +58,7 @@ ProgressBar::ProgressBar(float progress, if (mInstances == 0) { - Image *dBorders = SkinLoader::getImageFromTheme("vscroll_grey.png"); + Image *dBorders = Theme::getImageFromTheme("vscroll_grey.png"); mBorder.grid[0] = dBorders->getSubImage(0, 0, 4, 4); mBorder.grid[1] = dBorders->getSubImage(4, 0, 3, 4); mBorder.grid[2] = dBorders->getSubImage(7, 0, 4, 4); @@ -122,7 +122,7 @@ void ProgressBar::logic() void ProgressBar::updateAlpha() { float alpha = std::max(config.getValue("guialpha", 0.8), - (double)SkinLoader::instance()->getMinimumOpacity()); + (double) Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) { diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp index f88f6045..1941da4a 100644 --- a/src/gui/widgets/progressindicator.cpp +++ b/src/gui/widgets/progressindicator.cpp @@ -20,7 +20,7 @@ #include "progressindicator.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/animation.h" #include "resources/imageset.h" @@ -33,8 +33,8 @@ ProgressIndicator::ProgressIndicator() { - ImageSet *images = - SkinLoader::getImageSetFromTheme("progress-indicator.png", 32, 32); + ImageSet *images = Theme::getImageSetFromTheme("progress-indicator.png", + 32, 32); Animation *anim = new Animation; for (ImageSet::size_type i = 0; i < images->size(); ++i) diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index 41c8faf7..96797225 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -24,7 +24,7 @@ #include "configuration.h" #include "graphics.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/image.h" @@ -44,12 +44,12 @@ RadioButton::RadioButton(const std::string &caption, const std::string &group, { if (instances == 0) { - radioNormal = SkinLoader::getImageFromTheme("radioout.png"); - radioChecked = SkinLoader::getImageFromTheme("radioin.png"); - radioDisabled = SkinLoader::getImageFromTheme("radioout.png"); - radioDisabledChecked = SkinLoader::getImageFromTheme("radioin.png"); - radioNormalHi = SkinLoader::getImageFromTheme("radioout_highlight.png"); - radioCheckedHi = SkinLoader::getImageFromTheme("radioin_highlight.png"); + radioNormal = Theme::getImageFromTheme("radioout.png"); + radioChecked = Theme::getImageFromTheme("radioin.png"); + radioDisabled = Theme::getImageFromTheme("radioout.png"); + radioDisabledChecked = Theme::getImageFromTheme("radioin.png"); + radioNormalHi = Theme::getImageFromTheme("radioout_highlight.png"); + radioCheckedHi = Theme::getImageFromTheme("radioin_highlight.png"); radioNormal->setAlpha(mAlpha); radioChecked->setAlpha(mAlpha); radioDisabled->setAlpha(mAlpha); diff --git a/src/gui/widgets/resizegrip.cpp b/src/gui/widgets/resizegrip.cpp index d0b9b845..f0c3691c 100644 --- a/src/gui/widgets/resizegrip.cpp +++ b/src/gui/widgets/resizegrip.cpp @@ -24,7 +24,7 @@ #include "configuration.h" #include "graphics.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/image.h" @@ -39,7 +39,7 @@ ResizeGrip::ResizeGrip(const std::string &image) if (mInstances == 0) { // Load the grip image - gripImage = SkinLoader::getImageFromTheme(image); + gripImage = Theme::getImageFromTheme(image); gripImage->setAlpha(mAlpha); } diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index dea99e8e..0c7f4d7d 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -24,7 +24,7 @@ #include "configuration.h" #include "graphics.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/image.h" @@ -95,7 +95,7 @@ void ScrollArea::init() if (instances == 0) { // Load the background skin - Image *textbox = SkinLoader::getImageFromTheme("deepbox.png"); + Image *textbox = Theme::getImageFromTheme("deepbox.png"); const int bggridx[4] = {0, 3, 28, 31}; const int bggridy[4] = {0, 3, 28, 31}; int a = 0, x, y; @@ -116,8 +116,8 @@ void ScrollArea::init() textbox->decRef(); // Load vertical scrollbar skin - Image *vscroll = SkinLoader::getImageFromTheme("vscroll_grey.png"); - Image *vscrollHi = SkinLoader::getImageFromTheme("vscroll_highlight.png"); + Image *vscroll = Theme::getImageFromTheme("vscroll_grey.png"); + Image *vscrollHi = Theme::getImageFromTheme("vscroll_highlight.png"); int vsgridx[4] = {0, 4, 7, 11}; int vsgridy[4] = {0, 4, 15, 19}; @@ -145,21 +145,21 @@ void ScrollArea::init() vscrollHi->decRef(); buttons[UP][0] = - SkinLoader::getImageFromTheme("vscroll_up_default.png"); + Theme::getImageFromTheme("vscroll_up_default.png"); buttons[DOWN][0] = - SkinLoader::getImageFromTheme("vscroll_down_default.png"); + Theme::getImageFromTheme("vscroll_down_default.png"); buttons[LEFT][0] = - SkinLoader::getImageFromTheme("hscroll_left_default.png"); + Theme::getImageFromTheme("hscroll_left_default.png"); buttons[RIGHT][0] = - SkinLoader::getImageFromTheme("hscroll_right_default.png"); + Theme::getImageFromTheme("hscroll_right_default.png"); buttons[UP][1] = - SkinLoader::getImageFromTheme("vscroll_up_pressed.png"); + Theme::getImageFromTheme("vscroll_up_pressed.png"); buttons[DOWN][1] = - SkinLoader::getImageFromTheme("vscroll_down_pressed.png"); + Theme::getImageFromTheme("vscroll_down_pressed.png"); buttons[LEFT][1] = - SkinLoader::getImageFromTheme("hscroll_left_pressed.png"); + Theme::getImageFromTheme("hscroll_left_pressed.png"); buttons[RIGHT][1] = - SkinLoader::getImageFromTheme("hscroll_right_pressed.png"); + Theme::getImageFromTheme("hscroll_right_pressed.png"); } instances++; @@ -214,7 +214,7 @@ void ScrollArea::logic() void ScrollArea::updateAlpha() { float alpha = std::max(config.getValue("guialpha", 0.8), - (double)SkinLoader::instance()->getMinimumOpacity()); + (double) Theme::instance()->getMinimumOpacity()); if (alpha != mAlpha) { diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp index af36518a..6a9a5c7c 100644 --- a/src/gui/widgets/slider.cpp +++ b/src/gui/widgets/slider.cpp @@ -24,7 +24,7 @@ #include "configuration.h" #include "graphics.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/image.h" @@ -82,8 +82,8 @@ void Slider::init() // Load resources if (mInstances == 0) { - Image *slider = SkinLoader::getImageFromTheme("slider.png"); - Image *sliderHi = SkinLoader::getImageFromTheme("slider_hilight.png"); + Image *slider = Theme::getImageFromTheme("slider.png"); + Image *sliderHi = Theme::getImageFromTheme("slider_hilight.png"); x = 0; y = 0; w = 15; h = 6; @@ -127,7 +127,7 @@ void Slider::init() void Slider::updateAlpha() { float alpha = std::max(config.getValue("guialpha", 0.8), - (double)SkinLoader::instance()->getMinimumOpacity()); + (double) Theme::instance()->getMinimumOpacity()); if (alpha != mAlpha) { diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index 17145eae..d770dbfe 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -25,7 +25,7 @@ #include "graphics.h" #include "gui/palette.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "gui/widgets/tabbedarea.h" @@ -96,7 +96,7 @@ void Tab::init() for (mode = 0; mode < TAB_COUNT; mode++) { - tab[mode] = SkinLoader::getImageFromTheme(data[mode].file); + tab[mode] = Theme::getImageFromTheme(data[mode].file); a = 0; for (y = 0; y < 3; y++) { @@ -119,7 +119,7 @@ void Tab::init() void Tab::updateAlpha() { float alpha = std::max(config.getValue("guialpha", 0.8), - (double)SkinLoader::instance()->getMinimumOpacity()); + (double) Theme::instance()->getMinimumOpacity()); // TODO We don't need to do this for every tab on every draw // Maybe use a config listener to do it as the value changes. diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index e599c37d..1fab4eb7 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -26,7 +26,7 @@ #include "gui/palette.h" #include "gui/sdlinput.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "resources/image.h" @@ -52,7 +52,7 @@ TextField::TextField(const std::string &text, bool loseFocusOnTab): if (instances == 0) { // Load the skin - Image *textbox = SkinLoader::getImageFromTheme("deepbox.png"); + Image *textbox = Theme::getImageFromTheme("deepbox.png"); int gridx[4] = {0, 3, 28, 31}; int gridy[4] = {0, 3, 28, 31}; int a = 0, x, y; @@ -87,7 +87,7 @@ TextField::~TextField() void TextField::updateAlpha() { float alpha = std::max(config.getValue("guialpha", 0.8), - (double)SkinLoader::instance()->getMinimumOpacity()); + (double) Theme::instance()->getMinimumOpacity()); if (alpha != mAlpha) { diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 83c918cf..b3d6bd02 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -26,7 +26,7 @@ #include "gui/gui.h" #include "gui/palette.h" -#include "gui/skin.h" +#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/layout.h" @@ -73,7 +73,7 @@ Window::Window(const std::string &caption, bool modal, Window *parent, setTitleBarHeight(20); // Loads the skin - mSkin = SkinLoader::instance()->load(skin, mDefaultSkinPath); + mSkin = Theme::instance()->load(skin, mDefaultSkinPath); // Add this window to the window container windowContainer->add(this); @@ -531,7 +531,7 @@ void Window::loadWindowState() if (skinName.compare(mSkin->getFilePath()) != 0) { mSkin->instances--; - mSkin = SkinLoader::instance()->load(skinName, mDefaultSkinPath); + mSkin = Theme::instance()->load(skinName, mDefaultSkinPath); } if (mGrip) @@ -709,7 +709,7 @@ int Window::getResizeHandles(gcn::MouseEvent &event) int Window::getGuiAlpha() { float alpha = std::max(config.getValue("guialpha", 0.8), - (double)SkinLoader::instance()->getMinimumOpacity()); + (double) Theme::instance()->getMinimumOpacity()); return (int) (alpha * 255.0f); } |