35 #include "render/graphics.h"
49 const std::string &skin,
50 const std::string &skinFill) :
57 mProgressToGo(progress),
58 mBackgroundColorToGo(),
61 mProgressPalette(backColor),
65 mSmoothProgress(true),
66 mSmoothColorChange(true),
100 "progressbar_fill.xml",
117 if (
mSkin !=
nullptr)
119 if (
theme !=
nullptr)
171 if (
mSkin ==
nullptr)
191 *
static_cast<float>(maxWidth));
194 if (width > maxWidth)
214 if (width > maxWidth)
237 if (image !=
nullptr)
241 graphics->
drawImage(image, textX, textY);
250 if (
mSkin ==
nullptr)
266 *
static_cast<float>(maxWidth));
269 if (width > maxWidth)
285 if (width > maxWidth)
308 if (image !=
nullptr)
312 graphics->
drawImage(image, textX, textY);
320 const float p = std::min(1.0F, std::max(0.0F, progress));
void generate(TextChunk &chunk)
int getWidth(const std::string &text) const
virtual void drawImage(const Image *const image, int dstX, int dstY)=0
virtual void drawTileCollection(const ImageCollection *const vertCol)=0
virtual void fillRectangle(const Rect &rectangle)=0
virtual void setColor(const Color &color)
virtual void finalize(ImageCollection *const col)
virtual void calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, const ImageRect &imgRect)=0
virtual void drawImageRect(const int x, const int y, const int w, const int h, const ImageRect &imgRect)=0
void removeDragged(const Widget *const widget)
unsigned int mFillPadding
void widgetMoved(const Event &event)
void draw(Graphics *const graphics)
void setProgress(const float progress)
void setPadding(unsigned int padding)
void setColor(const Color &color1, const Color &color2)
void widgetHidden(const Event &event)
void setBackgroundColor(const Color &color)
void setProgressPalette(const ProgressColorIdT progressPalette)
ProgressBar(const Widget2 *const widget, float progress, const int width, const int height, const ProgressColorIdT backColor, const std::string &skin, const std::string &skinFill)
ImageCollection * mVertexes
void widgetResized(const Event &event)
Color mBackgroundColorToGo
void safeDraw(Graphics *const graphics)
void setText(const std::string &str)
ProgressColorIdT mProgressPalette
int getOption(const std::string &name) const
const ImageRect & getBorder() const
void unload(Skin *const skin)
static std::string getThemePath()
static void unloadRect(const ImageRect &rect, const int start, const int end)
Skin * load(const std::string &filename, const std::string &filename2, const bool full, const std::string &defaultPath)
void loadRect(ImageRect &image, const std::string &name, const std::string &name2, const int start, const int end)
float getMinimumOpacity() const
static Color getProgressColor(const ProgressColorIdT type, const float progress)
#define BLOCK_START(name)
ProgressColorId ::T ProgressColorIdT