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
@@ -18,6 +18,17 @@ internal sealed class PluginUi : IDisposable {
internal ImFontPtr? ItalicFont { get; private set; }
internal Vector4 DefaultText { get; private set; }
internal Tab? CurrentTab {
get {
var i = this._chatLog.LastTab;
if (i > -1 && i < this.Plugin.Config.Tabs.Count) {
return this.Plugin.Config.Tabs[i];
}
return null;
}
}
private List<IUiComponent> Components { get; }
private ImFontConfigPtr _fontCfg;
private ImFontConfigPtr _fontCfgMerge;
@@ -42,12 +53,16 @@ internal sealed class PluginUi : IDisposable {
GCHandleType.Pinned
);
private readonly ChatLog _chatLog;
internal unsafe PluginUi(Plugin plugin) {
this.Plugin = plugin;
this.Salt = new Random().Next().ToString();
this._chatLog = new ChatLog(this);
this.Components = new List<IUiComponent> {
new Settings(this),
new ChatLog(this),
this._chatLog,
};
this._fontCfg = new ImFontConfigPtr(ImGuiNative.ImFontConfig_ImFontConfig()) {