 |

14.12.2014, 20:26
|
|
Познающий
Регистрация: 09.07.2014
Сообщений: 42
С нами:
6233649
Репутация:
0
|
|
Hello, I can't click on a Item...
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();
}
}
}
}

|
|
|

14.12.2014, 21:17
|
|
Познавший АНТИЧАТ
Регистрация: 09.03.2013
Сообщений: 1,771
С нами:
6935121
Репутация:
233
|
|
you need to and TwEventWin to win msg callback. like that:
Код:
Код:
LRESULT CALLBACK MessageProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
// Send event message to AntTweakBar
if( TwEventWin(wnd, msg, wParam, lParam) )
return 0; // Event has been handled by AntTweakBar
}
|
|
|

15.12.2014, 03:34
|
|
Познающий
Регистрация: 09.07.2014
Сообщений: 42
С нами:
6233649
Репутация:
0
|
|
Сообщение от FYP
you need to and TwEventWin to win msg callback. like that:
Код:
Код:
LRESULT CALLBACK MessageProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
// Send event message to AntTweakBar
if( TwEventWin(wnd, msg, wParam, lParam) )
return 0; // Event has been handled by AntTweakBar
}
Hello, the function "TwEventWin" does not exist in the 1.16 Version.
|
|
|

15.12.2014, 17:22
|
|
Участник форума
Регистрация: 18.03.2013
Сообщений: 102
С нами:
6921984
Репутация:
183
|
|
Сообщение от Uztor
Hello, the function "TwEventWin" does not exist in the 1.16 Version.
Use a AntTweakBar from s0beit 0.3c.
I'm use this code:
Код:
Код:
static LRESULT __stdcall OnWindowMsg(HWND wnd, UINT umsg, WPARAM wparam, LPARAM lparam)
{
if (TwEventWin(wnd, umsg, wparam, lparam))
return 0;
return CallWindowProc(!orig_wndproc!, wnd, umsg, wparam, lparam);
}
CWndHook::CWndHook(HWND wnd)
{
orig_wndproc = (WNDPROC)(UINT_PTR)SetWindowLong(wnd, GWL_WNDPROC, (LONG)(UINT_PTR)OnWindowMsg);
orig_wnd = wnd;
}
CWndHook::~CWndHook()
{
SetWindowLong(orig_wnd, GWL_WNDPROC, (LONG)(UINT_PTR)orig_wndproc);
orig_wnd = NULL;
}
|
|
|

18.12.2014, 01:55
|
|
Познающий
Регистрация: 09.07.2014
Сообщений: 42
С нами:
6233649
Репутация:
0
|
|
Сообщение от povargek
Use a AntTweakBar from s0beit 0.3c.
Can you send me the link please?
|
|
|

18.12.2014, 02:56
|
|
Флудер
Регистрация: 18.03.2013
Сообщений: 4,080
С нами:
6921957
Репутация:
183
|
|
|
|
|

18.12.2014, 09:54
|
|
Познающий
Регистрация: 09.07.2014
Сообщений: 42
С нами:
6233649
Репутация:
0
|
|
I mean S0beit 0.3c source with anttweakbar. 
|
|
|

18.12.2014, 14:07
|
|
Флудер
Регистрация: 18.03.2013
Сообщений: 4,080
С нами:
6921957
Репутация:
183
|
|
Сообщение от Uztor
I mean S0beit 0.3c source with anttweakbar.
And?
|
|
|

18.12.2014, 17:25
|
|
Познающий
Регистрация: 09.07.2014
Сообщений: 42
С нами:
6233649
Репутация:
0
|
|
Сообщение от Dark_Knight
And?
what end? I need the sobeit 0.3c source with anttweakbar... please.
/edit: found
|
|
|
|
 |
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|