| 1598 | } |
| 1599 | |
| 1600 | void UIConsole::processLine() { |
| 1601 | String str( mDoc.getCurrentLine().getTextWithoutNewLine() ); |
| 1602 | std::vector<String> params = splitCommandParams( str ); |
| 1603 | |
| 1604 | mLastCommands.push_back( str ); |
| 1605 | mLastLogPos = (int)mLastCommands.size(); |
| 1606 | |
| 1607 | if ( mLastCommands.size() > 20 ) |
| 1608 | mLastCommands.pop_front(); |
| 1609 | |
| 1610 | if ( str.size() > 0 ) { |
| 1611 | privPushText( "> " + str ); |
| 1612 | |
| 1613 | if ( mCallbacks.find( params[0] ) != mCallbacks.end() ) { |
| 1614 | mCallbacks[params[0]]( params ); |
| 1615 | } else { |
| 1616 | privPushText( "Unknown Command: '" + params[0] + "'" ); |
| 1617 | } |
| 1618 | } |
| 1619 | mDoc.replaceCurrentLine( "" ); |
| 1620 | invalidateDraw(); |
| 1621 | } |
| 1622 | |
| 1623 | }} // namespace EE::UI |
nothing calls this directly
no test coverage detected