feat: add missing search
This commit is contained in:
parent
cf16b931bb
commit
ee404dea95
@ -178,6 +178,13 @@ internal class Write : ITab {
|
|||||||
|
|
||||||
using var endCombo = new OnDispose(ImGui.EndCombo);
|
using var endCombo = new OnDispose(ImGui.EndCombo);
|
||||||
|
|
||||||
|
if (ImGui.IsWindowAppearing()) {
|
||||||
|
ImGui.SetKeyboardFocusHere();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui.SetNextItemWidth(-1);
|
||||||
|
ImGui.InputTextWithHint("###word-search", "Search...", ref search, 100, ImGuiInputTextFlags.AutoSelectAll);
|
||||||
|
|
||||||
for (var wordIdx = 0; wordIdx < template.Words.Length; wordIdx++) {
|
for (var wordIdx = 0; wordIdx < template.Words.Length; wordIdx++) {
|
||||||
var word = template.Words[wordIdx];
|
var word = template.Words[wordIdx];
|
||||||
if (!string.IsNullOrEmpty(search) && !word.Contains(search, StringComparison.InvariantCultureIgnoreCase)) {
|
if (!string.IsNullOrEmpty(search) && !word.Contains(search, StringComparison.InvariantCultureIgnoreCase)) {
|
||||||
@ -206,7 +213,12 @@ internal class Write : ITab {
|
|||||||
|
|
||||||
using var endMenu = new OnDispose(ImGui.EndMenu);
|
using var endMenu = new OnDispose(ImGui.EndMenu);
|
||||||
|
|
||||||
ImGui.InputText("###word-search", ref search, 100);
|
if (ImGui.IsWindowAppearing()) {
|
||||||
|
ImGui.SetKeyboardFocusHere();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui.SetNextItemWidth(-1);
|
||||||
|
ImGui.InputTextWithHint("###word-search", "Search...", ref search, 100, ImGuiInputTextFlags.AutoSelectAll);
|
||||||
|
|
||||||
for (var wordIdx = 0; wordIdx < list.Words.Length; wordIdx++) {
|
for (var wordIdx = 0; wordIdx < list.Words.Length; wordIdx++) {
|
||||||
var word = list.Words[wordIdx];
|
var word = list.Words[wordIdx];
|
||||||
|
Loading…
Reference in New Issue
Block a user