added new tool
This commit is contained in:
1 parent
b5085fd11f
commit
a4eb5689a6
2 files changed
+13
No files matched your search
@@ -205,5 +205,8 @@ QString movementToString(int movement);
|
|||||||
// swatch at row 137+kind (DarkGradient), ending in a black L-shaped border.
|
// swatch at row 137+kind (DarkGradient), ending in a black L-shaped border.
|
||||||
void lightGradient(Dpi::Canvas &canvas, int x, int y, int width, QColor color);
|
void lightGradient(Dpi::Canvas &canvas, int x, int y, int width, QColor color);
|
||||||
void darkGradient(Dpi::Canvas &canvas, int x, int y, int width, int kind);
|
void darkGradient(Dpi::Canvas &canvas, int x, int y, int width, int kind);
|
||||||
|
// ScreenTools.pas's NumberBar(): a labeled stat row (title + DLine divider
|
||||||
|
// + right-aligned number), skipped entirely if val <= 0.
|
||||||
|
void numberBar(Dpi::Canvas &canvas, int x, int y, const QString &cap, int val, const Texture &texture);
|
||||||
|
|
||||||
} // namespace Cevo
|
} // namespace Cevo
|
||||||
@@ -755,4 +755,14 @@ void darkGradient(Dpi::Canvas &canvas, int x, int y, int width, int kind)
|
|||||||
gradient(canvas, x, y, 0, 1, width, 0, color, brightness);
|
gradient(canvas, x, y, 0, 1, width, 0, color, brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void numberBar(Dpi::Canvas &canvas, int x, int y, const QString &cap, int val, const Texture &texture)
|
||||||
|
{
|
||||||
|
if (val <= 0)
|
||||||
|
return;
|
||||||
|
dLine(canvas, x - 2, x + 170, y + 16, texture.colorBevelShade, texture.colorBevelLight);
|
||||||
|
loweredTextOut(canvas, -1, texture, x - 2, y, cap);
|
||||||
|
const QString s = QString::number(val);
|
||||||
|
risedTextOut(canvas, x + 170 - biColorTextWidth(canvas, s), y, s);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Cevo
|
} // namespace Cevo
|
||||||
Reference in new issue
Block a user