| 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 |
nothing calls this directly
no test coverage detected