本文整理汇总了C++中CG_EventHandling函数的典型用法代码示例。如果您正苦于以下问题:C++ CG_EventHandling函数的具体用法?C++ CG_EventHandling怎么用?C++ CG_EventHandling使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CG_EventHandling函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CG_LimboMenu_f
void CG_LimboMenu_f( void ) {
if( cg.showGameView ) {
CG_EventHandling( CGAME_EVENT_NONE, qfalse );
} else {
CG_EventHandling( CGAME_EVENT_GAMEVIEW, qfalse );
}
}
示例2: CG_QuickFireteams_f
static void CG_QuickFireteams_f( void ) {
if( cg.showFireteamMenu ) {
if( cgs.ftMenuMode == 0 ) {
CG_EventHandling( CGAME_EVENT_NONE, qfalse );
} else {
cgs.ftMenuMode = 0;
}
} else if( CG_IsOnFireteam( cg.clientNum ) ) {
CG_EventHandling( CGAME_EVENT_FIRETEAMMSG, qfalse );
cgs.ftMenuMode = 0;
}
}
示例3: CG_QuickFireteamAdmin_f
void CG_QuickFireteamAdmin_f( void ) {
trap_UI_Popup( UIMENU_NONE );
if( cg.showFireteamMenu ) {
if( cgs.ftMenuMode == 1 ) {
CG_EventHandling( CGAME_EVENT_NONE, qfalse );
} else {
cgs.ftMenuMode = 1;
}
} else if( cgs.clientinfo[ cg.clientNum ].team != TEAM_SPECTATOR ) {
CG_EventHandling( CGAME_EVENT_FIRETEAMMSG, qfalse );
cgs.ftMenuMode = 1;
}
}
示例4: vmMain
/*
================
vmMain
This is the only way control passes into the module.
This must be the very first function compiled into the .q3vm file
================
*/
Q_EXPORT intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11 ) {
switch ( command ) {
case CG_INIT:
CG_Init( arg0, arg1, arg2 );
return 0;
case CG_SHUTDOWN:
CG_Shutdown();
return 0;
case CG_CONSOLE_COMMAND:
return CG_ConsoleCommand();
case CG_DRAW_ACTIVE_FRAME:
CG_DrawActiveFrame( arg0, arg1, arg2 );
return 0;
case CG_CROSSHAIR_PLAYER:
return CG_CrosshairPlayer();
case CG_LAST_ATTACKER:
return CG_LastAttacker();
case CG_KEY_EVENT:
CG_KeyEvent(arg0, arg1);
return 0;
case CG_MOUSE_EVENT:
CG_MouseEvent(arg0, arg1);
return 0;
case CG_EVENT_HANDLING:
CG_EventHandling(arg0);
return 0;
default:
CG_Error( "vmMain: unknown command %i", command );
break;
}
return -1;
}
示例5: CG_LoadPanel_ContinueButtonKeyDown
qboolean CG_LoadPanel_ContinueButtonKeyDown( panel_button_t* button, int key ) {
if( key == K_MOUSE1 ) {
CG_EventHandling( CGAME_EVENT_GAMEVIEW, qfalse );
return qtrue;
}
return qfalse;
}
示例6: CG_keyOff_f
void CG_keyOff_f(void)
{
if (!cg.demoPlayback)
{
return;
}
CG_EventHandling(CGAME_EVENT_NONE, qfalse);
}
示例7: CG_mvToggleAll_f
// Toggle all views
void CG_mvToggleAll_f(void)
{
if (!cg.demoPlayback)
{
trap_SendClientCommand((cg.mvTotalClients > 0) ? "mvnone\n" : "mvall\n");
if (cg.mvTotalClients > 0)
{
CG_EventHandling(-CGAME_EVENT_MULTIVIEW, qfalse);
}
}
}
示例8: CG_KeyEvent
void CG_KeyEvent(int key, qboolean down) {
switch(cgs.eventHandling) {
// Demos get their own keys
case CGAME_EVENT_DEMO:
CG_DemoClick(key, down);
return;
case CGAME_EVENT_CAMPAIGNBREIFING:
CG_LoadPanel_KeyHandling( key, down );
break;
case CGAME_EVENT_FIRETEAMMSG:
CG_Fireteams_KeyHandling( key, down );
break;
case CGAME_EVENT_GAMEVIEW:
CG_LimboPanel_KeyHandling( key, down );
break;
case CGAME_EVENT_SPEAKEREDITOR:
CG_SpeakerEditor_KeyHandling( key, down );
break;
// forty - visual hud editor
case CGAME_EVENT_HUDEDITOR:
CG_HudEditor_KeyHandling( key, down );
break;
// forty - multiview key handler
case CGAME_EVENT_MULTIVIEW:
CG_mv_KeyHandling( key, down );
break;
default:
if( cg.snap->ps.pm_type == PM_INTERMISSION ) {
CG_Debriefing_KeyEvent( key, down );
return;
}
// default handling
if( !down ) {
return;
}
if ( ( cg.predictedPlayerState.pm_type == PM_NORMAL ||
(cg.predictedPlayerState.pm_type == PM_SPECTATOR && cg.showScores == qfalse))) {
CG_EventHandling(CGAME_EVENT_NONE, qfalse);
return;
}
break;
}
}
示例9: CG_keyOn_f
void CG_keyOn_f(void)
{
if(!cg.demoPlayback) {
CG_Printf("[cgnotify]^3*** NOT PLAYING A DEMO!!\n");
return;
}
if(demo_infoWindow.integer > 0) {
CG_ShowHelp_On(&cg.demohelpWindow);
}
CG_EventHandling(CGAME_EVENT_DEMO, qtrue);
}
示例10: CG_QuickMessage_f
void CG_QuickMessage_f(void)
{
CG_EventHandling(CGAME_EVENT_NONE, qfalse);
if (cg_quickMessageAlt.integer)
{
trap_UI_Popup(UIMENU_WM_QUICKMESSAGEALT);
}
else
{
trap_UI_Popup(UIMENU_WM_QUICKMESSAGE);
}
}
示例11: CG_QuickFireteamMessage_f
void CG_QuickFireteamMessage_f( void ) {
if( cgs.clientinfo[ cg.clientNum ].team == TEAM_SPECTATOR ) {
return;
}
CG_EventHandling( CGAME_EVENT_NONE, qfalse );
if( cg_quickMessageAlt.integer ) {
trap_UI_Popup( UIMENU_WM_FTQUICKMESSAGEALT );
} else {
trap_UI_Popup( UIMENU_WM_FTQUICKMESSAGE );
}
}
示例12: CG_QuickMessage_f
void CG_QuickMessage_f( void ) {
if( cgs.clientinfo[ cg.clientNum ].team == TEAM_SPECTATOR &&
cgs.etpub < ETPUB_VERSION(0,7,0) ) {
return;
}
CG_EventHandling( CGAME_EVENT_NONE, qfalse );
if( cg_quickMessageAlt.integer ) {
trap_UI_Popup( UIMENU_WM_QUICKMESSAGEALT );
} else {
trap_UI_Popup( UIMENU_WM_QUICKMESSAGE );
}
}
示例13: CG_LimboPanel_KeyHandling
void CG_LimboPanel_KeyHandling(int key, qboolean down) {
int b1, b2;
if (BG_PanelButtonsKeyEvent(key, down, limboPanelButtons)) {
return;
}
if (down) {
cgDC.getKeysForBinding("openlimbomenu", &b1, &b2);
if ((b1 != -1 && b1 == key) || (b2 != -1 && b2 == key)) {
CG_EventHandling(CGAME_EVENT_NONE, qfalse);
return;
}
}
}
示例14: vmMain
/*
================
vmMain
This is the only way control passes into the module.
This must be the very first function compiled into the .q3vm file
================
*/
intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11 ) {
switch ( command ) {
case CG_INIT:
CG_Init( arg0, arg1, arg2, arg3 );
return 0;
case CG_SHUTDOWN:
CG_Shutdown();
return 0;
case CG_CONSOLE_COMMAND:
return CG_ConsoleCommand();
case CG_DRAW_ACTIVE_FRAME:
CG_DrawActiveFrame( arg0, arg1, arg2 );
return 0;
case CG_DRAW_2D:
CG_Draw2D( arg0, arg1, arg2 );
return 0;
case CG_CROSSHAIR_PLAYER:
return CG_CrosshairPlayer();
case CG_LAST_ATTACKER:
return CG_LastAttacker();
case CG_KEY_EVENT:
CG_KeyEvent(arg0, arg1);
return 0;
case CG_MOUSE_EVENT:
CG_MouseEvent(arg0, arg1);
return 0;
case CG_EVENT_HANDLING:
CG_EventHandling(arg0);
return 0;
case CG_CENTERPRINT:
CG_CenterPrint( (const char*)arg0, 200, 10 );
return 0;
case CG_LOCATIONPRINT:
CG_LocationPrint( (const char*)arg0, arg1, arg2, 10 );
return 0;
case CG_PARSEMSG:
CG_ParseCGMessage();
return 0;
default:
CG_Error( "vmMain: unknown command %i", command );
break;
}
return -1;
}
示例15: CG_KeyEvent
void CG_KeyEvent(int key, qboolean down) {
if (!down) {
return;
}
if ( CG_ChatboxActive() ) {
if ( key == K_ENTER ||
key == K_KP_ENTER ) CG_ChatboxOutgoing();
else if ( key == K_TAB ) CG_ChatboxTabComplete();
else if ( key == K_PGDN ) CG_ChatboxScroll( 0 );
else if ( key == K_PGUP ) CG_ChatboxScroll( 1 );
else if ( key == K_UPARROW ) CG_ChatboxHistoryUp();
else if ( key == K_DOWNARROW ) CG_ChatboxHistoryDn();
else if ( key == K_BACKSPACE ) CG_ChatboxClear();
else if ( key == K_ESCAPE ) CG_ChatboxEscape();
else if ( key & K_CHAR_FLAG ) CG_ChatboxChar( (char)(key & ~K_CHAR_FLAG) );
return;
}
if ( cg.predictedPlayerState.pm_type == PM_NORMAL || (cg.predictedPlayerState.pm_type == PM_SPECTATOR && cg.showScores == qfalse)) {
CG_EventHandling(CGAME_EVENT_NONE);
trap->Key_SetCatcher(0);
return;
}
//if (key == trap->Key_GetKey("teamMenu") || !Display_CaptureItem(cgs.cursorX, cgs.cursorY)) {
// if we see this then we should always be visible
// CG_EventHandling(CGAME_EVENT_NONE);
// trap->Key_SetCatcher(0);
//}
Display_HandleKey(key, down, (int)cgs.cursorX, (int)cgs.cursorY);
if (cgs.capturedItem) {
cgs.capturedItem = NULL;
} else {
if (key == K_MOUSE2 && down) {
cgs.capturedItem = Display_CaptureItem((int)cgs.cursorX, (int)cgs.cursorY);
}
}
}