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