MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / ExecuteInput

Method ExecuteInput

SDK/src/NDK/Console.cpp:301–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299 */
300
301 void Console::ExecuteInput()
302 {
303 Nz::String input = m_inputDrawer.GetText();
304 Nz::String inputCmd = input.SubString(s_inputPrefixSize);
305 m_inputDrawer.SetText(s_inputPrefix);
306
307 if (m_commandHistory.empty() || m_commandHistory.back() != inputCmd)
308 m_commandHistory.push_back(inputCmd);
309
310 m_historyPosition = 0;
311
312 AddLineInternal(input); //< With the input prefix
313
314 if (!m_state.Execute(inputCmd))
315 AddLineInternal(m_state.GetLastError(), Nz::Color::Red);
316
317 RefreshHistory();
318 }
319
320 /*!
321 * \brief Places the console according to its layout

Callers

nothing calls this directly

Calls 5

SubStringMethod · 0.80
SetTextMethod · 0.80
push_backMethod · 0.80
ExecuteMethod · 0.80
GetLastErrorMethod · 0.45

Tested by

no test coverage detected