Under constuction NOT FINISHED!!!!!!!!!!!

Interface members

These first four are really not that important, they do nothing but provide feedback but xlobby plugin setup dialog.

public string GetName()

public string GetDescription()

public string GetPluginType()

public string GetStatus()

Now the next ones are where everything happens

public void ShowDialog()
  • A simple function that is triggered through the plugin manager in xlobby setup. Its job is
to show a configuration dialog for instanace if there is one.

public ArrayList GetCommands()

  • A very simple function that simply returns an ArrayList of strings which are possible commands for your plugin, this
is used in the event manager to allow the end user to see all the commands available. You can return null if you have no commands.

public void Execute(string command)
  • should be based off the commands you listed in the GetCommands() function, basicly xlobby can trigger this function with
a command you listed before. So by looking at the string "command" you will then do something with it.

public Object GetVariable(string name)

  • This is called whene a text box starts with the following text "plugin>xstats>", everything after that is
passed to this function. It is up to you to return the information that is needed.
  • Notice the return type is "Object" for now you can return a string, or an Image.

public void SetHelper(XPluginHelper xhelper)
  • this is where the helper object is set, its job is to let you send messages to xlobby.

XPluginHelper This object is very simple with three functions, but dont let that fool you.

GrabPaintKey() & ReleasePaintKey()
  • These two functions are used when your serving images from your plugin. Just say xlobby gets an image
from your plugin with the following text "plugin>xstats>image1", it is your job to return an Image object but it is also your job to manage that object. Meaning xlobby will only show the Image. Now this rises a problem, if xlobby is showing your image and you modify it you will get an error since an object cannot be used at the same time. So what you need to do is to ensure this doesnt happen is GrabPaintKey(), modify your images, then ReleasePaintKey() this will ensure that the Image object will not be used at the same time in two different places.

SendCommand(string command)
  • simple but very powerful and extremely scalable

current available commands for SendCommand are

"invalidate", this will cause the current screen to refresh
"connectedToInternet", this will return "true" or "false"
"ir>", used for an IR plugin, see examples

"buttonsize:<button id>", this will allow you to retrive the size of a button from a unique button id in the following format <x>:<y>:<width>:<height>. An example of using this would be "buttonid:mybutton", the results would be 10:20:50:40

Now the rest of the commands are taken straight from the eventmanager commands, that means ANY command you find in the event manager can be triggered from the SendCommand() function. Let me explain a bit how this works. Every command in xlobby has a group, for example "os", "xlobby", "category". Next a group has a list of commands like "execute", "back", "reset". In turn some of these commands have parameters, these parameters are represented in text boxes once you select a command. So what does this have todo with SendCommand(), very simple.

Lets say you want to trigger the "category, next item" command, what you have to do is convert that command into a special format. For that command it would be "command:category:next item:". The format is as follows

command:<group name>:<command name>
command:<group name>:<command name>:<parameter1>
command:<group name>:<command name>:<parameter1>:<parameter2>
command:<group name>:<command name>:<parameter1>:<parameter2>:<parameter3>
command:<group name>:<command name>:<parameter1>:<parameter2>:<parameter3>:<parameter4>

get it? just say you are going to call a command with no parameters, a good example of this is a command with optional parameters. Lets say its a 3 parameter command, and the last 2 are optional, it would look something like this.

command:<group name>:<command name>:<parameter1>::

Notice that when you have an parameter command and you leave it blank, you still need the preceding : even though the parameter is blank. This is the reason "command:category:next item:" ends with a ":" because I am not using the optional parameter to specify which category.