refactor: update for api 9
This commit is contained in:
@@ -11,10 +11,11 @@ using Dalamud.Game.ClientState.Keys;
|
||||
using Dalamud.Game.Text.SeStringHandling;
|
||||
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Internal;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Logging;
|
||||
using Dalamud.Memory;
|
||||
using ImGuiNET;
|
||||
using ImGuiScene;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
|
||||
namespace ChatTwo.Ui;
|
||||
@@ -28,7 +29,7 @@ internal sealed class ChatLog : IUiComponent {
|
||||
internal bool Activate;
|
||||
private int _activatePos = -1;
|
||||
internal string Chat = string.Empty;
|
||||
private readonly TextureWrap? _fontIcon;
|
||||
private readonly IDalamudTextureWrap? _fontIcon;
|
||||
private readonly List<string> _inputBacklog = new();
|
||||
private int _inputBacklogIdx = -1;
|
||||
internal int LastTab { get; private set; }
|
||||
@@ -62,7 +63,7 @@ internal sealed class ChatLog : IUiComponent {
|
||||
this.Ui.Plugin.Commands.Register("/clearlog2", "Clear the Chat 2 chat log").Execute += this.ClearLog;
|
||||
this.Ui.Plugin.Commands.Register("/chat2").Execute += this.ToggleChat;
|
||||
|
||||
this._fontIcon = this.Ui.Plugin.DataManager.GetImGuiTexture("common/font/fonticon_ps5.tex");
|
||||
this._fontIcon = this.Ui.Plugin.TextureProvider.GetTextureFromGame("common/font/fonticon_ps5.tex");
|
||||
|
||||
this.Ui.Plugin.Functions.Chat.Activated += this.Activated;
|
||||
this.Ui.Plugin.ClientState.Login += this.Login;
|
||||
@@ -78,13 +79,13 @@ internal sealed class ChatLog : IUiComponent {
|
||||
this.Ui.Plugin.Commands.Register("/clearlog2").Execute -= this.ClearLog;
|
||||
}
|
||||
|
||||
private void Logout(object? sender, EventArgs e) {
|
||||
private void Logout() {
|
||||
foreach (var tab in this.Ui.Plugin.Config.Tabs) {
|
||||
tab.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
private void Login(object? sender, EventArgs e) {
|
||||
private void Login() {
|
||||
this.Ui.Plugin.Store.FilterAllTabs(false);
|
||||
}
|
||||
|
||||
@@ -415,7 +416,7 @@ internal sealed class ChatLog : IUiComponent {
|
||||
|
||||
ImGui.SetNextWindowSize(new Vector2(500, 250) * ImGuiHelpers.GlobalScale, ImGuiCond.FirstUseEver);
|
||||
|
||||
if (!ImGui.Begin($"{this.Ui.Plugin.Name}###chat2", flags)) {
|
||||
if (!ImGui.Begin($"{Plugin.Name}###chat2", flags)) {
|
||||
this._lastViewport = ImGui.GetWindowViewport().NativePtr;
|
||||
this._wasDocked = ImGui.IsWindowDocked();
|
||||
ImGui.End();
|
||||
|
||||
Reference in New Issue
Block a user