mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
refactor: OnOpenConfigUi -> OpenConfigUi
This commit is contained in:
parent
3c65cc95ee
commit
c8cd769ec5
3 changed files with 7 additions and 7 deletions
|
|
@ -36,7 +36,7 @@ namespace Dalamud.CorePlugin
|
||||||
this.windowSystem.AddWindow(new PluginWindow(Dalamud.Instance));
|
this.windowSystem.AddWindow(new PluginWindow(Dalamud.Instance));
|
||||||
|
|
||||||
this.Interface.UiBuilder.Draw += this.OnDraw;
|
this.Interface.UiBuilder.Draw += this.OnDraw;
|
||||||
this.Interface.UiBuilder.OnOpenConfigUi += this.OnOpenConfigUi;
|
this.Interface.UiBuilder.OpenConfigUi += this.OnOpenConfigUi;
|
||||||
|
|
||||||
this.Interface.CommandManager.AddHandler("/di", new(this.OnCommand) { HelpMessage = $"Access the {this.Name} plugin." });
|
this.Interface.CommandManager.AddHandler("/di", new(this.OnCommand) { HelpMessage = $"Access the {this.Name} plugin." });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1019,7 +1019,7 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
plugin.DalamudInterface.UiBuilder.OpenConfigUi();
|
plugin.DalamudInterface.UiBuilder.OpenConfig();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ namespace Dalamud.Interface
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event that is fired when the plugin should open its configuration interface.
|
/// Event that is fired when the plugin should open its configuration interface.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event EventHandler OnOpenConfigUi;
|
public event EventHandler OpenConfigUi;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the default Dalamud font based on Noto Sans CJK Medium in 17pt - supporting all game languages and icons.
|
/// Gets the default Dalamud font based on Noto Sans CJK Medium in 17pt - supporting all game languages and icons.
|
||||||
|
|
@ -128,7 +128,7 @@ namespace Dalamud.Interface
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether this UiBuilder has a configuration UI registered.
|
/// Gets a value indicating whether this UiBuilder has a configuration UI registered.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal bool HasConfigUi => this.OnOpenConfigUi != null;
|
internal bool HasConfigUi => this.OpenConfigUi != null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the time this plugin took to draw on the last frame.
|
/// Gets or sets the time this plugin took to draw on the last frame.
|
||||||
|
|
@ -201,9 +201,9 @@ namespace Dalamud.Interface
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Open the registered configuration UI, if it exists.
|
/// Open the registered configuration UI, if it exists.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal void OpenConfigUi()
|
internal void OpenConfig()
|
||||||
{
|
{
|
||||||
this.OnOpenConfigUi?.Invoke(this, null);
|
this.OpenConfigUi?.Invoke(this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDraw()
|
private void OnDraw()
|
||||||
|
|
@ -243,7 +243,7 @@ namespace Dalamud.Interface
|
||||||
{
|
{
|
||||||
Log.Error(ex, "[{0}] UiBuilder OnBuildUi caught exception", this.namespaceName);
|
Log.Error(ex, "[{0}] UiBuilder OnBuildUi caught exception", this.namespaceName);
|
||||||
this.Draw = null;
|
this.Draw = null;
|
||||||
this.OnOpenConfigUi = null;
|
this.OpenConfigUi = null;
|
||||||
|
|
||||||
this.hasErrorWindow = true;
|
this.hasErrorWindow = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue