コード例 #1
0
void JKG_PartyMngt_UpdateNotify(int msg) {
	// Gets called from CGame if there's an update
	// CAUTION: To use trap/UI calls, use the syscall override first!
	// Msg 0: New team/invite information
	// Msg 1: New seekers information
	// Msg 10: Open the team manager
	if (msg == 0) {
		if (!PMngtData.active) {
			return;
		}
		JKG_PartyMngt_UpdateState();
	} else if (msg == 1) {
		if (!PMngtData.active) {
			return;
		}
		JKG_PartyMngt_UpdateSeekers();
	} else if (msg == 10) {
		memset(&PMngtData, 0, sizeof(PMngtData));
		PMngtData.active = 1;
		if (Menus_ActivateByName("jkg_partymanagement"))
		{
			trap->Key_SetCatcher( trap->Key_GetCatcher() | KEYCATCH_UI & ~KEYCATCH_CONSOLE );			
		}
	}
}
コード例 #2
0
void PartyMngt_Script_OpenDlg(char **args) {
	// We just opened the dialog, inform the server and request updates
	PartyMngt_Dialog_Close();
	cgImports->SendClientCommand("~pmngt on");
	JKG_PartyMngt_UpdateState();
	// Request a new list
	PMngtData.seekerListPending = 1;
	cgImports->SendClientCommand(va("~pmngt partylistrefresh %i", *(int*)cgImports->PartyMngtDataRequest(PARTYREQUEST_SEEKERTIME)));
	trap->Cvar_Set("ui_hidehud", "1");
	PMngtData.active = 1;
}
コード例 #3
0
void JKG_PartyMngt_UpdateNotify(jkgPartyNotify_e msg) {
	// Gets called from CGame if there's an update
	// CAUTION: To use trap/UI calls, use the syscall override first!
	if (msg == PARTYNOTIFY_UPDATESTATE) {
		if (!PMngtData.active) {
			return;
		}
		JKG_PartyMngt_UpdateState();
	} else if (msg == PARTYNOTIFY_UPDATESEEKERS) {
		if (!PMngtData.active) {
			return;
		}
		JKG_PartyMngt_UpdateSeekers();
	} else if (msg == PARTYNOTIFY_OPEN) {
		memset(&PMngtData, 0, sizeof(PMngtData));
		PMngtData.active = 1;
		if (Menus_ActivateByName("jkg_partymanagement"))
		{
			trap->Key_SetCatcher( trap->Key_GetCatcher() | KEYCATCH_UI );
		}
	}
}