mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: close gamepad overlay when setting is disabled
This commit is contained in:
parent
bf72ad589d
commit
b7cbaacac6
5 changed files with 16 additions and 8 deletions
|
|
@ -128,9 +128,9 @@ namespace Dalamud.Game.Gui.Internal
|
|||
private void ToggleWindow(bool visible)
|
||||
{
|
||||
if (visible)
|
||||
Service<DalamudInterface>.Get().OpenIMEWindow();
|
||||
Service<DalamudInterface>.Get().OpenImeWindow();
|
||||
else
|
||||
Service<DalamudInterface>.Get().CloseIMEWindow();
|
||||
Service<DalamudInterface>.Get().CloseImeWindow();
|
||||
}
|
||||
|
||||
private long WndProcDetour(IntPtr hWnd, uint msg, ulong wParam, long lParam)
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ namespace Dalamud.Interface.Internal
|
|||
|
||||
private void OnDebugDrawIMEPanel(string command, string arguments)
|
||||
{
|
||||
Service<DalamudInterface>.Get().OpenIMEWindow();
|
||||
Service<DalamudInterface>.Get().OpenImeWindow();
|
||||
}
|
||||
|
||||
private void OnOpenLog(string command, string arguments)
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ namespace Dalamud.Interface.Internal
|
|||
/// <summary>
|
||||
/// Opens the <see cref="IMEWindow"/>.
|
||||
/// </summary>
|
||||
public void OpenIMEWindow() => this.imeWindow.IsOpen = true;
|
||||
public void OpenImeWindow() => this.imeWindow.IsOpen = true;
|
||||
|
||||
/// <summary>
|
||||
/// Opens the <see cref="ConsoleWindow"/>.
|
||||
|
|
@ -263,7 +263,7 @@ namespace Dalamud.Interface.Internal
|
|||
/// Opens the <see cref="StyleEditorWindow"/>.
|
||||
/// </summary>
|
||||
public void OpenStyleEditor() => this.styleEditorWindow.IsOpen = true;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Opens the <see cref="ProfilerWindow"/>.
|
||||
/// </summary>
|
||||
|
|
@ -276,7 +276,12 @@ namespace Dalamud.Interface.Internal
|
|||
/// <summary>
|
||||
/// Closes the <see cref="IMEWindow"/>.
|
||||
/// </summary>
|
||||
public void CloseIMEWindow() => this.imeWindow.IsOpen = false;
|
||||
public void CloseImeWindow() => this.imeWindow.IsOpen = false;
|
||||
|
||||
/// <summary>
|
||||
/// Closes the <see cref="GamepadModeNotifierWindow"/>.
|
||||
/// </summary>
|
||||
public void CloseGamepadModeNotifierWindow() => this.gamepadModeNotifierWindow.IsOpen = false;
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
/// <inheritdoc/>
|
||||
public override void Draw()
|
||||
{
|
||||
if (this.IsOpen && Service<KeyState>.Get()[VirtualKey.SHIFT]) Service<DalamudInterface>.Get().CloseIMEWindow();
|
||||
if (this.IsOpen && Service<KeyState>.Get()[VirtualKey.SHIFT]) Service<DalamudInterface>.Get().CloseImeWindow();
|
||||
var ime = Service<DalamudIME>.GetNullable();
|
||||
|
||||
if (ime == null || !ime.IsEnabled)
|
||||
|
|
@ -42,7 +42,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
/// <inheritdoc/>
|
||||
public override void PostDraw()
|
||||
{
|
||||
if (this.IsOpen && Service<KeyState>.Get()[VirtualKey.SHIFT]) Service<DalamudInterface>.Get().CloseIMEWindow();
|
||||
if (this.IsOpen && Service<KeyState>.Get()[VirtualKey.SHIFT]) Service<DalamudInterface>.Get().CloseImeWindow();
|
||||
var ime = Service<DalamudIME>.GetNullable();
|
||||
|
||||
if (ime == null || !ime.IsEnabled)
|
||||
|
|
|
|||
|
|
@ -952,6 +952,9 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
{
|
||||
ImGui.GetIO().BackendFlags &= ~ImGuiBackendFlags.HasGamepad;
|
||||
ImGui.GetIO().ConfigFlags &= ~ImGuiConfigFlags.NavEnableSetMousePos;
|
||||
|
||||
var di = Service<DalamudInterface>.Get();
|
||||
di.CloseGamepadModeNotifierWindow();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue