[Plugin]Oliverde8 Hud Menu | [Manialive 1] & [Manialive 2.8]

Post here every finished plugin

Moderator: NADEO

Post Reply
oliverde8
Posts: 1299
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

[Plugin]Oliverde8 Hud Menu | [Manialive 1] & [Manialive 2.8]

Post by oliverde8 » 09 Jan 2011, 13:55

All needed information

http://oliver-decramer.com/programs.Pro ... l?prgId=11

Screen Shoots
The Menu
Image
The Menu With MLEPP AdminPanel(soon)
ImageImage
Last edited by oliverde8 on 28 Oct 2013, 10:16, edited 37 times in total.
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

User avatar
aseco
Posts: 99
Joined: 06 Jul 2010, 17:08
Location: Germany
Contact:

Re: [Plugin]Oliverde8 Hud Menu (Soon)

Post by aseco » 10 Jan 2011, 10:30

Once you activated the dedicated server events for your plugin you can override the onPlayerChat($playerUid, $login, $text, $isRegistredCmd) method. It will be executed each time a player writes a chat message on the server if that's what you want.
i7 920 | Nvidia GTX260 | 4Gb DDR3
www.floschnell.de | I like that comic

oliverde8
Posts: 1299
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: [Plugin]Oliverde8 Hud Menu (Soon)

Post by oliverde8 » 10 Jan 2011, 12:32

For Developers
Here is an exemple of Code

Code: Select all

$button["plugin"]=$this;
        $button["style"]="Icons64x64_1";
        $button["substyle"]="GenericButton";

        $parent = $menu->addButton("admin", "Basic Commands",$button);

        if($parent){
            $button["function"]="restart";
            $button["style"]="Icons64x64_1";
            $button["substyle"]="ArrowNext";
            $button["permission"]="next";
            $menu->addButton($parent, "Restart",$button);

            $button["function"]="next";
            $button["style"]="Icons64x64_1";
            $button["substyle"]="Refresh";
            $button["permission"]="restart";
            $menu->addButton($parent, "Next",$button);
        }
Here is the list of all attriutes you can use
  • style The icon style
  • substyle The icon substyle
  • image Url to the icon image
  • Link URL to a website
  • ManiaLink URL to a ManiaLink
  • seperator If yes or no it is a seperator. Seperator has no action just icon. It allows to seperate different buttons
  • plugin The plugin in which is the functions
  • function The function to call
  • checkFunction To hide the button. if check function returns true the button will show it self if not it will hide
  • switchFunction Function that indicated position of the switch 0: red 1:green 2:yellow
  • forceRefresh When you clik on this should the menu refresh(regenerate)
  • permission Permission needed to see the Button
  • needToBeAdmin Do we need to be admin to see the button
Last edited by oliverde8 on 23 Feb 2011, 13:15, edited 2 times in total.
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

User avatar
aseco
Posts: 99
Joined: 06 Jul 2010, 17:08
Location: Germany
Contact:

Re: [Plugin]Oliverde8 Hud Menu (Soon)

Post by aseco » 10 Jan 2011, 13:40

oliverde8 wrote:No, What I want is to make as if a player has entered the command.

For example I add a Button List, when I click on it I want to have the result I would have if I had entered/list
Ah, the way to achieve that is easy:
You simple create one method:

Code: Select all

function list($login) {}
And register that as callback for each, the chat command and the button :-).
Your button:

Code: Select all

// [...]
$button->setAction($this->callback('list'));
Your chat command:

Code: Select all

$this->registerChatcommand('list', 'list', 0, true);
Eine Methode um eine Chateingabe eines Spielers vorzutäuschen gibt es nicht
i7 920 | Nvidia GTX260 | 4Gb DDR3
www.floschnell.de | I like that comic

tcq
Posts: 2705
Joined: 15 Jun 2010, 11:02

Re: [Plugin]Oliverde8 Hud Menu (Soon)

Post by tcq » 10 Jan 2011, 15:51

aseco wrote:Eine Methode um eine Chateingabe eines Spielers vorzutäuschen gibt es nicht
A method to feign chat input from a player does not exist.

User avatar
aseco
Posts: 99
Joined: 06 Jul 2010, 17:08
Location: Germany
Contact:

Re: [Plugin]Oliverde8 Hud Menu (Soon)

Post by aseco » 10 Jan 2011, 15:59

tcq wrote:
aseco wrote:Eine Methode um eine Chateingabe eines Spielers vorzutäuschen gibt es nicht
A method to feign chat input from a player does not exist.
:oops: Thanks, my thoughts must've been somewhere else ...
i7 920 | Nvidia GTX260 | 4Gb DDR3
www.floschnell.de | I like that comic

oliverde8
Posts: 1299
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: [Plugin]Oliverde8 Hud Menu (Soon)

Post by oliverde8 » 10 Jan 2011, 16:22

aseco wrote:
tcq wrote:
aseco wrote:Eine Methode um eine Chateingabe eines Spielers vorzutäuschen gibt es nicht
A method to feign chat input from a player does not exist.
:oops: Thanks, my thoughts must've been somewhere else ...
I can't do it then?

What you explained me with the

Code: Select all

$button->setAction($this->callback('list'));
$this->registerChatcommand('list', 'list', 0, true);
I already know that.

I wil take an exemple of Aseco,
I Aseco there is the Fufi Widgets plugin. you can activate/deactivate the panels it shows with /togglewidgets command.

If I wan't to add a button to my menu that does that I needed to add

Code: Select all

<button caption="Fufi Widgets(on/off)" Chat="/togglewidgets" />
This will do the same as /togglewidgets

That makes very easy to user to modify the config file, they don't need to know the name of the plugin and the name of the function that does that command, They just need to know the chat command.

Even if not possible actually is it possible to add it for the next realeses?

What last thing. Why when I use the latest version do I have this
Image
Every button there are extends of \ManiaLive\Gui\Windowing\Control
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

User avatar
aseco
Posts: 99
Joined: 06 Jul 2010, 17:08
Location: Germany
Contact:

Re: [Plugin]Oliverde8 Hud Menu (Soon)

Post by aseco » 10 Jan 2011, 16:57

Okay now I fully understand what you mean ...
No at the current stage it does not exist and I don't know yet if it will be implemented.
ManiaLive's design is simply different and we don't want to reinvent Aseco. With the current solution you would just tell any other plugin developer to call the public show/hide methods of your plugins. On his side he would need to set a callback for the button and then invoke the public method. This sounds more complex, but on the other side there are not many concurrent methods with which you can achieve the same results. In my eyes this is more straight forward, but this can also be a matter of taste. Ah, and ManiaLib does not offer a setChat method yet and won't ever do so I think ...

For the broken GUI, this actually is my fault ...
I changed the behaviour of the initializeComponents method.
Until now, if you have called the constructor of a Control with parameters, then the first one automatically defined the width and the second one the height. With the new version this changed and now you can define the behaviour of the parameters yourself. To achieve that you need to go into the initializeComponents method of your Control and use the $this->getParam($pos). Where the first parameter takes an integer and gets the parameter from the __construct on the specified position. I think because you have used the Item Control of the Menubar class as an example, you can check the new version for differences. This hopefully helps!
i7 920 | Nvidia GTX260 | 4Gb DDR3
www.floschnell.de | I like that comic

oliverde8
Posts: 1299
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: [Plugin]Oliverde8 Hud Menu (Soon)

Post by oliverde8 » 10 Jan 2011, 17:11

Ok Thanks a lot it works :)
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

oliverde8
Posts: 1299
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: [Plugin]Oliverde8 Hud Menu

Post by oliverde8 » 22 Jan 2011, 10:40

Hi,

Here it is just realsed. There is no plugin working with it at the moment :(
see why here http://forum.maniaplanet.com/viewtopic. ... t=40#p9499

You can make plugins that work with it but, you can't just add buttons throught the XML file. Hopefully an Update will alow us to do it.
Image

You can Download it here : http://oliverde8.free.fr/oliverde8/inde ... ads;cat=24

Im am working on 2 plugins that will work with it
-The Admin Commands
-The GameManager,
I don't have a lot of time so it will take some time :)
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

Post Reply

Return to “ManiaLive Plugins”

Who is online

Users browsing this forum: No registered users and 1 guest