fix: make checkboxes work if multiple sections are expanded
This commit is contained in:
parent
21a2838ad4
commit
7ca62ed34e
|
@ -196,11 +196,11 @@ namespace NoSoliciting.Interface {
|
||||||
|
|
||||||
var types = this.Plugin.Config.MlFilters[category];
|
var types = this.Plugin.Config.MlFilters[category];
|
||||||
|
|
||||||
void DrawTypes(ChatType type) {
|
void DrawTypes(ChatType type, string id) {
|
||||||
var name = type.Name(this.Plugin.Interface.Data);
|
var name = type.Name(this.Plugin.Interface.Data);
|
||||||
|
|
||||||
var check = types.Contains(type);
|
var check = types.Contains(type);
|
||||||
if (!ImGui.Checkbox(name, ref check)) {
|
if (!ImGui.Checkbox($"{name}##{id}", ref check)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,10 +213,10 @@ namespace NoSoliciting.Interface {
|
||||||
this.Plugin.Config.Save();
|
this.Plugin.Config.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawTypes(ChatType.None);
|
DrawTypes(ChatType.None, category.ToString());
|
||||||
|
|
||||||
foreach (var type in Filter.FilteredChatTypes) {
|
foreach (var type in Filter.FilteredChatTypes) {
|
||||||
DrawTypes(type);
|
DrawTypes(type, category.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user