From 452cf7813f70c71e9365f640273f46154491bb97 Mon Sep 17 00:00:00 2001
From: MidoriKami <9083275+MidoriKami@users.noreply.github.com>
Date: Sun, 17 Sep 2023 07:01:11 -0700
Subject: [PATCH] Data Window ui rework (#1376)
---
.../Internal/Windows/Data/DataKindEnum.cs | 163 ---------------
.../Internal/Windows/Data/DataWindow.cs | 186 +++++++++++-------
.../Windows/Data/IDataWindowWidget.cs | 21 +-
.../Data/Widgets/AddonInspectorWidget.cs | 5 +-
.../Windows/Data/Widgets/AddonWidget.cs | 5 +-
.../Windows/Data/Widgets/AddressesWidget.cs | 5 +-
.../Windows/Data/Widgets/AetherytesWidget.cs | 7 +-
.../Data/Widgets/AtkArrayDataBrowserWidget.cs | 7 +-
.../Windows/Data/Widgets/BuddyListWidget.cs | 7 +-
.../Windows/Data/Widgets/CommandWidget.cs | 5 +-
.../Windows/Data/Widgets/ConditionWidget.cs | 7 +-
.../Data/Widgets/ConfigurationWidget.cs | 5 +-
.../Windows/Data/Widgets/DataShareWidget.cs | 5 +-
.../Windows/Data/Widgets/DtrBarWidget.cs | 5 +-
.../Windows/Data/Widgets/FateTableWidget.cs | 5 +-
.../Windows/Data/Widgets/FlyTextWidget.cs | 5 +-
.../Data/Widgets/FontAwesomeTestWidget.cs | 5 +-
.../Windows/Data/Widgets/GamepadWidget.cs | 5 +-
.../Windows/Data/Widgets/GaugeWidget.cs | 5 +-
.../Windows/Data/Widgets/HookWidget.cs | 5 +-
.../Windows/Data/Widgets/ImGuiWidget.cs | 5 +-
.../Windows/Data/Widgets/KeyStateWidget.cs | 5 +-
.../Data/Widgets/NetworkMonitorWidget.cs | 5 +-
.../Windows/Data/Widgets/ObjectTableWidget.cs | 5 +-
.../Windows/Data/Widgets/PartyListWidget.cs | 5 +-
.../Windows/Data/Widgets/PluginIpcWidget.cs | 5 +-
.../Windows/Data/Widgets/SeFontTestWidget.cs | 5 +-
.../Data/Widgets/ServerOpcodeWidget.cs | 5 +-
.../Windows/Data/Widgets/StartInfoWidget.cs | 5 +-
.../Windows/Data/Widgets/TargetWidget.cs | 5 +-
.../Data/Widgets/TaskSchedulerWidget.cs | 5 +-
.../Windows/Data/Widgets/TexWidget.cs | 5 +-
.../Windows/Data/Widgets/ToastWidget.cs | 5 +-
.../Windows/Data/Widgets/UIColorWidget.cs | 5 +-
34 files changed, 257 insertions(+), 276 deletions(-)
delete mode 100644 Dalamud/Interface/Internal/Windows/Data/DataKindEnum.cs
diff --git a/Dalamud/Interface/Internal/Windows/Data/DataKindEnum.cs b/Dalamud/Interface/Internal/Windows/Data/DataKindEnum.cs
deleted file mode 100644
index d7c4eb095..000000000
--- a/Dalamud/Interface/Internal/Windows/Data/DataKindEnum.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-// ReSharper disable InconsistentNaming // Naming is suppressed so we can replace '_' with ' '
-namespace Dalamud.Interface.Internal.Windows;
-
-///
-/// Enum representing a DataKind for the Data Window.
-///
-internal enum DataKind
-{
- ///
- /// Server Opcode Display.
- ///
- Server_OpCode,
-
- ///
- /// Address.
- ///
- Address,
-
- ///
- /// Object Table.
- ///
- Object_Table,
-
- ///
- /// Fate Table.
- ///
- Fate_Table,
-
- ///
- /// SE Font Test.
- ///
- SE_Font_Test,
-
- ///
- /// FontAwesome Test.
- ///
- FontAwesome_Test,
-
- ///
- /// Party List.
- ///
- Party_List,
-
- ///
- /// Buddy List.
- ///
- Buddy_List,
-
- ///
- /// Plugin IPC Test.
- ///
- Plugin_IPC,
-
- ///
- /// Player Condition.
- ///
- Condition,
-
- ///
- /// Gauge.
- ///
- Gauge,
-
- ///
- /// Command.
- ///
- Command,
-
- ///
- /// Addon.
- ///
- Addon,
-
- ///
- /// Addon Inspector.
- ///
- Addon_Inspector,
-
- ///
- /// AtkArrayData Browser.
- ///
- AtkArrayData_Browser,
-
- ///
- /// StartInfo.
- ///
- StartInfo,
-
- ///
- /// Target.
- ///
- Target,
-
- ///
- /// Toast.
- ///
- Toast,
-
- ///
- /// Fly Text.
- ///
- FlyText,
-
- ///
- /// ImGui.
- ///
- ImGui,
-
- ///
- /// Tex.
- ///
- Tex,
-
- ///
- /// KeyState.
- ///
- KeyState,
-
- ///
- /// GamePad.
- ///
- Gamepad,
-
- ///
- /// Configuration.
- ///
- Configuration,
-
- ///
- /// Task Scheduler.
- ///
- TaskSched,
-
- ///
- /// Hook.
- ///
- Hook,
-
- ///
- /// Aetherytes.
- ///
- Aetherytes,
-
- ///
- /// DTR Bar.
- ///
- Dtr_Bar,
-
- ///
- /// UIColor.
- ///
- UIColor,
-
- ///
- /// Data Share.
- ///
- Data_Share,
-
- ///
- /// Network Monitor.
- ///
- Network_Monitor,
-}
diff --git a/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs b/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs
index 9d8dc1e93..05d5bff3f 100644
--- a/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
using System.Linq;
using System.Numerics;
@@ -51,26 +50,24 @@ internal class DataWindow : Window
new NetworkMonitorWidget(),
};
- private readonly Dictionary dataKindNames = new();
+ private readonly IOrderedEnumerable orderedModules;
private bool isExcept;
- private DataKind currentKind;
-
+ private bool selectionCollapsed;
+ private IDataWindowWidget currentWidget;
+
///
/// Initializes a new instance of the class.
///
public DataWindow()
- : base("Dalamud Data")
+ : base("Dalamud Data", ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse)
{
- this.Size = new Vector2(500, 500);
+ this.Size = new Vector2(400, 300);
this.SizeCondition = ImGuiCond.FirstUseEver;
this.RespectCloseHotkey = false;
-
- foreach (var dataKind in Enum.GetValues())
- {
- this.dataKindNames[dataKind] = dataKind.ToString().Replace("_", " ");
- }
+ this.orderedModules = this.modules.OrderBy(module => module.DisplayName);
+ this.currentWidget = this.orderedModules.First();
this.Load();
}
@@ -94,24 +91,9 @@ internal class DataWindow : Window
if (string.IsNullOrEmpty(dataKind))
return;
- dataKind = dataKind switch
+ if (this.modules.FirstOrDefault(module => module.IsWidgetCommand(dataKind)) is { } targetModule)
{
- "ai" => "Addon Inspector",
- "at" => "Object Table", // Actor Table
- "ot" => "Object Table",
- "uic" => "UIColor",
- _ => dataKind,
- };
-
- dataKind = dataKind.Replace(" ", string.Empty).ToLower();
-
- var matched = Enum
- .GetValues()
- .FirstOrDefault(kind => Enum.GetName(kind)?.Replace("_", string.Empty).ToLower() == dataKind);
-
- if (matched != default)
- {
- this.currentKind = matched;
+ this.currentWidget = targetModule;
}
else
{
@@ -124,59 +106,113 @@ internal class DataWindow : Window
///
public override void Draw()
{
- if (ImGuiComponents.IconButton("forceReload", FontAwesomeIcon.Sync)) this.Load();
- if (ImGui.IsItemHovered()) ImGui.SetTooltip("Force Reload");
- ImGui.SameLine();
- var copy = ImGuiComponents.IconButton("copyAll", FontAwesomeIcon.ClipboardList);
- if (ImGui.IsItemHovered()) ImGui.SetTooltip("Copy All");
- ImGui.SameLine();
-
- ImGui.SetNextItemWidth(275.0f * ImGuiHelpers.GlobalScale);
- if (ImGui.BeginCombo("Data Kind", this.dataKindNames[this.currentKind]))
+ // Only draw the widget contents if the selection pane is collapsed.
+ if (this.selectionCollapsed)
{
- foreach (var module in this.modules.OrderBy(module => this.dataKindNames[module.DataKind]))
+ this.DrawContents();
+ return;
+ }
+
+ if (ImGui.BeginTable("XlData_Table", 2, ImGuiTableFlags.BordersInnerV | ImGuiTableFlags.Resizable))
+ {
+ ImGui.TableSetupColumn("##SelectionColumn", ImGuiTableColumnFlags.WidthFixed, 200.0f * ImGuiHelpers.GlobalScale);
+ ImGui.TableSetupColumn("##ContentsColumn", ImGuiTableColumnFlags.WidthStretch);
+
+ ImGui.TableNextColumn();
+ this.DrawSelection();
+
+ ImGui.TableNextColumn();
+ this.DrawContents();
+
+ ImGui.EndTable();
+ }
+ }
+
+ private void DrawSelection()
+ {
+ if (ImGui.BeginChild("XlData_SelectionPane", ImGui.GetContentRegionAvail()))
+ {
+ if (ImGui.BeginListBox("WidgetSelectionListbox", ImGui.GetContentRegionAvail()))
{
- if (ImGui.Selectable(this.dataKindNames[module.DataKind], this.currentKind == module.DataKind))
+ foreach (var widget in this.orderedModules)
{
- this.currentKind = module.DataKind;
+ if (ImGui.Selectable(widget.DisplayName, this.currentWidget == widget))
+ {
+ this.currentWidget = widget;
+ }
+ }
+
+ ImGui.EndListBox();
+ }
+ }
+
+ ImGui.EndChild();
+ }
+
+ private void DrawContents()
+ {
+ if (ImGui.BeginChild("XlData_ContentsPane", ImGui.GetContentRegionAvail()))
+ {
+ if (ImGuiComponents.IconButton("collapse-expand", this.selectionCollapsed ? FontAwesomeIcon.ArrowRight : FontAwesomeIcon.ArrowLeft))
+ {
+ this.selectionCollapsed = !this.selectionCollapsed;
+ }
+
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.SetTooltip($"{(this.selectionCollapsed ? "Expand" : "Collapse")} selection pane");
+ }
+
+ ImGui.SameLine();
+
+ if (ImGuiComponents.IconButton("forceReload", FontAwesomeIcon.Sync))
+ {
+ this.Load();
+ }
+
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.SetTooltip("Force Reload");
+ }
+
+ ImGui.SameLine();
+
+ var copy = ImGuiComponents.IconButton("copyAll", FontAwesomeIcon.ClipboardList);
+
+ ImGuiHelpers.ScaledDummy(10.0f);
+
+ if (ImGui.BeginChild("XlData_WidgetContents", ImGui.GetContentRegionAvail()))
+ {
+ if (copy)
+ ImGui.LogToClipboard();
+
+ try
+ {
+ if (this.currentWidget is { Ready: true })
+ {
+ this.currentWidget.Draw();
+ }
+ else
+ {
+ ImGui.TextUnformatted("Data not ready.");
+ }
+
+ this.isExcept = false;
+ }
+ catch (Exception ex)
+ {
+ if (!this.isExcept)
+ {
+ Log.Error(ex, "Could not draw data");
+ }
+
+ this.isExcept = true;
+
+ ImGui.TextUnformatted(ex.ToString());
}
}
-
- ImGui.EndCombo();
- }
-
- ImGuiHelpers.ScaledDummy(10.0f);
- ImGui.BeginChild("scrolling", Vector2.Zero, false, ImGuiWindowFlags.HorizontalScrollbar);
-
- if (copy)
- ImGui.LogToClipboard();
-
- try
- {
- var selectedWidget = this.modules.FirstOrDefault(dataWindowWidget => dataWindowWidget.DataKind == this.currentKind);
-
- if (selectedWidget is { Ready: true })
- {
- selectedWidget.Draw();
- }
- else
- {
- ImGui.TextUnformatted("Data not ready.");
- }
-
- this.isExcept = false;
- }
- catch (Exception ex)
- {
- if (!this.isExcept)
- {
- Log.Error(ex, "Could not draw data");
- }
-
- this.isExcept = true;
-
- ImGui.TextUnformatted(ex.ToString());
+ ImGui.EndChild();
}
ImGui.EndChild();
diff --git a/Dalamud/Interface/Internal/Windows/Data/IDataWindowWidget.cs b/Dalamud/Interface/Internal/Windows/Data/IDataWindowWidget.cs
index ebbdfff83..0e12e4c51 100644
--- a/Dalamud/Interface/Internal/Windows/Data/IDataWindowWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/IDataWindowWidget.cs
@@ -1,4 +1,7 @@
-namespace Dalamud.Interface.Internal.Windows;
+using System;
+using System.Linq;
+
+namespace Dalamud.Interface.Internal.Windows;
///
/// Class representing a date window entry.
@@ -6,9 +9,14 @@
internal interface IDataWindowWidget
{
///
- /// Gets the Data Kind for this data window module.
+ /// Gets the command strings that can be used to open the data window directly to this module.
///
- DataKind DataKind { get; init; }
+ string[]? CommandShortcuts { get; init; }
+
+ ///
+ /// Gets the display name for this module.
+ ///
+ string DisplayName { get; init; }
///
/// Gets or sets a value indicating whether this data window module is ready.
@@ -24,4 +32,11 @@ internal interface IDataWindowWidget
/// Draws this data window module.
///
void Draw();
+
+ ///
+ /// Helper method to check if this widget should be activated by the input command.
+ ///
+ /// The command being run.
+ /// true if this module should be activated by the input command.
+ bool IsWidgetCommand(string command) => this.CommandShortcuts?.Any(shortcut => string.Equals(shortcut, command, StringComparison.InvariantCultureIgnoreCase)) ?? false;
}
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget.cs
index 977037cc5..b39dfcc4f 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget.cs
@@ -8,7 +8,10 @@ internal class AddonInspectorWidget : IDataWindowWidget
private UiDebug? addonInspector;
///
- public DataKind DataKind { get; init; } = DataKind.Addon_Inspector;
+ public string[]? CommandShortcuts { get; init; } = { "ai", "addoninspector" };
+
+ ///
+ public string DisplayName { get; init; } = "Addon Inspector";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonWidget.cs
index b26b7e311..8d11e6285 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonWidget.cs
@@ -15,7 +15,10 @@ internal unsafe class AddonWidget : IDataWindowWidget
private nint findAgentInterfacePtr;
///
- public DataKind DataKind { get; init; } = DataKind.Addon;
+ public string DisplayName { get; init; } = "Addon";
+
+ ///
+ public string[]? CommandShortcuts { get; init; }
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs
index 606fedadd..2beea905e 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs
@@ -14,7 +14,10 @@ internal class AddressesWidget : IDataWindowWidget
private nint sigResult = nint.Zero;
///
- public DataKind DataKind { get; init; } = DataKind.Address;
+ public string[]? CommandShortcuts { get; init; } = { "address" };
+
+ ///
+ public string DisplayName { get; init; } = "Addresses";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs
index cc4771847..fd4a76544 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs
@@ -9,10 +9,13 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class AetherytesWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.Aetherytes;
+ public bool Ready { get; set; }
///
- public bool Ready { get; set; }
+ public string[]? CommandShortcuts { get; init; } = { "aetherytes" };
+
+ ///
+ public string DisplayName { get; init; } = "Aetherytes";
///
public void Load()
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AtkArrayDataBrowserWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AtkArrayDataBrowserWidget.cs
index df98f99a6..9aac779b3 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AtkArrayDataBrowserWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AtkArrayDataBrowserWidget.cs
@@ -12,10 +12,13 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.AtkArrayData_Browser;
+ public bool Ready { get; set; }
///
- public bool Ready { get; set; }
+ public string[]? CommandShortcuts { get; init; } = { "atkarray" };
+
+ ///
+ public string DisplayName { get; init; } = "Atk Array Data";
///
public void Load()
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/BuddyListWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/BuddyListWidget.cs
index 2aeb9d10d..664b4205e 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/BuddyListWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/BuddyListWidget.cs
@@ -12,10 +12,13 @@ internal class BuddyListWidget : IDataWindowWidget
private bool resolveGameData;
///
- public DataKind DataKind { get; init; } = DataKind.Buddy_List;
+ public bool Ready { get; set; }
///
- public bool Ready { get; set; }
+ public string[]? CommandShortcuts { get; init; } = { "buddy", "buddylist" };
+
+ ///
+ public string DisplayName { get; init; } = "Buddy List";
///
public void Load()
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/CommandWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/CommandWidget.cs
index e415431ba..c7f6564d1 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/CommandWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/CommandWidget.cs
@@ -9,7 +9,10 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class CommandWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.Command;
+ public string[]? CommandShortcuts { get; init; } = { "command" };
+
+ ///
+ public string DisplayName { get; init; } = "Command";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs
index a5224589f..be19d7ae2 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs
@@ -9,10 +9,13 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class ConditionWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.Condition;
+ public bool Ready { get; set; }
///
- public bool Ready { get; set; }
+ public string[]? CommandShortcuts { get; init; } = { "condition" };
+
+ ///
+ public string DisplayName { get; init; } = "Condition";
///
public void Load()
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ConfigurationWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ConfigurationWidget.cs
index 3922f22b7..5b85eb814 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ConfigurationWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ConfigurationWidget.cs
@@ -9,7 +9,10 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class ConfigurationWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.Configuration;
+ public string[]? CommandShortcuts { get; init; } = { "config", "configuration" };
+
+ ///
+ public string DisplayName { get; init; } = "Configuration";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/DataShareWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/DataShareWidget.cs
index ec7124042..d89be3357 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/DataShareWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/DataShareWidget.cs
@@ -9,7 +9,10 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class DataShareWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.Data_Share;
+ public string[]? CommandShortcuts { get; init; } = { "datashare" };
+
+ ///
+ public string DisplayName { get; init; } = "Data Share";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs
index 6d3a67e1a..125d6dbbf 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs
@@ -14,7 +14,10 @@ internal class DtrBarWidget : IDataWindowWidget
private DtrBarEntry? dtrTest3;
///
- public DataKind DataKind { get; init; } = DataKind.Dtr_Bar;
+ public string[]? CommandShortcuts { get; init; } = { "dtr", "dtrbar" };
+
+ ///
+ public string DisplayName { get; init; } = "DTR Bar";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs
index 779032f1d..ca77f089f 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs
@@ -11,7 +11,10 @@ internal class FateTableWidget : IDataWindowWidget
private bool resolveGameData;
///
- public DataKind DataKind { get; init; } = DataKind.Fate_Table;
+ public string[]? CommandShortcuts { get; init; } = { "fate", "fatetable" };
+
+ ///
+ public string DisplayName { get; init; } = "Fate Table";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs
index 99c1a3e02..ff937996e 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs
@@ -22,7 +22,10 @@ internal class FlyTextWidget : IDataWindowWidget
private Vector4 flyColor = new(1, 0, 0, 1);
///
- public DataKind DataKind { get; init; } = DataKind.FlyText;
+ public string[]? CommandShortcuts { get; init; } = { "flytext" };
+
+ ///
+ public string DisplayName { get; init; } = "Fly Text";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs
index 1ed5e9e83..036ea7000 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs
@@ -20,7 +20,10 @@ internal class FontAwesomeTestWidget : IDataWindowWidget
private bool iconSearchChanged = true;
///
- public DataKind DataKind { get; init; } = DataKind.FontAwesome_Test;
+ public string[]? CommandShortcuts { get; init; } = { "fa", "fatest", "fontawesome" };
+
+ ///
+ public string DisplayName { get; init; } = "Font Awesome Test";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs
index 1a4408d53..b20e0132e 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs
@@ -11,7 +11,10 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class GamepadWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.Gamepad;
+ public string[]? CommandShortcuts { get; init; } = { "gamepad", "controller" };
+
+ ///
+ public string DisplayName { get; init; } = "Gamepad";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/GaugeWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/GaugeWidget.cs
index 02862b33d..dee7999ee 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/GaugeWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/GaugeWidget.cs
@@ -12,7 +12,10 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class GaugeWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.Gauge;
+ public string[]? CommandShortcuts { get; init; } = { "gauge", "jobgauge", "job" };
+
+ ///
+ public string DisplayName { get; init; } = "Job Gauge";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs
index aa565b1e6..d5c566e52 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs
@@ -23,8 +23,11 @@ internal class HookWidget : IDataWindowWidget
NativeFunctions.MessageBoxType type);
///
- public DataKind DataKind { get; init; } = DataKind.Hook;
+ public string DisplayName { get; init; } = "Hook";
+ ///
+ public string[]? CommandShortcuts { get; init; } = { "hook" };
+
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ImGuiWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ImGuiWidget.cs
index 8afce718f..311004f2d 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ImGuiWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ImGuiWidget.cs
@@ -12,7 +12,10 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class ImGuiWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.ImGui;
+ public string[]? CommandShortcuts { get; init; } = { "imgui" };
+
+ ///
+ public string DisplayName { get; init; } = "ImGui";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs
index accc48b4b..ce072abc4 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs
@@ -10,7 +10,10 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class KeyStateWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.KeyState;
+ public string[]? CommandShortcuts { get; init; } = { "keystate" };
+
+ ///
+ public string DisplayName { get; init; } = "KeyState";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs
index 01d0b1759..d1c0150dc 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs
@@ -54,7 +54,10 @@ internal class NetworkMonitorWidget : IDataWindowWidget
}
///
- public DataKind DataKind { get; init; } = DataKind.Network_Monitor;
+ public string[]? CommandShortcuts { get; init; } = { "network", "netmon", "networkmonitor" };
+
+ ///
+ public string DisplayName { get; init; } = "Network Monitor";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs
index dd41315f2..42ce3ced6 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs
@@ -19,8 +19,11 @@ internal class ObjectTableWidget : IDataWindowWidget
private float maxCharaDrawDistance = 20.0f;
///
- public DataKind DataKind { get; init; } = DataKind.Object_Table;
+ public string[]? CommandShortcuts { get; init; } = { "ot", "objecttable" };
+ ///
+ public string DisplayName { get; init; } = "Object Table";
+
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/PartyListWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/PartyListWidget.cs
index c5ac1fb8f..369fd7620 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/PartyListWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/PartyListWidget.cs
@@ -12,7 +12,10 @@ internal class PartyListWidget : IDataWindowWidget
private bool resolveGameData;
///
- public DataKind DataKind { get; init; } = DataKind.Party_List;
+ public string[]? CommandShortcuts { get; init; } = { "partylist", "party" };
+
+ ///
+ public string DisplayName { get; init; } = "Party List";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs
index 9aae9bba3..b89ead526 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs
@@ -19,7 +19,10 @@ internal class PluginIpcWidget : IDataWindowWidget
private string callGateResponse = string.Empty;
///
- public DataKind DataKind { get; init; } = DataKind.Plugin_IPC;
+ public string[]? CommandShortcuts { get; init; } = { "ipc" };
+
+ ///
+ public string DisplayName { get; init; } = "Plugin IPC";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeFontTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeFontTestWidget.cs
index a642c439d..89dc5735a 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeFontTestWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeFontTestWidget.cs
@@ -9,7 +9,10 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class SeFontTestWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.SE_Font_Test;
+ public string[]? CommandShortcuts { get; init; } = { "sefont", "sefonttest" };
+
+ ///
+ public string DisplayName { get; init; } = "SeFont Test";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ServerOpcodeWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ServerOpcodeWidget.cs
index f414e0957..6adf02b3d 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ServerOpcodeWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ServerOpcodeWidget.cs
@@ -12,7 +12,10 @@ internal class ServerOpcodeWidget : IDataWindowWidget
private string? serverOpString;
///
- public DataKind DataKind { get; init; } = DataKind.Server_OpCode;
+ public string[]? CommandShortcuts { get; init; } = { "opcode", "serveropcode" };
+
+ ///
+ public string DisplayName { get; init; } = "Server Opcode";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/StartInfoWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/StartInfoWidget.cs
index 656efe388..e635b55e0 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/StartInfoWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/StartInfoWidget.cs
@@ -9,7 +9,10 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class StartInfoWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.StartInfo;
+ public string[]? CommandShortcuts { get; init; } = { "startinfo" };
+
+ ///
+ public string DisplayName { get; init; } = "Start Info";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/TargetWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/TargetWidget.cs
index f33e67f70..39c6d5b18 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/TargetWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/TargetWidget.cs
@@ -13,7 +13,10 @@ internal class TargetWidget : IDataWindowWidget
private bool resolveGameData;
///
- public DataKind DataKind { get; init; } = DataKind.Target;
+ public string[]? CommandShortcuts { get; init; } = { "target" };
+
+ ///
+ public string DisplayName { get; init; } = "Target";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/TaskSchedulerWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/TaskSchedulerWidget.cs
index 7d91cd154..35d449443 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/TaskSchedulerWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/TaskSchedulerWidget.cs
@@ -20,7 +20,10 @@ internal class TaskSchedulerWidget : IDataWindowWidget
private CancellationTokenSource taskSchedulerCancelSource = new();
///
- public DataKind DataKind { get; init; } = DataKind.TaskSched;
+ public string[]? CommandShortcuts { get; init; } = { "tasksched", "taskscheduler" };
+
+ ///
+ public string DisplayName { get; init; } = "Task Scheduler";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs
index 5ad5868c3..9c1f93b0b 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs
@@ -28,7 +28,10 @@ internal class TexWidget : IDataWindowWidget
private Vector2 inputTexScale = Vector2.Zero;
///
- public DataKind DataKind { get; init; } = DataKind.Tex;
+ public string[]? CommandShortcuts { get; init; } = { "tex", "texture" };
+
+ ///
+ public string DisplayName { get; init; } = "Tex";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs
index c75230e73..336312e87 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs
@@ -19,7 +19,10 @@ internal class ToastWidget : IDataWindowWidget
private bool questToastCheckmark;
///
- public DataKind DataKind { get; init; } = DataKind.Toast;
+ public string[]? CommandShortcuts { get; init; } = { "toast" };
+
+ ///
+ public string DisplayName { get; init; } = "Toast";
///
public bool Ready { get; set; }
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs
index 1d0ccdce6..d2d480fff 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs
@@ -12,7 +12,10 @@ namespace Dalamud.Interface.Internal.Windows.Data;
internal class UIColorWidget : IDataWindowWidget
{
///
- public DataKind DataKind { get; init; } = DataKind.UIColor;
+ public string[]? CommandShortcuts { get; init; } = { "uicolor" };
+
+ ///
+ public string DisplayName { get; init; } = "UIColor";
///
public bool Ready { get; set; }