AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   Menu.AddItem Formatting (https://forums.alliedmods.net/showthread.php?t=310869)

Spirit_12 09-24-2018 21:00

Re: Menu.AddItem Formatting
 
Quote:

Originally Posted by ddhoward (Post 2616659)
You say you're with him, but then you immediately disagree with him? He claimed that the snippet in the OP was a good alternative to a Format call.

Format-class functions exist across Sourcemod. From the various PrintTo*() functions, KickClient, ServerCommand, ClientCommand, ShowActivity, BuildPath, the logging functions, etc are all examples of this. We combine the formatting into the function for convenience.

There is an ongoing discussion in the Sourcemod Discord/IRC server about this, and the potential issues.

Wait a min! I thought crasher was saying just use format with menu.AddItem native. Would that not be equivalent to adding a new native?

ThatKidWhoGames 09-25-2018 07:51

Re: Menu.AddItem Formatting
 
I really hope that this can be added as a stock native function for SourceMod. There should be formatting (in my opinion) for adding items by default considering that menu.SetTitle allows for formatting.

asherkin 10-21-2018 19:13

Re: Menu.AddItem Formatting
 
Quote:

Originally Posted by Powerlord (Post 2616661)
I always assumed they aren't there to encourage you to use the Menu callback with MenuAction_Display (with SetPanelTitle) and MenuAction_DisplayItem (with RedrawMenuItem) to translate the menu text on a per-user basis.

This is correct.


All times are GMT -4. The time now is 23:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.