fix: use keyboard focus correctly
This commit is contained in:
@@ -433,10 +433,6 @@ internal sealed class ChatLog : IUiComponent {
|
|||||||
? this.DrawTabSidebar()
|
? this.DrawTabSidebar()
|
||||||
: this.DrawTabBar();
|
: this.DrawTabBar();
|
||||||
|
|
||||||
if (this.Activate) {
|
|
||||||
ImGui.SetKeyboardFocusHere();
|
|
||||||
}
|
|
||||||
|
|
||||||
Tab? activeTab = null;
|
Tab? activeTab = null;
|
||||||
if (currentTab > -1 && currentTab < this.Ui.Plugin.Config.Tabs.Count) {
|
if (currentTab > -1 && currentTab < this.Ui.Plugin.Config.Tabs.Count) {
|
||||||
activeTab = this.Ui.Plugin.Config.Tabs[currentTab];
|
activeTab = this.Ui.Plugin.Config.Tabs[currentTab];
|
||||||
@@ -545,6 +541,10 @@ internal sealed class ChatLog : IUiComponent {
|
|||||||
ImGui.PushStyleColor(ImGuiCol.Text, ColourUtil.RgbaToAbgr(inputColour.Value));
|
ImGui.PushStyleColor(ImGuiCol.Text, ColourUtil.RgbaToAbgr(inputColour.Value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.Activate) {
|
||||||
|
ImGui.SetKeyboardFocusHere();
|
||||||
|
}
|
||||||
|
|
||||||
var chatCopy = this.Chat;
|
var chatCopy = this.Chat;
|
||||||
ImGui.SetNextItemWidth(inputWidth);
|
ImGui.SetNextItemWidth(inputWidth);
|
||||||
const ImGuiInputTextFlags inputFlags = ImGuiInputTextFlags.CallbackAlways
|
const ImGuiInputTextFlags inputFlags = ImGuiInputTextFlags.CallbackAlways
|
||||||
@@ -1093,7 +1093,7 @@ internal sealed class ChatLog : IUiComponent {
|
|||||||
|
|
||||||
if (ImGui.IsWindowAppearing()) {
|
if (ImGui.IsWindowAppearing()) {
|
||||||
this._fixCursor = true;
|
this._fixCursor = true;
|
||||||
ImGui.SetKeyboardFocusHere();
|
ImGui.SetKeyboardFocusHere(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui.BeginChild("##auto-complete-list", Vector2.Zero, false, ImGuiWindowFlags.HorizontalScrollbar)) {
|
if (ImGui.BeginChild("##auto-complete-list", Vector2.Zero, false, ImGuiWindowFlags.HorizontalScrollbar)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user