//ImGui::SameLine(); ImGui::Text("(?)"); if (ImGui::IsHovered()) ImGui::SetTooltip("Use ImGui::PushAllowKeyboardFocus(bool)\nto disable tabbing through certain widgets.");
ImGui::PopAllowKeyboardFocus();
ImGui::InputText("5",buf,IM_ARRAYSIZE(buf));
ImGui::TreePop();
}
if(ImGui::TreeNode("Focus from code"))
{
boolfocus_1=ImGui::Button("Focus on 1");ImGui::SameLine();
boolfocus_2=ImGui::Button("Focus on 2");ImGui::SameLine();
boolfocus_3=ImGui::Button("Focus on 3");
staticcharbuf[128]="click on a button to set focus";
// Read 'Programmer guide' in .cpp for notes on how to setup ImGui in your codebase.
@ -153,12 +153,13 @@ namespace ImGui
ImDrawList*GetWindowDrawList();// get rendering command-list if you want to append your own draw primitives.
voidSetWindowFontScale(floatscale);// per-window font scale. Adjust IO.FontBaseScale if you want to scale all windows together.
voidSetScrollPosHere();// adjust scrolling position to center into the current cursor position.
voidSetKeyboardFocusHere();
voidSetTreeStateStorage(ImGuiStorage*tree);// replace tree state storage with our own (if you want to manipulate it yourself, typically clear subsection of it).
ImGuiStorage*GetTreeStateStorage();
voidPushItemWidth(floatitem_width);
voidPopItemWidth();
floatGetItemWidth();
voidPushAllowKeyboardFocus(boolv);
voidPushAllowKeyboardFocus(boolv);// allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets.