Raised This Month: $51 Target: $400
 12% 

SourceMod Menu Generator (C# / .NET 2.0) (v1.0.0.1, 2013/04/05)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 01-24-2013 , 14:40   SourceMod Menu Generator (C# / .NET 2.0) (v1.0.0.1, 2013/04/05)
Reply With Quote #1

One thing I see a lot in SourceMod is plugin developers having trouble making menus for their plugins.

I saw the AMXX Menu Generator and it inspired me. If someone can create an AMXModX menu generator, why can't someone make a SourceMod Menu Generator?

So I did!







It's written in C# using Visual Studio 2010, but targets the .NET 2.0 framework rather than 4.0. Source code is licensed under GPLv3.

Special things:
  • Only menu items that are selectable will show up in the MenuAction_Select area.
  • Menu items marked No Text or Spacer will not show up in the MenuAction_DisplayItem area.
  • return 0; is added if Item Translation or Override Draw Styles is added. This prevents a compiler warning.
To do list:
  • Add support for Vote menus.
  • Errors need to be presented better.
  • Make comments optional in generated code
  • Improve UI
  • Make a real program icon instead of the generic "Visual Studio Program" icon.
Attached Files
File Type: zip SourceMod Menu Generator Installer.zip (208.2 KB, 1356 views)
File Type: zip SourceMod Menu Generator Source.zip (36.9 KB, 659 views)
File Type: zip SourceMod Menu Generator Program Only.zip (11.9 KB, 1521 views)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 07-04-2013 at 15:21.
Powerlord is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-24-2013 , 14:44   Re: SourceMod Menu Generator (C# / .NET 2.0)
Reply With Quote #2

The answer is: Lemon.
__________________
asherkin is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 01-24-2013 , 14:45   Re: SourceMod Menu Generator (C# / .NET 2.0)
Reply With Quote #3

Quote:
Originally Posted by asherkin View Post
The answer is: Lemon.
I thought I disabled the Ask Asherkin option.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 01-24-2013 at 14:45.
Powerlord is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 01-24-2013 , 15:07   Re: SourceMod Menu Generator (C# / .NET 2.0)
Reply With Quote #4

fkn amzing
__________________
retired
shavit is offline
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 01-24-2013 , 15:36   Re: SourceMod Menu Generator (C# / .NET 2.0)
Reply With Quote #5

I love you, Powerlord
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ is offline
Unreal1
AlliedModders Donor
Join Date: Dec 2010
Old 01-24-2013 , 16:17   Re: SourceMod Menu Generator (C# / .NET 2.0)
Reply With Quote #6

Ha very nice
Unreal1 is offline
AeroAcrobat
AlliedModders Donor
Join Date: Apr 2011
Location: lives in a circus
Old 01-24-2013 , 17:17   Re: SourceMod Menu Generator (C# / .NET 2.0)
Reply With Quote #7

this looks nice!
I have not gotten any luck so far to bring up a menu....
could you do an example with basic commands ?

oh lol I think I know what I did wrong:
Code:
warning 203: symbol is never used: "MyFunction"
how can I call "myfunction" ?
__________________

Last edited by AeroAcrobat; 01-24-2013 at 17:20.
AeroAcrobat is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 01-24-2013 , 18:43   Re: SourceMod Menu Generator (C# / .NET 2.0)
Reply With Quote #8

Quote:
Originally Posted by AeroAcrobat View Post
this looks nice!
I have not gotten any luck so far to bring up a menu....
could you do an example with basic commands ?

oh lol I think I know what I did wrong:
Code:
warning 203: symbol is never used: "MyFunction"
how can I call "myfunction" ?
MyFunction is just a placeholder. That contents of MyFunction goes wherever you want the menu to appear.

I think I have a page on the AlliedMods wiki somewhere with a more complete example of how each part of a menu works.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
xrefresh
SourceMod Donor
Join Date: Apr 2011
Old 01-24-2013 , 18:56   Re: SourceMod Menu Generator (C# / .NET 2.0)
Reply With Quote #9

Wow, amazing. +1
xrefresh is offline
wranger
SourceMod Donor
Join Date: Aug 2009
Old 01-24-2013 , 21:52   Re: SourceMod Menu Generator (C# / .NET 2.0)
Reply With Quote #10

Making menu's I found to be one of the hardest things to grasp in SourceMod. Thanks Powerlord!
wranger 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 11:51.


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