diff --git a/Dalamud/Interface/DalamudInterface.cs b/Dalamud/Interface/DalamudInterface.cs
index 9283ff79e..e7d330b55 100644
--- a/Dalamud/Interface/DalamudInterface.cs
+++ b/Dalamud/Interface/DalamudInterface.cs
@@ -35,6 +35,7 @@ namespace Dalamud.Interface
private readonly ComponentDemoWindow componentDemoWindow;
private readonly ColorDemoWindow colorDemoWindow;
private readonly ScratchpadWindow scratchpadWindow;
+ private readonly GamepadModeNotifierWindow gamepadModeNotifierWindow;
private readonly WindowSystem windowSystem = new WindowSystem("DalamudCore");
@@ -116,6 +117,9 @@ namespace Dalamud.Interface
};
this.windowSystem.AddWindow(this.scratchpadWindow);
+ this.gamepadModeNotifierWindow = new GamepadModeNotifierWindow();
+ this.windowSystem.AddWindow(this.gamepadModeNotifierWindow);
+
Log.Information("[DUI] Windows added");
if (dalamud.Configuration.LogOpenAtStartup)
@@ -553,5 +557,13 @@ namespace Dalamud.Interface
{
this.scratchpadWindow.IsOpen ^= true;
}
+
+ ///
+ /// Toggle the gamepad notifier window window.
+ ///
+ internal void ToggleGamePadNotifierWindow()
+ {
+ this.gamepadModeNotifierWindow.IsOpen ^= true;
+ }
}
}
diff --git a/Dalamud/Interface/GamepadModeNotifierWindow.cs b/Dalamud/Interface/GamepadModeNotifierWindow.cs
new file mode 100644
index 000000000..b3cbef108
--- /dev/null
+++ b/Dalamud/Interface/GamepadModeNotifierWindow.cs
@@ -0,0 +1,41 @@
+using System.Numerics;
+
+using Dalamud.Interface.Windowing;
+using ImGuiNET;
+
+namespace Dalamud.Interface
+{
+ ///
+ /// Class responsible for drawing a notifier on screen that gamepad mode is active.
+ ///
+ internal class GamepadModeNotifierWindow : Window
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GamepadModeNotifierWindow()
+ : base(
+ "###DalamudGamepadModeNotifier",
+ ImGuiWindowFlags.NoDecoration | ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoMouseInputs
+ | ImGuiWindowFlags.NoFocusOnAppearing | ImGuiWindowFlags.NoBackground | ImGuiWindowFlags.NoNav
+ | ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings,
+ true)
+ {
+ this.Size = Vector2.Zero;
+ this.SizeCondition = ImGuiCond.Always;
+ this.IsOpen = false;
+ }
+
+ ///
+ /// Draws a light grey-ish, main-viewport-big filled rect in the background draw list alongside a text indicating gamepad mode.
+ ///
+ public override void Draw()
+ {
+ var drawList = ImGui.GetBackgroundDrawList();
+ drawList.PushClipRectFullScreen();
+ drawList.AddRectFilled(Vector2.Zero, ImGuiHelpers.MainViewport.Size, 0x661A1A1A);
+ drawList.AddText(Vector2.One, 0xFFFFFFFF, "Gamepad mode is ON. Press R1+L3 to deactivate, press R3 to toggle PluginInstaller.");
+ drawList.PopClipRect();
+ }
+ }
+}
diff --git a/Dalamud/Interface/InterfaceManager.cs b/Dalamud/Interface/InterfaceManager.cs
index 604c95266..4d7f8ecc4 100644
--- a/Dalamud/Interface/InterfaceManager.cs
+++ b/Dalamud/Interface/InterfaceManager.cs
@@ -488,6 +488,7 @@ namespace Dalamud.Interface
{
ImGui.GetIO().ConfigFlags ^= ImGuiConfigFlags.NavEnableGamepad;
this.dalamud.ClientState.GamepadState.NavEnableGamepad ^= true;
+ this.dalamud.DalamudUi.ToggleGamePadNotifierWindow();
}
if (gamepadEnabled