feat: partially handle some payloads

This commit is contained in:
Anna
2021-12-29 21:53:44 -05:00
parent 1d9581abca
commit 0b9d617021
14 changed files with 341 additions and 50 deletions
+4
View File
@@ -12,6 +12,7 @@ internal sealed class Settings : IUiComponent {
private bool _visible;
private bool _hideChat;
private bool _nativeItemTooltips;
private float _fontSize;
private Dictionary<ChatType, uint> _chatColours = new();
private List<Tab> _tabs = new();
@@ -34,6 +35,7 @@ internal sealed class Settings : IUiComponent {
private void Initialise() {
var config = this.Ui.Plugin.Config;
this._hideChat = config.HideChat;
this._nativeItemTooltips = config.NativeItemTooltips;
this._fontSize = config.FontSize;
this._chatColours = config.ChatColours.ToDictionary(entry => entry.Key, entry => entry.Value);
this._tabs = config.Tabs.Select(tab => tab.Clone()).ToList();
@@ -60,6 +62,7 @@ internal sealed class Settings : IUiComponent {
- ImGui.CalcTextSize("A").Y;
if (ImGui.BeginChild("##chat2-settings", new Vector2(-1, height))) {
ImGui.Checkbox("Hide chat", ref this._hideChat);
ImGui.Checkbox("Show native item tooltips", ref this._nativeItemTooltips);
ImGui.DragFloat("Font size", ref this._fontSize, .5f, 12f, 36f);
if (ImGui.TreeNodeEx("Chat colours")) {
@@ -163,6 +166,7 @@ internal sealed class Settings : IUiComponent {
var fontSizeChanged = Math.Abs(this._fontSize - this.Ui.Plugin.Config.FontSize) > float.Epsilon;
config.HideChat = this._hideChat;
config.NativeItemTooltips = this._nativeItemTooltips;
config.FontSize = this._fontSize;
config.ChatColours = this._chatColours;
config.Tabs = this._tabs;