Project

General

Profile

« Previous | Next » 

Revision 360f78de

Added by david.sorber over 1 year ago

Setting default focus on filter text box for account screen. Also adding
ImGui example program for reference.

View differences:

src/main.cc
ImVec2(0,
-ImGui::GetFrameHeightWithSpacing()));
// Set default focus on the filter text box
// See: https://github.com/ocornut/imgui/issues/455
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) &&
!ImGui::IsAnyItemActive() &&
!ImGui::IsMouseClicked(0))
{
ImGui::SetKeyboardFocusHere(0);
}
ImGui::InputText("Filter", filterBuffer,
IM_ARRAYSIZE(filterBuffer),
ImGuiInputTextFlags_CallbackEdit,

Also available in: Unified diff