Ulysses

General => Developers Corner => Topic started by: Organik on November 14, 2013, 05:02:52 PM

Title: Add a new tab in the xgui
Post by: Organik on November 14, 2013, 05:02:52 PM
Hello all,

I've searched high and low and can't seem to find any solid information on adding my own tab into the xgui. There doesn't seem to be any developer documentation for it so I assume I'd have to dig through source files or other addons to find out how it works.. but I was hoping someone could perhaps get me started in the right direction?

Any help is appreciated!

Thanks
Title: Re: Add a new tab in the xgui
Post by: JamminR on November 14, 2013, 08:33:20 PM
Quick answer - Tabs are created during the 'category' variable setting from the ulx.command object setup.
Long answer -
ULib is documented publicly here - http://www.ulyssesmod.net/docs (http://www.ulyssesmod.net/docs)
ULX, which heavily uses ULib, commands aren't documented publicly, but are commented pretty well within the code itself. (And, even the code is in english, no obfuscated variable names or command structures)

Then, when ULX commands are set up correctly, they're automatically added to the tabs within XGUI.
I'd recommend looking over the TTT commands release by terrortownteam - http://forums.ulyssesmod.net/index.php/topic,6279.0.html (http://forums.ulyssesmod.net/index.php/topic,6279.0.html)
They make thier own category and XGUI tabs mostly by just adding a new ulx.command ("Category" ... ) and using it for the rest of the functions.

If you have further questions needing clarification, feel free to ask.
Title: Re: Add a new tab in the xgui
Post by: Stickly Man! on November 15, 2013, 01:26:10 PM
JamminR is referring to the categories on the "commands" tab. If you want to add your own tab on the top of XGUI, then .. it's actually quite easy! And highly undocumented! I was supposed to document this.... years ago. I suppose a quick documentation would be fairly easy to roll out, but.. I may not have a large enough chunk of time to fill it out for a while.

In the meantime, add me as a friend on steam and I can help you get started. :P

(Your name looks familiar- you may have tried to add me as a friend previously, but I tend to ignore random requests because I'm tired of risking the chance of getting people who just ask me "hey can u code for gmod i have this cool idea!11~" lol)
Title: Re: Add a new tab in the xgui
Post by: Eccid on December 04, 2013, 10:38:44 AM
Have you had time to document this yet? I'm wanting to add a tab as well, and couldn't find anything on it.
Title: Re: Add a new tab in the xgui
Post by: Bite That Apple on December 04, 2013, 04:32:46 PM
Have you had time to document this yet? I'm wanting to add a tab as well, and couldn't find anything on it.

They most likely will make an announcement about it somewhere, if or when Sticky Man chooses to document it. So as of this moment I'm going to say no, he most likely didn't update it yet.
Title: Re: Add a new tab in the xgui
Post by: Stickly Man! on December 05, 2013, 09:18:22 AM
I haven't been able to start it yet- but with this increase in interest I will try to get it done as soon as possible. I'll be building a webpage and sticking it up on ulyssesmod.net, and I've already started on some of the text. It will hopefully be descriptive enough to explain all of what XGUI can do (and hopefully helps me remember how it all works :P)