mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
feat: add plugin API for interfaces
This commit is contained in:
parent
099e0e107b
commit
feb8edb6c9
5 changed files with 71 additions and 9 deletions
|
|
@ -10,6 +10,7 @@ using Dalamud.Game.ClientState;
|
|||
using Dalamud.Game.Command;
|
||||
using Dalamud.Game.Internal;
|
||||
using Dalamud.Game.Internal.Gui;
|
||||
using Dalamud.Interface;
|
||||
|
||||
namespace Dalamud.Plugin
|
||||
{
|
||||
|
|
@ -32,6 +33,11 @@ namespace Dalamud.Plugin
|
|||
/// </summary>
|
||||
public readonly Framework Framework;
|
||||
|
||||
/// <summary>
|
||||
/// The InterfaceManager object which allows you to draw UI into the game via ImGui draw calls.
|
||||
/// </summary>
|
||||
public readonly InterfaceManager Interface;
|
||||
|
||||
private readonly Dalamud dalamud;
|
||||
private readonly string pluginName;
|
||||
|
||||
|
|
@ -43,6 +49,7 @@ namespace Dalamud.Plugin
|
|||
this.CommandManager = dalamud.CommandManager;
|
||||
this.Framework = dalamud.Framework;
|
||||
this.ClientState = dalamud.ClientState;
|
||||
this.Interface = dalamud.InterfaceManager;
|
||||
|
||||
this.dalamud = dalamud;
|
||||
this.pluginName = pluginName;
|
||||
|
|
@ -61,6 +68,9 @@ namespace Dalamud.Plugin
|
|||
return;
|
||||
}
|
||||
|
||||
if (currentConfig == null)
|
||||
return;
|
||||
|
||||
this.dalamud.Configuration.PluginConfigurations.Add(this.pluginName, currentConfig);
|
||||
this.dalamud.Configuration.Save(this.dalamud.StartInfo.ConfigurationPath);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue