ManaPlus
|
#include <skin.h>
Public Member Functions | |
Skin (ImageRect *const skin, const ImageRect *const images, const std::string &filePath, const std::string &name, const int padding, const int titlePadding, StringIntMap *const options) | |
~Skin () | |
const std::string & | getName () const |
const std::string & | getFilePath () const |
const ImageRect & | getBorder () const |
const Image * | getCloseImage (const bool state) const |
const Image * | getStickyImage (const bool state) const |
int | getMinWidth () const |
int | getMinHeight () const |
void | updateAlpha (const float minimumOpacityAllowed) |
int | getPadding () const |
int | getTitlePadding () const |
int | getOption (const std::string &name) const |
int | getOption (const std::string &name, const int def) const |
Data Fields | |
int | instances |
Private Attributes | |
std::string | mFilePath |
std::string | mName |
ImageRect * | mBorder |
Image * | mCloseImage |
Image * | mCloseImageHighlighted |
Image * | mStickyImageUp |
Image * | mStickyImageDown |
int | mPadding |
int | mTitlePadding |
StringIntMap * | mOptions |
Skin::Skin | ( | ImageRect *const | skin, |
const ImageRect *const | images, | ||
const std::string & | filePath, | ||
const std::string & | name, | ||
const int | padding, | ||
const int | titlePadding, | ||
StringIntMap *const | options | ||
) |
Skin::~Skin | ( | ) |
Definition at line 65 of file skin.cpp.
References delete2, ImageRect::grid, mBorder, mCloseImage, mCloseImageHighlighted, mOptions, mStickyImageDown, and mStickyImageUp.
|
inline |
Returns the background skin.
Definition at line 68 of file skin.h.
References mBorder.
Referenced by Button::draw(), Popup::draw(), ProgressBar::draw(), Tab::draw(), Window::draw(), CheckBox::drawBox(), RadioButton::drawBox(), DropDown::DropDown(), Theme::getImageFromThemeXml(), Theme::getImageSetFromThemeXml(), ScrollArea::init(), Button::safeDraw(), Popup::safeDraw(), ProgressBar::safeDraw(), Tab::safeDraw(), Window::safeDraw(), TestLauncher::testDraw(), Button::updateAlpha(), CheckBox::updateAlpha(), RadioButton::updateAlpha(), and Tab::updateAlpha().
|
inline |
Returns the image used by a close button for this skin.
Definition at line 74 of file skin.h.
References mCloseImage, and mCloseImageHighlighted.
Referenced by Window::draw(), Window::safeDraw(), and Window::widgetResized().
|
inline |
int Skin::getMinHeight | ( | ) | const |
Returns the minimum height which can be used with this skin.
Definition at line 142 of file skin.cpp.
References ImageRect::grid, ImagePosition::LOWER_LEFT, mBorder, and ImagePosition::UPPER_LEFT.
Referenced by Popup::setMinHeight(), and Window::setMinHeight().
int Skin::getMinWidth | ( | ) | const |
Returns the minimum width which can be used with this skin.
Definition at line 129 of file skin.cpp.
References ImageRect::grid, mBorder, ImagePosition::UPPER_LEFT, and ImagePosition::UPPER_RIGHT.
Referenced by Popup::setMinWidth(), and Window::setMinWidth().
|
inline |
|
inline |
Definition at line 106 of file skin.h.
References mOptions.
Referenced by BrowserBox::BrowserBox(), CheckBox::CheckBox(), ColorPage::ColorPage(), Desktop::Desktop(), DropDown::DropDown(), Client::gameInit(), Window::getOption(), Window::getOptionBool(), Button::init(), PlayerBox::init(), ScrollArea::init(), ListBox::ListBox(), TouchManager::loadButtons(), TouchManager::loadTouchItem(), Pincode::Pincode(), Popup::Popup(), Desktop::postInit(), ProgressBar::ProgressBar(), RadioButton::RadioButton(), ItemShortcutContainer::setSkin(), ShortcutContainer::setSkin(), SkillRectangleListBox::SkillRectangleListBox(), StaticBrowserBox::StaticBrowserBox(), TextField::TextField(), TextPreview::TextPreview(), and WindowMenu::WindowMenu().
|
inline |
|
inline |
Definition at line 100 of file skin.h.
References mPadding.
Referenced by Button::adjustSize(), Tab::adjustSize(), BrowserBox::BrowserBox(), CheckBox::CheckBox(), Button::draw(), Tab::draw(), DropDown::DropDown(), Client::gameInit(), Label::init(), Tab::init(), ListBox::ListBox(), TouchManager::loadButtons(), TouchManager::loadTouchItem(), Pincode::Pincode(), Popup::Popup(), ProgressBar::ProgressBar(), RadioButton::RadioButton(), Button::safeDraw(), Tab::safeDraw(), SkillRectangleListBox::SkillRectangleListBox(), StaticBrowserBox::StaticBrowserBox(), TextField::TextField(), and Window::Window().
|
inline |
Returns the image used by a sticky button for this skin.
Definition at line 81 of file skin.h.
References mStickyImageDown, and mStickyImageUp.
Referenced by Window::draw(), Window::safeDraw(), and Window::widgetResized().
|
inline |
void Skin::updateAlpha | ( | const float | minimumOpacityAllowed | ) |
Updates the alpha value of the skin
Definition at line 104 of file skin.cpp.
References ImageRect::grid, Settings::guiAlpha, mBorder, mCloseImage, mCloseImageHighlighted, mStickyImageDown, mStickyImageUp, and settings.
Referenced by Theme::readSkin(), and Theme::updateAlpha().
int Skin::instances |
Definition at line 121 of file skin.h.
Referenced by Theme::unload().
|
private |
The window border and background
Definition at line 126 of file skin.h.
Referenced by getBorder(), getMinHeight(), getMinWidth(), updateAlpha(), and ~Skin().
|
private |
Definition at line 127 of file skin.h.
Referenced by getCloseImage(), Skin(), updateAlpha(), and ~Skin().
|
private |
Highlighted close Button Image
Definition at line 128 of file skin.h.
Referenced by getCloseImage(), Skin(), updateAlpha(), and ~Skin().
|
private |
|
private |
|
private |
Definition at line 133 of file skin.h.
Referenced by getOption(), and ~Skin().
|
private |
Definition at line 131 of file skin.h.
Referenced by getPadding().
|
private |
Definition at line 130 of file skin.h.
Referenced by getStickyImage(), updateAlpha(), and ~Skin().
|
private |
Definition at line 129 of file skin.h.
Referenced by getStickyImage(), updateAlpha(), and ~Skin().
|
private |
Definition at line 132 of file skin.h.
Referenced by getTitlePadding().