void menu::ComboList(char ** var, int x, int y, int width, int function, int maxval, LPDIRECT3DDEVICE9 pDevice)
{
//Current item
int Item = 0;
//Get the cursor position
GetCursorPos(&Cursor);
sprintf_s(Text, "%s", var[function]);
char Option1[256];
char Option2[256];
char Option3[256];
char Option4[256];
char Option5[256];
char Option6[256];
Box(x, y, width, 18, ComboBox_back, pDevice);
Rectangle(x, y, width, 18, ComboBox_rect, pDevice);
DrawString(Text, x + (width / 2), y + 3, ComboBox_text, 1, pFont);
DrawString("*", x + (width - 10), y + 3, ComboBox_text, 1, pFont);
if(Cursor.x < x + width && Cursor.x > x + (width - 10) && Cursor.y < y + 18 && Cursor.y > y)
{
if(MouseClick(VK_LBUTTON))
{
if(List < 1)
{
List++;
}else{
List--;
}
}
}
if(Cursor.x > x && Cursor.x < x + width)
{
if(Cursor.y > y + 38 && Cursor.y < x + 58)
{
Item = 1;
}
if(Cursor.y > y + 58 && Cursor.y < x + 78)
{
Item = 2;
}
if(Cursor.y > y + 78 && Cursor.y < x + 98)
{
Item = 3;
}
if(Cursor.y > y + 98 && Cursor.y < x + 118)
{
Item = 4;
}
if(Cursor.y > y + 118 && Cursor.y < x + 138)
{
Item = 5;
}
if(Cursor.y > y + 138 && Cursor.y < x + 158)
{
Item = 6;
}
}
if(List)
{
Box(x + 20, y + 18, 120 + width, 140, ComboBox_rect, pDevice);
Box(x + 20, y + (Item * 20) + 24, 120 + width, 16, Black, pDevice);
DrawString("*", x + (width - 10), y + 3, ComboBox_text, 1, pFont);
if(maxval == 1)
sprintf_s(Option1, "%s", var[1]);
DrawString(Option1, x + 30, y + 28, ComboBox_text, 2, pFont);
if(maxval == 2)
sprintf_s(Option2, "%s", var[2]);
DrawString(Option2, x + 30, y + 48, ComboBox_text, 2, pFont);
if(maxval == 3)
sprintf_s(Option3, "%s", var[3]);
DrawString(Option3, x + 30, y + 68, ComboBox_text, 2, pFont);
if(maxval == 4)
sprintf_s(Option4, "%s", var[4]);
DrawString(Option4, x + 30, y + 88, ComboBox_text, 2, pFont);
if(maxval == 5)
sprintf_s(Option5, "%s", var[5]);
DrawString(Option5, x + 30, y + 108, ComboBox_text, 2, pFont);
if(maxval == 6)
sprintf_s(Option6, "%s", var[6]);
DrawString(Option6, x + 30, y + 128, ComboBox_text, 2, pFont);
if(maxval > 6)
cTools->Message("The size of the operant (var) cannot exceed the 6 numbers limitation!", "ERROR");
}
}
KARDO BUNU BASEYE YAZDIM HATA YOK ŞİMDİ BUNU NASI ÇİZDİRİRİM ?
Exbrowser Bakarmısın
GÜNCEL !!!!!!!!!!!!
GÜNCEL BEYLER BİLEN YOKMU
{
//Current item
int Item = 0;
//Get the cursor position
GetCursorPos(&Cursor);
sprintf_s(Text, "%s", var[function]);
char Option1[256];
char Option2[256];
char Option3[256];
char Option4[256];
char Option5[256];
char Option6[256];
Box(x, y, width, 18, ComboBox_back, pDevice);
Rectangle(x, y, width, 18, ComboBox_rect, pDevice);
DrawString(Text, x + (width / 2), y + 3, ComboBox_text, 1, pFont);
DrawString("*", x + (width - 10), y + 3, ComboBox_text, 1, pFont);
if(Cursor.x < x + width && Cursor.x > x + (width - 10) && Cursor.y < y + 18 && Cursor.y > y)
{
if(MouseClick(VK_LBUTTON))
{
if(List < 1)
{
List++;
}else{
List--;
}
}
}
if(Cursor.x > x && Cursor.x < x + width)
{
if(Cursor.y > y + 38 && Cursor.y < x + 58)
{
Item = 1;
}
if(Cursor.y > y + 58 && Cursor.y < x + 78)
{
Item = 2;
}
if(Cursor.y > y + 78 && Cursor.y < x + 98)
{
Item = 3;
}
if(Cursor.y > y + 98 && Cursor.y < x + 118)
{
Item = 4;
}
if(Cursor.y > y + 118 && Cursor.y < x + 138)
{
Item = 5;
}
if(Cursor.y > y + 138 && Cursor.y < x + 158)
{
Item = 6;
}
}
if(List)
{
Box(x + 20, y + 18, 120 + width, 140, ComboBox_rect, pDevice);
Box(x + 20, y + (Item * 20) + 24, 120 + width, 16, Black, pDevice);
DrawString("*", x + (width - 10), y + 3, ComboBox_text, 1, pFont);
if(maxval == 1)
sprintf_s(Option1, "%s", var[1]);
DrawString(Option1, x + 30, y + 28, ComboBox_text, 2, pFont);
if(maxval == 2)
sprintf_s(Option2, "%s", var[2]);
DrawString(Option2, x + 30, y + 48, ComboBox_text, 2, pFont);
if(maxval == 3)
sprintf_s(Option3, "%s", var[3]);
DrawString(Option3, x + 30, y + 68, ComboBox_text, 2, pFont);
if(maxval == 4)
sprintf_s(Option4, "%s", var[4]);
DrawString(Option4, x + 30, y + 88, ComboBox_text, 2, pFont);
if(maxval == 5)
sprintf_s(Option5, "%s", var[5]);
DrawString(Option5, x + 30, y + 108, ComboBox_text, 2, pFont);
if(maxval == 6)
sprintf_s(Option6, "%s", var[6]);
DrawString(Option6, x + 30, y + 128, ComboBox_text, 2, pFont);
if(maxval > 6)
cTools->Message("The size of the operant (var) cannot exceed the 6 numbers limitation!", "ERROR");
}
}
KARDO BUNU BASEYE YAZDIM HATA YOK ŞİMDİ BUNU NASI ÇİZDİRİRİM ?
Exbrowser Bakarmısın
GÜNCEL !!!!!!!!!!!!
GÜNCEL BEYLER BİLEN YOKMU