void Scroll(int x, int y, int& Var, const char** typ, int max, const char* text, LPDIRECT3DDEVICE9 pDevice)
{
int color = D3DCOLOR_ARGB(255, 190, 190, 190);
FilledBox(x + 12, y + 2, 345-42-5, 19, D3DCOLOR_ARGB(255, 40, 40, 40), pDevice);
if (IsInBox(x + 12, y + 2, 345-42, 19))
{
color = D3DCOLOR_ARGB(255, 190, 190, 190);
FilledBox(x + 12, y + 2, 345-42-5, 19, D3DCOLOR_ARGB(255, 0, 132, 205), pDevice); //цвет сделать синим
}
//----Рисуем кнопку "<<"(OFF)-----
StringBroder(x + 260-42, y + 3, D3DCOLOR_ARGB(255, 255, 0, 0), LText, "<<");
//----Рисуем кнопку ">>"(ON)-----
StringBroder(x + 335-42, y + 3, D3DCOLOR_ARGB(255, 255, 0, 0), LText, ">>");
if (IsInBox(x + 260 - 42, y + 3, 10, 10))//
{
//StringBroder(x + 260-22, y + 3, D3DCOLOR_ARGB(255, 255, 0, 0), LText, "<<");
if (sTools->KeyPressed(VK_LBUTTON, 130))
{
if (Var != 0)
{
Var--;
}
}
}
if (IsInBox(x + 335 - 42, y + 3, 10, 10))
{
// StringBroder(x + 335 - 42 - 20, y + 3, D3DCOLOR_ARGB(255, 255, 0, 0), LText, ">>");
if (sTools->KeyPressed(VK_LBUTTON, 130))
{
if (Var >= 0 && Var < max)
{
Var++;
}
}
}
StringBroder(x + 303 - 40, y + 3, D3DCOLOR_ARGB(255, 190, 190, 190), DT_CENTER | DT_NOCLIP, typ[Var]);
StringBroder(x + 15 , y + 3, D3DCOLOR_ARGB(255, 190, 190, 190), LText, text);
}
void CheckJ(int x, int y, char *BText, int &Var, LPDIRECT3DDEVICE9 pD3D9)
{
D3DCOLOR Back = D3DCOLOR_ARGB(255, 40, 40, 40);
D3DCOLOR Back2 = D3DCOLOR_ARGB(255, 58, 58, 58);
D3DCOLOR c = D3DCOLOR_ARGB(255, 255, 0, 0);;
Border(x - 1, y - 1, 296 + 1, 17 + 1, 1, Back2, pD3D9);
if (IsInBox(x, y, 296, 17))
{
Back = D3DCOLOR_ARGB(255, 0, 132, 205);
}
if (IsInBox(x + 156 + 115, y, 20, 15))
{
if (GetAsyncKeyState(VK_LBUTTON) & 1)
{
Var = 1;
}
}
if (IsInBox(x + 156 + 70, y, 20, 15))
{
if (GetAsyncKeyState(VK_LBUTTON) & 1)
{
Var = 0;
}
}
Box(x, y, 296, 17, Back, pD3D9);
if (Var) { Text("ON", x + 156 + 112, y, D3DCOLOR_ARGB(255, 190, 190, 190), DT_RIGHT | DT_NOCLIP); }
else { Text("OFF", x + 156 + 112, y, D3DCOLOR_ARGB(255, 190, 190, 190), DT_RIGHT | DT_NOCLIP); }
Text(BText, x + 10, y, D3DCOLOR_ARGB(255, 190, 190, 190), DT_LEFT | DT_NOCLIP);
Text(">>", x + 156 + 130, y, c, DT_RIGHT | DT_NOCLIP);
Text("<<", x + 156 + 90, y, c, DT_RIGHT | DT_NOCLIP);
}
void ButtonJ(int x, int y, char *BText, bool &Var, LPDIRECT3DDEVICE9 pD3D9)
{
D3DCOLOR Bord_text = D3DCOLOR_ARGB(255, 0, 148, 255);
D3DCOLOR text_Activ = D3DCOLOR_ARGB(255, 128, 128, 128);
if (IsInBox(x, y, 156, 20))
{
Box(x - 1, y, 3, 20, D3DCOLOR_ARGB(255, 255, 0, 0), pD3D9);
Box(x + 156 - 1, y, 3, 20, D3DCOLOR_ARGB(255, 255, 0, 0), pD3D9);
Bord_text = text_Activ = D3DCOLOR_ARGB(255, 255, 0, 0);
if (GetAsyncKeyState(VK_LBUTTON) & 1)
{
Menu_Weapon = Menu_ESP = Menu_AIMS = Menu_Player = 0;
Var = !Var;
}
}
Box(x - 1, y, 3, 20, D3DCOLOR_ARGB(255, 0, 148, 255), pD3D9);
Box(x + 156 - 1, y, 3, 20, D3DCOLOR_ARGB(255, 0, 148, 255), pD3D9);
Border(x - 1, y, 156 + 2, 20, 1, D3DCOLOR_ARGB(150, 000, 000, 000), pD3D9);
Border(x + 2, y, 152, 20, 1, D3DCOLOR_ARGB(150, 000, 000, 000), pD3D9);
if (Var)
{
Box(x - 1, y, 3, 20, D3DCOLOR_ARGB(255, 255, 0, 0), pD3D9);
Box(x + 156 - 1, y, 3, 20, D3DCOLOR_ARGB(255, 255, 0, 0), pD3D9);
Bord_text = text_Activ = D3DCOLOR_ARGB(255, 255, 0, 0);
}
Text(BText, x + (156 / 2), y, Bord_text, DT_CENTER | DT_NOCLIP);
}
void DrawMenu(LPDIRECT3DDEVICE9 pD3D9)
{
Box(x + 50, y + 50, 160, 100 + 100, New, pD3D9);
Border(x + 50, y + 50, 160, 100 + 99, 1, BLACK, pD3D9);
Border(x - 1 + 50, y - 1 + 50, 160, 100 - 1 + 100, 1, D3DCOLOR_ARGB(255, 0, 148, 255), pD3D9);
Border(x - 2 + 50, y - 2 + 50, 160 + 2, 100 + 1 + 100, 1, BLACK, pD3D9);
}
void DrawMenu2(LPDIRECT3DDEVICE9 pD3D9)
{
Box(x + 50 + 170, y + 50, 300, 200 + 100, New, pD3D9);
Border(x + 50 + 170, y + 50, 300, 200 + 99, 1, BLACK, pD3D9);
Border(x - 1 + 50 + 170, y - 1 + 50, 300, 200 - 1 + 100, 1, D3DCOLOR_ARGB(255, 0, 148, 255), pD3D9);
Border(x - 2 + 50 + 170, y - 2 + 50, 300 + 2, 200 + 1 + 100, 1, BLACK, pD3D9);
}