fix: add unique id to checkboxes
This commit is contained in:
parent
e3c881d944
commit
44a9c71fd3
|
@ -73,6 +73,8 @@ namespace SoundFilter.Ui {
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
|
||||||
if (ImGui.BeginChild("filtered-sounds")) {
|
if (ImGui.BeginChild("filtered-sounds")) {
|
||||||
|
var i = 0;
|
||||||
|
|
||||||
foreach (var entry in this.Plugin.Config.Filtered.ToList()) {
|
foreach (var entry in this.Plugin.Config.Filtered.ToList()) {
|
||||||
var glob = entry.Key;
|
var glob = entry.Key;
|
||||||
|
|
||||||
|
@ -89,12 +91,14 @@ namespace SoundFilter.Ui {
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
||||||
shouldSave |= ImGui.Checkbox(entry.Value.Name, ref entry.Value.Enabled);
|
shouldSave |= ImGui.Checkbox($"{entry.Value.Name}##{i}-{glob}", ref entry.Value.Enabled);
|
||||||
if (ImGui.IsItemHovered()) {
|
if (ImGui.IsItemHovered()) {
|
||||||
ImGui.BeginTooltip();
|
ImGui.BeginTooltip();
|
||||||
ImGui.TextUnformatted(glob);
|
ImGui.TextUnformatted(glob);
|
||||||
ImGui.EndTooltip();
|
ImGui.EndTooltip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.EndChild();
|
ImGui.EndChild();
|
||||||
|
|
Loading…
Reference in New Issue