new screen tools funcs

This commit is contained in:
Geoffray Levasseur committed 2026-11-03 16:11:48 +01:00
1 parent 4944243acb
commit c98576f0c1
2 files changed
+109

No files matched your search

+12
View File
@@ -182,6 +182,18 @@ void paintBackground(Dpi::Canvas &canvas, int left, int top, int width, int heig
// `growth` more pixels animating in (negative: shrinking), out of `max`.
void paintProgressBar(Dpi::Canvas &canvas, int kind, int x, int y, int pos, int growth, int max,
const Texture &texture);
// Same as paintProgressBar, but pos/growth/max are expressed relative to a
// `size`-pixel-wide bar instead of raw pixel counts; optionally draws a
// "complete" checkmark sprite when pos+growth reaches max.
void paintRelativeProgressBar(Dpi::Canvas &canvas, int kind, int x, int y, int size, int pos, int growth, int max,
bool indicateComplete, const Texture &texture);
// Darkens dst's [x,y,width,height) region to half brightness per channel.
void makeBlue(Dpi::Bitmap &dst, int x, int y, int width, int height);
// Converts dst's [x,y,width,height) region to a greyscale-derived red tint.
void makeRed(Dpi::Bitmap &dst, int x, int y, int width, int height);
// Draws a labelled HGrSystem icon-bar count (e.g. "Food +3") at (x,y),
// `val` icons wide (tens-icon then ones-icon), capped to fit within `w`.
void countBar(Dpi::Bitmap &dst, int x, int y, int w, int kind, const QString &cap, int val, const Texture &texture);
void biColorTextOut(Dpi::Canvas &canvas, QColor mainColor, QColor backColor, int x, int y, const QString &text);
int biColorTextWidth(Dpi::Canvas &canvas, const QString &text);