mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 04:13:40 +01:00
Miscellaneous improvements (#1537)
This commit is contained in:
parent
a6ea4aa56a
commit
7a0de45f87
15 changed files with 1136 additions and 279 deletions
|
|
@ -18,39 +18,39 @@ internal class DataWindow : Window
|
|||
{
|
||||
private readonly IDataWindowWidget[] modules =
|
||||
{
|
||||
new ServicesWidget(),
|
||||
new AddressesWidget(),
|
||||
new ObjectTableWidget(),
|
||||
new FateTableWidget(),
|
||||
new SeFontTestWidget(),
|
||||
new FontAwesomeTestWidget(),
|
||||
new PartyListWidget(),
|
||||
new BuddyListWidget(),
|
||||
new PluginIpcWidget(),
|
||||
new ConditionWidget(),
|
||||
new GaugeWidget(),
|
||||
new CommandWidget(),
|
||||
new AddonWidget(),
|
||||
new AddonInspectorWidget(),
|
||||
new AddonLifecycleWidget(),
|
||||
new AddonWidget(),
|
||||
new AddressesWidget(),
|
||||
new AetherytesWidget(),
|
||||
new AtkArrayDataBrowserWidget(),
|
||||
new BuddyListWidget(),
|
||||
new CommandWidget(),
|
||||
new ConditionWidget(),
|
||||
new ConfigurationWidget(),
|
||||
new DataShareWidget(),
|
||||
new DtrBarWidget(),
|
||||
new FateTableWidget(),
|
||||
new FlyTextWidget(),
|
||||
new FontAwesomeTestWidget(),
|
||||
new GamepadWidget(),
|
||||
new GaugeWidget(),
|
||||
new HookWidget(),
|
||||
new IconBrowserWidget(),
|
||||
new ImGuiWidget(),
|
||||
new KeyStateWidget(),
|
||||
new NetworkMonitorWidget(),
|
||||
new ObjectTableWidget(),
|
||||
new PartyListWidget(),
|
||||
new PluginIpcWidget(),
|
||||
new SeFontTestWidget(),
|
||||
new ServicesWidget(),
|
||||
new StartInfoWidget(),
|
||||
new TargetWidget(),
|
||||
new ToastWidget(),
|
||||
new FlyTextWidget(),
|
||||
new ImGuiWidget(),
|
||||
new TexWidget(),
|
||||
new KeyStateWidget(),
|
||||
new GamepadWidget(),
|
||||
new ConfigurationWidget(),
|
||||
new TaskSchedulerWidget(),
|
||||
new HookWidget(),
|
||||
new AetherytesWidget(),
|
||||
new DtrBarWidget(),
|
||||
new TexWidget(),
|
||||
new ToastWidget(),
|
||||
new UIColorWidget(),
|
||||
new DataShareWidget(),
|
||||
new NetworkMonitorWidget(),
|
||||
new IconBrowserWidget(),
|
||||
new AddonLifecycleWidget(),
|
||||
};
|
||||
|
||||
private readonly IOrderedEnumerable<IDataWindowWidget> orderedModules;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows;
|
||||
namespace Dalamud.Interface.Internal.Windows.Data;
|
||||
|
||||
/// <summary>
|
||||
/// Class representing a date window entry.
|
||||
|
|
|
|||
|
|
@ -28,8 +28,14 @@ public class AddonLifecycleWidget : IDataWindowWidget
|
|||
/// <inheritdoc/>
|
||||
public void Load()
|
||||
{
|
||||
this.AddonLifecycle = Service<AddonLifecycle>.GetNullable();
|
||||
if (this.AddonLifecycle is not null) this.Ready = true;
|
||||
Service<AddonLifecycle>
|
||||
.GetAsync()
|
||||
.ContinueWith(
|
||||
r =>
|
||||
{
|
||||
this.AddonLifecycle = r.Result;
|
||||
this.Ready = true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
|
|
|||
|
|
@ -38,12 +38,30 @@ internal class FontAwesomeTestWidget : IDataWindowWidget
|
|||
public void Draw()
|
||||
{
|
||||
ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, Vector2.Zero);
|
||||
|
||||
this.iconCategories ??= FontAwesomeHelpers.GetCategories();
|
||||
|
||||
this.iconCategories ??= new[] { "(Show All)", "(Undefined)" }
|
||||
.Concat(FontAwesomeHelpers.GetCategories().Skip(1))
|
||||
.ToArray();
|
||||
|
||||
if (this.iconSearchChanged)
|
||||
{
|
||||
this.icons = FontAwesomeHelpers.SearchIcons(this.iconSearchInput, this.iconCategories[this.selectedIconCategory]);
|
||||
if (this.iconSearchInput == string.Empty && this.selectedIconCategory <= 1)
|
||||
{
|
||||
var en = InterfaceManager.IconFont.GlyphsWrapped()
|
||||
.Select(x => (FontAwesomeIcon)x.Codepoint)
|
||||
.Where(x => (ushort)x is >= 0xE000 and < 0xF000);
|
||||
en = this.selectedIconCategory == 0
|
||||
? en.Concat(FontAwesomeHelpers.SearchIcons(string.Empty, string.Empty))
|
||||
: en.Except(FontAwesomeHelpers.SearchIcons(string.Empty, string.Empty));
|
||||
this.icons = en.Distinct().Order().ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.icons = FontAwesomeHelpers.SearchIcons(
|
||||
this.iconSearchInput,
|
||||
this.selectedIconCategory <= 1 ? string.Empty : this.iconCategories[this.selectedIconCategory]);
|
||||
}
|
||||
|
||||
this.iconNames = this.icons.Select(icon => Enum.GetName(icon)!).ToList();
|
||||
this.iconSearchChanged = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue