Revert adminmenu API changes.

This commit is contained in:
David Anderson
2014-12-12 10:10:46 -08:00
parent 5b69efe5d4
commit 61bf7de101
10 changed files with 44 additions and 9 deletions
+3 -1
View File
@@ -124,8 +124,10 @@ LoadBanReasons()
}
}
public OnAdminMenuReady(TopMenu topmenu)
public OnAdminMenuReady(Handle aTopMenu)
{
TopMenu topmenu = TopMenu.FromHandle(aTopMenu);
/* Block us from being called twice */
if (topmenu == hTopMenu)
{
+3 -1
View File
@@ -100,8 +100,10 @@ public OnPluginStart()
}
}
public OnAdminMenuReady(TopMenu topmenu)
public OnAdminMenuReady(Handle aTopMenu)
{
TopMenu topmenu = TopMenu.FromHandle(aTopMenu);
/* Block us from being called twice */
if (topmenu == hTopMenu)
{
+3 -1
View File
@@ -146,8 +146,10 @@ bool:IsClientAllowedToChangeCvar(client, const String:cvarname[])
return allowed;
}
public OnAdminMenuReady(TopMenu topmenu)
public OnAdminMenuReady(Handle aTopMenu)
{
TopMenu topmenu = TopMenu.FromHandle(aTopMenu);
/* Block us from being called twice */
if (topmenu == hTopMenu)
{
+3 -1
View File
@@ -132,8 +132,10 @@ public OnConfigsExecuted()
g_mapCount = LoadMapList(g_MapList);
}
public OnAdminMenuReady(TopMenu topmenu)
public OnAdminMenuReady(Handle aTopMenu)
{
TopMenu topmenu = TopMenu.FromHandle(aTopMenu);
/* Block us from being called twice */
if (topmenu == hTopMenu)
{
+3 -1
View File
@@ -258,8 +258,10 @@ public Action:Event_RoundEnd(Handle:event,const String:name[],bool:dontBroadcast
KillAllDrugs();
}
public OnAdminMenuReady(TopMenu topmenu)
public OnAdminMenuReady(Handle aTopMenu)
{
TopMenu topmenu = TopMenu.FromHandle(aTopMenu);
/* Block us from being called twice */
if (topmenu == hTopMenu)
{
+3 -1
View File
@@ -135,8 +135,10 @@ public OnPluginStart()
}
}
public OnAdminMenuReady(TopMenu topmenu)
public OnAdminMenuReady(Handle aTopMenu)
{
TopMenu topmenu = TopMenu.FromHandle(aTopMenu);
/* Block us from being called twice */
if (topmenu == hTopMenu)
{
+2 -2
View File
@@ -65,7 +65,7 @@
* @param topmenu Handle to the admin menu's TopMenu.
* @noreturn
*/
forward OnAdminMenuCreated(TopMenu topmenu);
forward OnAdminMenuCreated(Handle topmenu);
/**
* Called when the admin menu is ready to have items added.
@@ -73,7 +73,7 @@ forward OnAdminMenuCreated(TopMenu topmenu);
* @param topmenu Handle to the admin menu's TopMenu.
* @noreturn
*/
forward OnAdminMenuReady(TopMenu topmenu);
forward OnAdminMenuReady(Handle topmenu);
/**
* Retrieves the Handle to the admin top menu.
+5
View File
@@ -146,6 +146,11 @@ methodmap TopMenu < Handle
// @return A new TopMenu.
public native TopMenu(TopMenuHandler handler);
// Returns a TopMenu handle from a generic handle. If the given handle is
// a TopMenu, the handle is simply casted back. Otherwise, an error is
// raised.
public static native TopMenu FromHandle(Handle handle);
// Re-sorts the items in a TopMenu via a configuration file.
//
// The format of the configuration file should be a Valve Key-Values
+3 -1
View File
@@ -76,8 +76,10 @@ public OnPluginStart()
}
}
public OnAdminMenuReady(TopMenu topmenu)
public OnAdminMenuReady(Handle aTopMenu)
{
TopMenu topmenu = TopMenu.FromHandle(aTopMenu);
/* Block us from being called twice */
if (topmenu == hTopMenu)
{