added missing implementation
This commit is contained in:
1 parent
f2e81f268c
commit
371b18bd34
2 files changed
+23
No files matched your search
@@ -87,6 +87,16 @@ extern GraphicSet *HGrSystem;
|
|||||||
extern GraphicSet *HGrSystem2;
|
extern GraphicSet *HGrSystem2;
|
||||||
extern GraphicSet *Templates;
|
extern GraphicSet *Templates;
|
||||||
extern Dpi::Bitmap *Colors; // palette lookup bitmap, indexed by clkAge0/cli* below
|
extern Dpi::Bitmap *Colors; // palette lookup bitmap, indexed by clkAge0/cli* below
|
||||||
|
// ScreenTools.pas's "icons.bmp" sprite sheet (improvements/wonders, big
|
||||||
|
// size) + its per-icon slot size; also populated by app asset-loading.
|
||||||
|
extern Dpi::Bitmap *bigImp;
|
||||||
|
constexpr int xSizeBig = 56;
|
||||||
|
constexpr int ySizeBig = 40;
|
||||||
|
// Frames then blits an xSrc,ySrc/width,height region of src onto canvas at
|
||||||
|
// x,y - isControl selects the lighter "control" bevel over the plain
|
||||||
|
// black double-frame.
|
||||||
|
void frameImage(Dpi::Canvas &canvas, Dpi::Bitmap &src, int x, int y, int width, int height, int xSrc, int ySrc,
|
||||||
|
bool isControl = false);
|
||||||
|
|
||||||
// Colors palette row/column indices (Colors->image().pixelColor(col, row)).
|
// Colors palette row/column indices (Colors->image().pixelColor(col, row)).
|
||||||
constexpr int clkAge0 = 1;
|
constexpr int clkAge0 = 1;
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ GraphicSet *HGrSystem = nullptr;
|
|||||||
GraphicSet *HGrSystem2 = nullptr;
|
GraphicSet *HGrSystem2 = nullptr;
|
||||||
GraphicSet *Templates = nullptr;
|
GraphicSet *Templates = nullptr;
|
||||||
Dpi::Bitmap *Colors = nullptr;
|
Dpi::Bitmap *Colors = nullptr;
|
||||||
|
Dpi::Bitmap *bigImp = nullptr;
|
||||||
|
|
||||||
QColor colorFromDelphi(int value)
|
QColor colorFromDelphi(int value)
|
||||||
{
|
{
|
||||||
@@ -291,6 +292,18 @@ void btnFrame(Dpi::Canvas &canvas, const QRect &rect, const Texture &texture)
|
|||||||
texture.colorBevelShade, texture.colorBevelLight);
|
texture.colorBevelShade, texture.colorBevelLight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void frameImage(Dpi::Canvas &canvas, Dpi::Bitmap &src, int x, int y, int width, int height, int xSrc, int ySrc,
|
||||||
|
bool isControl)
|
||||||
|
{
|
||||||
|
if (isControl) {
|
||||||
|
frame(canvas, x - 1, y - 1, x + width, y + height, colorFromDelphi(0xB0B0B0), Qt::white);
|
||||||
|
rframe(canvas, x - 2, y - 2, x + width + 1, y + height + 1, Qt::white, colorFromDelphi(0xB0B0B0));
|
||||||
|
} else {
|
||||||
|
frame(canvas, x - 1, y - 1, x + width, y + height, Qt::black, Qt::black);
|
||||||
|
}
|
||||||
|
canvas.copyRect(QRect(x, y, width, height), src.canvas(), QRect(xSrc, ySrc, width, height));
|
||||||
|
}
|
||||||
|
|
||||||
void editFrame(Dpi::Canvas &canvas, const QRect &rect, const Texture &texture)
|
void editFrame(Dpi::Canvas &canvas, const QRect &rect, const Texture &texture)
|
||||||
{
|
{
|
||||||
frame(canvas, rect.left() - 1, rect.top() - 1, rect.right(), rect.bottom(), Qt::black, Qt::black);
|
frame(canvas, rect.left() - 1, rect.top() - 1, rect.right(), rect.bottom(), Qt::black, Qt::black);
|
||||||
|
|||||||
Reference in new issue
Block a user