mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge pull request #210 from Aireil/improve_commands_help
Improve commands help code.
This commit is contained in:
commit
1df3a36966
1 changed files with 4 additions and 5 deletions
|
|
@ -229,12 +229,11 @@ namespace Dalamud.Plugin
|
|||
x => x.Definition.InternalName ==
|
||||
pluginDefinition.InternalName);
|
||||
|
||||
if (this.dalamud.CommandManager.Commands.Any(x => x.Value.LoaderAssemblyName == installedPlugin.Definition?.InternalName)) {
|
||||
var commands = this.dalamud.CommandManager.Commands.Where(x => x.Value.LoaderAssemblyName == installedPlugin.Definition?.InternalName && x.Value.ShowInHelp);
|
||||
if (commands.Any()) {
|
||||
ImGui.Dummy(new Vector2(10, 10) * ImGui.GetIO().FontGlobalScale);
|
||||
foreach (var command in this.dalamud.CommandManager.Commands) {
|
||||
if (command.Value.LoaderAssemblyName == installedPlugin.Definition.InternalName && command.Value.ShowInHelp) {
|
||||
ImGui.Text($"{command.Key} → {command.Value.HelpMessage}");
|
||||
}
|
||||
foreach (var command in commands) {
|
||||
ImGui.Text($"{command.Key} → {command.Value.HelpMessage}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue