Push string accumule comme il faut

This commit is contained in:
mduval76 2023-12-08 22:15:10 -05:00
parent 9562dc00b8
commit 850f5a59d8
2 changed files with 7 additions and 2 deletions

View File

@ -759,10 +759,14 @@ void Engine::DisplayLobbyMenu(float elapsedTime) {
std::ostringstream ss;
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
if (m_charChanged) {
ss << m_inputChar;
if (m_charChanged && m_currentInputString.size() < 26) {
m_currentInputString += m_inputChar;
}
ss << m_currentInputString;
m_charChanged = false;
if (lobbyTime < onInterval) {
ss << "_";
}

View File

@ -204,6 +204,7 @@ private:
bool m_selectedQuit = false;
char m_inputChar = 0;
std::string m_currentInputString;
bool m_charChanged = false;
bool m_key1 = false;