feat: show when paused or cancelled and add id opt
This commit is contained in:
parent
49dd35cc81
commit
d58c482c0c
|
@ -10,7 +10,7 @@ namespace CCMM {
|
||||||
private readonly CCMMPlugin plugin;
|
private readonly CCMMPlugin plugin;
|
||||||
private INode dragged = null;
|
private INode dragged = null;
|
||||||
private Guid runningChoice = Guid.Empty;
|
private Guid runningChoice = Guid.Empty;
|
||||||
private uint spawned = 0;
|
private bool showIdents = false;
|
||||||
|
|
||||||
private bool _settingsVisible = false;
|
private bool _settingsVisible = false;
|
||||||
public bool SettingsVisible { get => this._settingsVisible; set => this._settingsVisible = value; }
|
public bool SettingsVisible { get => this._settingsVisible; set => this._settingsVisible = value; }
|
||||||
|
@ -83,7 +83,17 @@ namespace CCMM {
|
||||||
ImGui.PushItemWidth(-1f);
|
ImGui.PushItemWidth(-1f);
|
||||||
if (ImGui.ListBoxHeader("##running-macros", this.plugin.MacroHandler.Running.Count, 5)) {
|
if (ImGui.ListBoxHeader("##running-macros", this.plugin.MacroHandler.Running.Count, 5)) {
|
||||||
foreach (KeyValuePair<Guid, Macro> entry in this.plugin.MacroHandler.Running) {
|
foreach (KeyValuePair<Guid, Macro> entry in this.plugin.MacroHandler.Running) {
|
||||||
if (ImGui.Selectable($"{entry.Value.Name}##{entry.Key}", this.runningChoice == entry.Key)) {
|
string name = $"{entry.Value.Name}";
|
||||||
|
if (this.showIdents) {
|
||||||
|
string ident = entry.Key.ToString();
|
||||||
|
name += $" ({ident.Substring(ident.Length - 7)})";
|
||||||
|
}
|
||||||
|
if (this.plugin.MacroHandler.IsPaused(entry.Key)) {
|
||||||
|
name += " (paused)";
|
||||||
|
}
|
||||||
|
bool cancalled = this.plugin.MacroHandler.IsCancelled(entry.Key);
|
||||||
|
ImGuiSelectableFlags flags = cancalled ? ImGuiSelectableFlags.Disabled : ImGuiSelectableFlags.None;
|
||||||
|
if (ImGui.Selectable($"{name}##{entry.Key}", this.runningChoice == entry.Key, flags)) {
|
||||||
this.runningChoice = entry.Key;
|
this.runningChoice = entry.Key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,6 +117,10 @@ namespace CCMM {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
|
||||||
|
ImGui.Checkbox("Show unique identifiers", ref this.showIdents);
|
||||||
|
|
||||||
ImGui.Columns(1);
|
ImGui.Columns(1);
|
||||||
|
|
||||||
ImGui.End();
|
ImGui.End();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user