From dcd10e240182d4673c4b19ac16325110ff4d39d2 Mon Sep 17 00:00:00 2001 From: Anna Clemens Date: Sun, 10 Jul 2022 13:50:07 -0400 Subject: [PATCH] fix: set keyboard focus correctly --- Glamaholic/Glamaholic.csproj | 4 ++++ Glamaholic/Ui/Helpers/HelperUtil.cs | 2 +- Glamaholic/Ui/MainInterface.cs | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Glamaholic/Glamaholic.csproj b/Glamaholic/Glamaholic.csproj index a92b33f..6ed8619 100755 --- a/Glamaholic/Glamaholic.csproj +++ b/Glamaholic/Glamaholic.csproj @@ -16,6 +16,10 @@ $(AppData)\XIVLauncher\addon\Hooks\dev + + $(DALAMUD_HOME) + + $(HOME)/dalamud diff --git a/Glamaholic/Ui/Helpers/HelperUtil.cs b/Glamaholic/Ui/Helpers/HelperUtil.cs index b29549b..807b6e1 100755 --- a/Glamaholic/Ui/Helpers/HelperUtil.cs +++ b/Glamaholic/Ui/Helpers/HelperUtil.cs @@ -111,7 +111,7 @@ namespace Glamaholic.Ui.Helpers { ImGui.PopTextWrapPos(); if (ImGui.IsWindowAppearing()) { - ImGui.SetKeyboardFocusHere(); + ImGui.SetKeyboardFocusHere(-1); } ImGui.Separator(); diff --git a/Glamaholic/Ui/MainInterface.cs b/Glamaholic/Ui/MainInterface.cs index 6ad5b7b..29dae85 100755 --- a/Glamaholic/Ui/MainInterface.cs +++ b/Glamaholic/Ui/MainInterface.cs @@ -410,7 +410,7 @@ namespace Glamaholic.Ui { ImGui.InputText("##dye-filter", ref this._dyeFilter, 512); if (ImGui.IsWindowAppearing()) { - ImGui.SetKeyboardFocusHere(); + ImGui.SetKeyboardFocusHere(-1); } if (ImGui.BeginChild("dye picker", new Vector2(250, 350), false, ImGuiWindowFlags.HorizontalScrollbar)) { @@ -453,7 +453,7 @@ namespace Glamaholic.Ui { } if (ImGui.IsWindowAppearing()) { - ImGui.SetKeyboardFocusHere(); + ImGui.SetKeyboardFocusHere(-1); } if (GameFunctions.DresserContents.Count > 0) { @@ -778,7 +778,7 @@ namespace Glamaholic.Ui { } if (this._showRename && !renameWasVisible) { - ImGui.SetKeyboardFocusHere(); + ImGui.SetKeyboardFocusHere(-1); } if (this._editing) {