LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   Interface Requests (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=5)
-   -   A request for all plugin Authors 2 (https://www.lotrointerface.com/forums/showthread.php?t=1544)

Fortunis 06-28-2011 04:36 AM

A request for all plugin Authors 2
 
Would it be possible for all Authors to make their main command toggle show/hide please. I feel its unnessesary to have to type more text on the command line than is necessary.

Take my plugin as an example. '/mcha' toggles mcha's option window on/off. No need for /mcha show or /mcha hide. I use '/mcha toggle' for something different (turns the functioning of the plugin on/off), but for other plugins /command toggle is used exactly as my normal '/mcha'.

Im aware that you all probably know how to change this but i thought i'd insert some code to inspire thoughs that are new to making plugins.


Code:

yourCommand = class(Turbine.ShellCommand);
Turbine.Shell.AddCommand("<Command you type, excluding slash>", yourCommand);

function yourCommand:Execute(command, arg)

    if arg == "" then

      if yourWindow:IsVisible(true) then
            yourWindow:SetVisible( false );
            yourWindow:Activate( false );
        else
            yourWindow:SetVisible( true );
            yourWindow:Activate( true );
        end

    end

end

Thanks in advance
-Fortunis
:o

Tyrolit 06-28-2011 09:28 AM

A lot of plugins and addons in other games (WoW) provide a help text or a list of commands when you enter only the main command, this is helpful to the user, especially if like me you use alot of plugins and cant remember all the commands.
I agree an extent of standardization of commands would be nice, which most plugins do follow, i.e show/hide/toggle but the help text that alot give with the plain /pluginName is realy helpful.

Fortunis 06-28-2011 12:32 PM

Quote:

Originally Posted by Tyrolit (Post 6745)
the help text that alot give with the plain /pluginName is realy helpful.

Agree, but i would have '/pluginName help' for that, seems more natural if your looking for help on the plugin to do that imho. Using '/pluginName' surely to activate the options or to active/run the plugin, whichever 'would be/is' the most commonly used.

Fortunis 06-28-2011 03:59 PM

Anyhow, i think i got a little side tracked with your reply Tyrolit. My main point is that if an author of their plugin has got '/pluginName show' as their main command to open up the options window, then it would be best that the same command then is able to closes it. So having 'show' shouldnt be used.

Its quite easy to click a button to open a window, either by mistake or just to have a quick look at something, and without moving the mouse, click again to close the window. It does annoy me when a button that opens something doesnt work to close it. I have come across games in the past that do this and like i said, its annoying. Having to move the mouse to a totally different area of the screen to close the window seems like wasted energy, and/but having the button that opens something to be able to close that something is effecient.

Why should we have to have '/pluginName show', '/pluginName hide' and '/pluginName toggle' shortcuts. When '/pluginName' can do the same as all 3.


All times are GMT -5. The time now is 09:46 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI