39 addWidgetListener(
this);
51 mVersionLabel->setBackgroundColor(gcn::Color(255, 255, 255, 128));
76 getWidth(), getHeight(),
false);
84 g->setColor(gcn::Color(255, 255, 255, 128));
92 const int width = getWidth();
93 const int height = getHeight();
95 if (width == 0 || height == 0)
100 if (wallpaperName.empty())
104 auto wallpaper = resman->
getImage(wallpaperName);
112 Log::info(
"Couldn't load %s as wallpaper", wallpaperName.c_str());
std::string getValue(const std::string &key, const std::string &deflt) const
Gets a value as string.
void setBestFittingWallpaper()
void reloadWallpaper()
Has to be called after updates have been loaded.
gcn::Label * mVersionLabel
ResourceRef< Image > mWallpaper
void draw(gcn::Graphics *graphics) override
void widgetResized(const gcn::Event &) override
A central point of control for graphics.
bool drawRescaledImage(const Image *image, int x, int y, int width, int height)
Draws a rescaled version of the image.
Theme * getTheme() const
The global GUI theme.
int getHeight() const
Returns the height of the image.
int getWidth() const
Returns the width of the image.
A class for loading and managing resources.
static ResourceManager * getInstance()
Returns an instance of the class, creating one if it does not already exist.
ResourceRef< Image > getImage(const std::string &idPath)
Loads the Image resource found at the given identifier path.
void drawSkin(Graphics *graphics, SkinType type, const WidgetState &state) const
static void loadWallpapers()
Reads the folder that contains wallpapers and organizes the wallpapers found by area,...
static std::string getWallpaper(int width, int height)
Returns the largest wallpaper for the given resolution, or the default wallpaper if none are found.
Configuration branding
XML branding information reader.
void info(const char *log_text,...) LOG_PRINTF_ATTR
std::string strprintf(char const *format,...)
A safe version of sprintf that returns a std::string of the result.