2019-12-08 15:00:36 +04:00
|
|
|
#pragma once
|
|
|
|
|
2019-12-09 15:37:40 +03:00
|
|
|
//This library containing function and structure for buttons
|
|
|
|
|
2019-12-08 15:00:36 +04:00
|
|
|
struct Button {
|
|
|
|
RECT coords;
|
|
|
|
const char* text;
|
|
|
|
HDC picture;
|
|
|
|
};
|
|
|
|
|
|
|
|
void drawButton(Button but);
|
|
|
|
|
2019-12-13 14:59:48 +03:00
|
|
|
//function for drawing button
|
2019-12-08 15:00:36 +04:00
|
|
|
void drawButton(Button but)
|
|
|
|
{
|
|
|
|
//drawing button
|
|
|
|
txRectangle(but.coords.left,
|
|
|
|
but.coords.top,
|
|
|
|
but.coords.right,
|
|
|
|
but.coords.bottom);
|
|
|
|
|
|
|
|
//drawing text
|
|
|
|
txDrawText (but.coords.left,
|
|
|
|
but.coords.top,
|
|
|
|
but.coords.right,
|
|
|
|
but.coords.bottom,
|
|
|
|
but.text,
|
|
|
|
DT_CENTER | DT_VCENTER);
|
|
|
|
}
|
|
|
|
|