MCPcopy Create free account
hub / github.com/ddnet/ddnet / SetSearching

Method SetSearching

src/game/client/components/console.cpp:848–863  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

846}
847
848void CGameConsole::CInstance::SetSearching(bool Searching)
849{
850 m_Searching = Searching;
851 if(Searching)
852 {
853 m_Input.SetClipboardLineCallback(nullptr); // restore default behavior (replace newlines with spaces)
854 m_Input.Set(m_aCurrentSearchString);
855 m_Input.SelectAll();
856 UpdateSearch();
857 }
858 else
859 {
860 m_Input.SetClipboardLineCallback([this](const char *pLine) { ExecuteLine(pLine); });
861 m_Input.Clear();
862 }
863}
864
865void CGameConsole::CInstance::ClearSearch()
866{

Callers

nothing calls this directly

Calls 4

SelectAllMethod · 0.80
SetMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected