Add ability to disable TopMenu Title Caching (bug 6034, r=dvander).

This commit is contained in:
Peace-Maker
2014-05-09 12:30:52 -07:00
parent 5149205109
commit 530078b3ae
4 changed files with 73 additions and 10 deletions
+12
View File
@@ -258,6 +258,17 @@ native bool:DisplayTopMenu(Handle:topmenu, client, TopMenuPosition:position);
*/
native TopMenuObject:FindTopMenuCategory(Handle:topmenu, const String:name[]);
/**
* Change the menu title caching behaviour of the TopMenu. By default the titles are cached to reduce overhead.
* If you need dynamic menu titles, which can change everytime the menu is displayed to a user, set this to false.
*
* @param topmenu TopMenu Handle.
* @param cache_titles Cache the menu titles and don't call the handler with TopMenuAction_DisplayTitle everytime the menu is drawn?
* @noreturn
* @error Invalid TopMenu Handle
*/
native SetTopMenuTitleCaching(Handle:topmenu, bool:cache_titles);
/**
* Do not edit below this line!
*/
@@ -286,5 +297,6 @@ public __ext_topmenus_SetNTVOptional()
MarkNativeAsOptional("RemoveFromTopMenu");
MarkNativeAsOptional("DisplayTopMenu");
MarkNativeAsOptional("FindTopMenuCategory");
MarkNativeAsOptional("SetTopMenuTitleCaching");
}
#endif