MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / CancelMenu

Method CancelMenu

core/MenuStyle_Base.cpp:115–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void BaseMenuStyle::CancelMenu(CBaseMenu *menu)
116{
117#if defined MENU_DEBUG
118 logger->LogMessage("[SM_MENU] CancelMenu() (menu %p)", menu);
119#endif
120 int maxClients = g_Players.GetMaxClients();
121 for (int i=1; i<=maxClients; i++)
122 {
123 CBaseMenuPlayer *player = GetMenuPlayer(i);
124 if (player->bInMenu)
125 {
126 menu_states_t &states = player->states;
127 if (states.menu == menu)
128 {
129 _CancelClientMenu(i, MenuCancel_Interrupted);
130 }
131 }
132 }
133}
134
135bool BaseMenuStyle::CancelClientMenu(int client, bool autoIgnore)
136{

Callers

nothing calls this directly

Calls 2

GetMaxClientsMethod · 0.80
LogMessageMethod · 0.45

Tested by

no test coverage detected