Push string accumule comme il faut
This commit is contained in:
parent
9562dc00b8
commit
850f5a59d8
@ -759,10 +759,14 @@ void Engine::DisplayLobbyMenu(float elapsedTime) {
|
|||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
if (m_charChanged) {
|
if (m_charChanged && m_currentInputString.size() < 26) {
|
||||||
ss << m_inputChar;
|
m_currentInputString += m_inputChar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ss << m_currentInputString;
|
||||||
|
m_charChanged = false;
|
||||||
|
|
||||||
|
|
||||||
if (lobbyTime < onInterval) {
|
if (lobbyTime < onInterval) {
|
||||||
ss << "_";
|
ss << "_";
|
||||||
}
|
}
|
||||||
|
@ -204,6 +204,7 @@ private:
|
|||||||
bool m_selectedQuit = false;
|
bool m_selectedQuit = false;
|
||||||
|
|
||||||
char m_inputChar = 0;
|
char m_inputChar = 0;
|
||||||
|
std::string m_currentInputString;
|
||||||
bool m_charChanged = false;
|
bool m_charChanged = false;
|
||||||
|
|
||||||
bool m_key1 = false;
|
bool m_key1 = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user