Page 1 of 1

[plugin] Menubar

Posted: 30 Dec 2010, 19:19
by aseco
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:

Code: Select all

if ($this->isPluginLoaded('Flo\Menubar', 1.1)) ... then create the submenu and buttons
You set the plugin's menu icon like that:

Code: Select all

$this->callPublicMethod('Flo\Menubar', 'initMenu', Icons128x128_1::Replay);
If you want to add a button to your plugin's menu, then use this command:

Code: Select all

$this->callPublicMethod('Flo\Menubar', 'addButton', 'Button Name', array($this, 'callbackName'));
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:
Image

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!

Re: [plugin] Menubar

Posted: 04 Jan 2011, 15:15
by Jojo_44
Hi,

I have two questions:

1. Is it possible to display a icon when the submenu have no button ?

2. How can I display a image (f.e. my clanlogo) instead of a icon ?

Thank you, Jojo

Re: [plugin] Menubar

Posted: 08 Jan 2011, 14:19
by xan.96.gll
aseco wrote: Finally a screenshot of how the final result can look like:
Image
Can you post the code for the Admin section?

Thanks!

Re: [plugin] Menubar

Posted: 10 Jan 2011, 12:15
by aseco
xan.96.gll wrote:Can you post the code for the Admin section?

Thanks!
Just released the whole plugin, you can find it here: http://forum.maniaplanet.com/viewtopic.php?f=47&t=559

Re: [plugin] Menubar

Posted: 10 Jan 2011, 12:21
by aseco
Just released a new version of the Menubar that fixes a display issue that existed since the latest ManiaLive release.
This will also break compability with previous versions, so do not use it with an old version of ML.
Download here or on the manialink

Re: [plugin] Menubar

Posted: 14 Jan 2011, 11:10
by aseco
New release due to the changes made in the latest ManiaLive version.
Download at http://files.manialive.com/plugins/Menubar_r1828.zip .
Or at the manialive:plugins Manialink.