[plugin] Menubar
Posted: 30 Dec 2010, 19:19
This plugin helps you create a graphical menu structure.
Since your plugin relies on the Menubar, if you are using it, you need to check if it is loaded before you can call methods of it:
You set the plugin's menu icon like that:
If you want to add a button to your plugin's menu, then use this command:
Third parameter is the name of the button and the fourth a callback method that is executed when the player clicks onto the button. This callback method will receive the player's login as parameter.
You can add one parameter to the end, which is "true", to indicate that the button will only be shown to admins.
Finally a screenshot of how the final result can look like:

You can download the Menubar plugin here:
http://files.manialive.com/plugins/Menu ... _r1828.zip
Also find a download link on the manialive ManiaLink's plugin section!
Since your plugin relies on the Menubar, if you are using it, you need to check if it is loaded before you can call methods of it:
Code: Select all
if ($this->isPluginLoaded('Flo\Menubar', 1.1)) ... then create the submenu and buttons
Code: Select all
$this->callPublicMethod('Flo\Menubar', 'initMenu', Icons128x128_1::Replay);
Code: Select all
$this->callPublicMethod('Flo\Menubar', 'addButton', 'Button Name', array($this, 'callbackName'));
You can add one parameter to the end, which is "true", to indicate that the button will only be shown to admins.
Finally a screenshot of how the final result can look like:

You can download the Menubar plugin here:
http://files.manialive.com/plugins/Menu ... _r1828.zip
Also find a download link on the manialive ManiaLink's plugin section!