This is an easy way to init cmd. and create a friendly cmd help panel in IMGUI.
For example, write the code in your IDalamudPlugin file like this. It'll automatically add a handle of your command of it and dispose of course.
[Cmd("/fulf", "En/Disable FULF with /fulf or change the loot rule with /fulf need | greed or pass .")]
[SubCmd("need", "Set need for FULF")]
[SubCmd("greed", "Set greed for FULF")]
[SubCmd("pass", "Set pass for FULF")]
void FulfCommand(string command, string arguments)
{
}
[Cmd("/rolling", "Roll for the loot according to the argument and the item's RollResult. /rolling need | greed | pass or passall", showInHelpPanel: false)]
[SubCmd("need", "Rolling need")]
[SubCmd("greed", "Rolling greed")]
[SubCmd("pass", "Rolling pass")]
void RollingCommand(string command, string arguments)
{
}
[Cmd("/lazy", "Open Lazy Loot config.")]
void OpenConfigCommand(string command, string arguments)
{
}
If you write the code like this in IMGUI drawing method, you'll see something like this.
CmdManager.DrawHelp(100);
NOTICE: This feature used the imgui method, however, I didn't move it to IMGUI folder. If you want to do this, please check it.
This is an easy way to init cmd. and create a friendly cmd help panel in IMGUI.
For example, write the code in your
IDalamudPlugin
file like this. It'll automatically add a handle of your command of it and dispose of course.If you write the code like this in
IMGUI
drawing method, you'll see something like this.NOTICE: This feature used the imgui method, however, I didn't move it to IMGUI folder. If you want to do this, please check it.