mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 05:43:40 +01:00
feat: settings window rework
This commit is contained in:
parent
0dc58cce56
commit
bc3dcdfad7
22 changed files with 1724 additions and 1084 deletions
|
|
@ -363,7 +363,7 @@ public sealed unsafe class GameGui : IDisposable, IServiceType
|
|||
/// </summary>
|
||||
/// <param name="addonPtr">The addon address.</param>
|
||||
/// <returns>A pointer to the agent interface.</returns>
|
||||
public unsafe IntPtr FindAgentInterface(IntPtr addonPtr)
|
||||
public IntPtr FindAgentInterface(IntPtr addonPtr)
|
||||
{
|
||||
if (addonPtr == IntPtr.Zero)
|
||||
return IntPtr.Zero;
|
||||
|
|
@ -411,11 +411,26 @@ public sealed unsafe class GameGui : IDisposable, IServiceType
|
|||
this.utf8StringFromSequenceHook.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the game is on the title screen.
|
||||
/// </summary>
|
||||
/// <returns>A value indicating whether or not the game is on the title screen.</returns>
|
||||
internal bool IsOnTitleScreen()
|
||||
{
|
||||
var charaSelect = this.GetAddonByName("CharaSelect", 1);
|
||||
var charaMake = this.GetAddonByName("CharaMake", 1);
|
||||
var titleDcWorldMap = this.GetAddonByName("TitleDCWorldMap", 1);
|
||||
if (charaMake != nint.Zero || charaSelect != nint.Zero || titleDcWorldMap != nint.Zero)
|
||||
return false;
|
||||
|
||||
return !Service<ClientState.ClientState>.Get().IsLoggedIn;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the current background music.
|
||||
/// </summary>
|
||||
/// <param name="bgmKey">The background music key.</param>
|
||||
public void SetBgm(ushort bgmKey) => this.setGlobalBgmHook.Original(bgmKey, 0, 0, 0, 0, 0);
|
||||
internal void SetBgm(ushort bgmKey) => this.setGlobalBgmHook.Original(bgmKey, 0, 0, 0, 0, 0);
|
||||
|
||||
/// <summary>
|
||||
/// Reset the stored "UI hide" state.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue