mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Only reclaim focus where necessary
Only reclaim it when its actually needed to be reclaimed, else other UI components will not work properly.
This commit is contained in:
parent
836839e6a5
commit
9e9614f908
@ -292,6 +292,8 @@ void CConsole::DrawSurface(void)
|
|||||||
m_bModifyInput = true;
|
m_bModifyInput = true;
|
||||||
|
|
||||||
ResetAutoComplete();
|
ResetAutoComplete();
|
||||||
|
m_bReclaimFocus = true;
|
||||||
|
|
||||||
BuildSummary(m_svInputConVar);
|
BuildSummary(m_svInputConVar);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -303,6 +305,8 @@ void CConsole::DrawSurface(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ResetAutoComplete();
|
ResetAutoComplete();
|
||||||
|
m_bReclaimFocus = true;
|
||||||
|
|
||||||
BuildSummary();
|
BuildSummary();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -328,6 +332,8 @@ void CConsole::DrawSurface(void)
|
|||||||
m_bModifyInput = true;
|
m_bModifyInput = true;
|
||||||
}
|
}
|
||||||
ResetAutoComplete();
|
ResetAutoComplete();
|
||||||
|
m_bReclaimFocus = true;
|
||||||
|
|
||||||
BuildSummary();
|
BuildSummary();
|
||||||
}
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
@ -441,6 +447,7 @@ void CConsole::SuggestPanel(void)
|
|||||||
|
|
||||||
memmove(m_szInputBuf, svConVar.data(), svConVar.size() + 1);
|
memmove(m_szInputBuf, svConVar.data(), svConVar.size() + 1);
|
||||||
ClearAutoComplete();
|
ClearAutoComplete();
|
||||||
|
m_bReclaimFocus = true;
|
||||||
|
|
||||||
// Mutex lock is obtained here are we modify m_vHistory
|
// Mutex lock is obtained here are we modify m_vHistory
|
||||||
// which is used in the main and render thread.
|
// which is used in the main and render thread.
|
||||||
@ -554,7 +561,6 @@ void CConsole::ResetAutoComplete(void)
|
|||||||
m_bCanAutoComplete = false;
|
m_bCanAutoComplete = false;
|
||||||
m_bSuggestActive = false;
|
m_bSuggestActive = false;
|
||||||
m_nSuggestPos = -1;
|
m_nSuggestPos = -1;
|
||||||
m_bReclaimFocus = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -972,6 +978,7 @@ int CConsole::TextEditCallback(ImGuiInputTextCallbackData* iData)
|
|||||||
m_svInputConVar.clear();
|
m_svInputConVar.clear();
|
||||||
|
|
||||||
ClearAutoComplete();
|
ClearAutoComplete();
|
||||||
|
m_bReclaimFocus = true;
|
||||||
}
|
}
|
||||||
m_bModifyInput = false;
|
m_bModifyInput = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user