feat: add unread modes

This commit is contained in:
Anna
2022-02-03 16:15:27 -05:00
parent 7b2622d947
commit 077053f4e1
6 changed files with 88 additions and 18 deletions
+16 -1
View File
@@ -43,9 +43,24 @@ internal sealed class Tabs : ISettingsTab {
}
ImGui.InputText("Name", ref tab.Name, 512, ImGuiInputTextFlags.EnterReturnsTrue);
ImGui.Checkbox("Show unread count", ref tab.DisplayUnread);
ImGui.Checkbox("Show timestamps", ref tab.DisplayTimestamp);
if (ImGui.BeginCombo("Unread mode", tab.UnreadMode.ToString())) {
foreach (var mode in Enum.GetValues<UnreadMode>()) {
if (ImGui.Selectable(mode.ToString(), tab.UnreadMode == mode)) {
tab.UnreadMode = mode;
}
if (mode.Tooltip() is { } tooltip && ImGui.IsItemHovered()) {
ImGui.BeginTooltip();
ImGui.TextUnformatted(tooltip);
ImGui.EndTooltip();
}
}
ImGui.EndCombo();
}
var input = tab.Channel?.ToChatType().Name() ?? "<None>";
if (ImGui.BeginCombo("Input channel", input)) {
if (ImGui.Selectable("<None>", tab.Channel == null)) {