45 #include "render/graphics.h"
59 mBackgroundGrayColor(getThemeColor(
ThemeColorId::BACKGROUND_GRAY, 255U)),
92 "(C) ManaPlus developers, http://manaplus.org");
104 if (
theme !=
nullptr)
110 if (
mSkin !=
nullptr)
141 const int width = rect.
width;
142 const int height = rect.
height;
145 const int wallpWidth =
mWallpaper->getWidth();
146 const int wallpHeight =
mWallpaper->getHeight();
148 if (width > wallpWidth || height > wallpHeight)
157 (width - wallpWidth) / 2,
158 (height - wallpHeight) / 2);
186 const std::string wallpaperName =
191 if (nWallPaper !=
nullptr)
200 const int width = rect.
width;
201 const int height = rect.
height;
204 (nWallPaper->getWidth() != width ||
205 nWallPaper->getHeight() != height))
209 nWallPaper, width, height);
211 if (newRsclWlPpr !=
nullptr)
229 logger->
log(
"Couldn't load %s as wallpaper", wallpaperName.c_str());
235 if (link ==
"copyright")
void draw(Graphics *const graphics)
void addXY(Widget *const widget, const int x, const int y)
std::string getValue(const std::string &key, const std::string &deflt) const
bool getBoolValue(const std::string &key) const
void setBestFittingWallpaper()
void draw(Graphics *const graphics)
Desktop(const Widget2 *const widget)
void safeDraw(Graphics *const graphics)
StaticBrowserBox * mVersionLabel
void handleLink(const std::string &link, MouseEvent *event)
Color mBackgroundGrayColor
void widgetResized(const Event &event)
virtual void drawImage(const Image *const image, int dstX, int dstY)=0
virtual void fillRectangle(const Rect &rectangle)=0
virtual void setColor(const Color &color)
virtual void drawRescaledImage(const Image *const image, int dstX, int dstY, const int desiredWidth, const int desiredHeight)=0
virtual RenderType useOpenGL() const
void log(const char *const log_text,...)
int getOption(const std::string &name) const
void addRow(const std::string &row, const bool atTop)
void setLinkHandler(LinkHandler *linkHandler)
void unload(Skin *const skin)
static std::string getThemePath()
Skin * load(const std::string &filename, const std::string &filename2, const bool full, const std::string &defaultPath)
static Image * getImageFromTheme(const std::string &path)
static void loadWallpapers()
static std::string getWallpaper(const int width, const int height)
ImageHelper * imageHelper
Image * getRescaled(const Image *const image, const int width, const int height)
void decRefDelete(Resource *const res)
#define GLDEBUG_START(text)
#define BLOCK_START(name)
std::string strprintf(const char *const format,...)