mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-23 08:17:47 +01:00
IME implementation
This commit is contained in:
parent
ee44e6885a
commit
3e3757d30c
10 changed files with 1131 additions and 2 deletions
46
Dalamud/Interface/Internal/Windows/IMEWindow.cs
Normal file
46
Dalamud/Interface/Internal/Windows/IMEWindow.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System.Numerics;
|
||||
|
||||
using Dalamud.Game.Gui.Internal;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using ImGuiNET;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// A window for displaying IME details.
|
||||
/// </summary>
|
||||
internal class IMEWindow : Window
|
||||
{
|
||||
private readonly DalamudIME dalamudIME;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IMEWindow"/> class.
|
||||
/// </summary>
|
||||
/// <param name="dalamud">The Dalamud instance.</param>
|
||||
public IMEWindow(Dalamud dalamud)
|
||||
: base("Dalamud IME", ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoFocusOnAppearing)
|
||||
{
|
||||
this.dalamudIME = dalamud.IME;
|
||||
this.Size = new Vector2(100, 200);
|
||||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Draw()
|
||||
{
|
||||
if (this.dalamudIME == null || !this.dalamudIME.IsEnabled)
|
||||
{
|
||||
ImGui.Text("IME unavailable.");
|
||||
return;
|
||||
}
|
||||
|
||||
ImGui.Text(this.dalamudIME.ImmComp);
|
||||
|
||||
ImGui.Separator();
|
||||
for (var i = 0; i < this.dalamudIME.ImmCand.Count; i++)
|
||||
{
|
||||
ImGui.Text($"{i + 1}. {this.dalamudIME.ImmCand[i]}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue