Raised This Month: $ Target: $400
 0% 

Categories in menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShufflexDD
Senior Member
Join Date: Apr 2011
Location: :noitaɔo˩
Old 09-04-2013 , 01:17   Categories in menu
Reply With Quote #1

I'm trying to make a menu(panel, whatever...) with categories like in admin menu.
I know it's simple to do it just by creating a menu by choosing an item; but the thing is that there's no back button to previous menu(am I wrong?).

I tried to check how admin menu works, it's topmenus but adminmenu.sp was too messy to find out how it works
__________________

⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈
Check this website and find out how many functions
it has working with game server together.

Last edited by ShufflexDD; 09-04-2013 at 01:17.
ShufflexDD is offline
Send a message via ICQ to ShufflexDD Send a message via Skype™ to ShufflexDD
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 09-04-2013 , 02:05   Re: Categories in menu
Reply With Quote #2

You'd want to incorporate SetMenuExitBackButton, then in the menu's callback check for when action == MenuAction_Cancel and param2 == MenuCancel_ExitBack. As long as the client is still in-game (IsClientInGame(param1)) you can then show them your plugin's previous menu.
__________________
11530 is offline
ShufflexDD
Senior Member
Join Date: Apr 2011
Location: :noitaɔo˩
Old 09-04-2013 , 02:11   Re: Categories in menu
Reply With Quote #3

Quote:
Originally Posted by 11530 View Post
You'd want to incorporate SetMenuExitBackButton, then in the menu's callback check for when action == MenuAction_Cancel and param2 == MenuCancel_ExitBack. As long as the client is still in-game (IsClientInGame(param1)) you can then show them your plugin's previous menu.
Thank you, didn't really think about it
__________________

⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈
Check this website and find out how many functions
it has working with game server together.
ShufflexDD is offline
Send a message via ICQ to ShufflexDD Send a message via Skype™ to ShufflexDD
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-04-2013 , 13:12   Re: Categories in menu
Reply With Quote #4

In theory, you can also use the TopMenus system to make multi-level menus, but it's generally only used by the Admin Menu system.

It's easier to use standard menus ExitBack. Which reminds me, I was working on an update to the SourceMod Menu Generator and I don't think I ever finished it. One of the changes was to improve support for adding an ExitBack option. I should dig out the source code and see what I haven't finished yet. Once I'm actually at home, that is.

(Have I mentioned I'm working on too much SM stuff at once?)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 09-04-2013 at 13:32.
Powerlord is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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