Hello, I can't click on a Item...
I use Anttweakbar + SAMPFUNCS API.
I use Anttweakbar + SAMPFUNCS API.
Код:
bool CALLBACK Present(CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
{
if (MenuActive == 1)
{
TwWindowSize(405, 235);
char menuParameters[512], buf[2048];
int i;
int BackBufferWidth, BackBufferHeight;
int iMainMenuPosX = BackBufferWidth / 2 - 400 / 2;
int iMainMenuPosY = BackBufferHeight - 275;
iMainMenuPosX = (BackBufferWidth / 2) - (405 / 2) - 150;
iMainMenuPosY = (BackBufferHeight / 2) - (235 / 2) - 150;
TwBar *twBar_Main;
twBar_Main = TwNewBar("test");
TwAddButton(twBar_Main, "GTA", NULL, NULL, NULL);
TwDraw();
}
}
Код:
void CALLBACK mainloop(void)
{
static bool init = false;
if (!init)
{
...
} else {
TwInit(TW_DIRECT3D9, SF->getRender()->getD3DDevice());
if (SF->getGame()->isKeyPressed(0x7A)) { //F11
if (MenuActive == 0) {
MenuActive = 1;
SF->getSAMP()->getMisc()->ToggleCursor(true);
}
else if (MenuActive == 1) {
MenuActive = 0;
SF->getSAMP()->getMisc()->ToggleCursor(false);
TwTerminate();
}
}
}
}
Последнее редактирование: