mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
SetKeyboardFocusHere() added assert to prevent passing values smaller than -1 as we may have to outlaw them (I think nobody was using that)
This commit is contained in:
@ -5457,6 +5457,7 @@ void ImGui::SetScrollHere(float center_y_ratio)
|
||||
|
||||
void ImGui::SetKeyboardFocusHere(int offset)
|
||||
{
|
||||
IM_ASSERT(offset >= -1); // -1 is allowed but not below
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
window->FocusIdxAllRequestNext = window->FocusIdxAllCounter + 1 + offset;
|
||||
window->FocusIdxTabRequestNext = INT_MAX;
|
||||
|
Reference in New Issue
Block a user