adminmenu now loads config file
removed debug line --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401596
This commit is contained in:
parent
4bb433b17c
commit
10042990ba
@ -75,6 +75,20 @@ public OnPluginStart()
|
|||||||
RegAdminCmd("sm_admin", Command_DisplayMenu, ADMFLAG_GENERIC, "sm_admin");
|
RegAdminCmd("sm_admin", Command_DisplayMenu, ADMFLAG_GENERIC, "sm_admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OnConfigsExecuted()
|
||||||
|
{
|
||||||
|
decl String:path[PLATFORM_MAX_PATH];
|
||||||
|
decl String:error[256];
|
||||||
|
|
||||||
|
BuildPath(Path_SM, path, sizeof(path), "configs/adminmenu_sorting.txt");
|
||||||
|
|
||||||
|
if (!LoadTopMenuConfig(hAdminMenu, path, error, sizeof(error)))
|
||||||
|
{
|
||||||
|
LogError("Could not load admin menu config (file \"%s\": %s)", path, error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public OnAllPluginsLoaded()
|
public OnAllPluginsLoaded()
|
||||||
{
|
{
|
||||||
hAdminMenu = CreateTopMenu(CategoryHandler);
|
hAdminMenu = CreateTopMenu(CategoryHandler);
|
||||||
@ -113,7 +127,6 @@ public CategoryHandler(Handle:topmenu,
|
|||||||
String:buffer[],
|
String:buffer[],
|
||||||
maxlength)
|
maxlength)
|
||||||
{
|
{
|
||||||
PrintToServer("CategoryHandler(%x, %d, %x)", topmenu, action, object_id);
|
|
||||||
if (action == TopMenuAction_DisplayTitle)
|
if (action == TopMenuAction_DisplayTitle)
|
||||||
{
|
{
|
||||||
if (object_id == INVALID_TOPMENUOBJECT)
|
if (object_id == INVALID_TOPMENUOBJECT)
|
||||||
|
Loading…
Reference in New Issue
Block a user