* Allow usage of / to start a command quickly.

* Allow usage of escape key to get out of chat screen.
This commit is contained in:
iProgramInCpp
2023-08-07 21:59:18 +03:00
parent 4c09bd2b1c
commit d5a733466d
3 changed files with 8 additions and 3 deletions

View File

@@ -10,8 +10,10 @@
// @NOTE: This is unused.
ChatScreen::ChatScreen() : m_textChat(1, 0, 0), m_btnSend(2, 0, 0, "Send")
ChatScreen::ChatScreen(bool slash) : m_textChat(1, 0, 0), m_btnSend(2, 0, 0, "Send")
{
if (slash)
m_textChat.m_text = "/";
}
void ChatScreen::buttonClicked(Button* pButton)
@@ -60,6 +62,8 @@ void ChatScreen::keyPressed(int keyCode)
{
if (keyCode == AKEYCODE_ENTER)
sendMessageAndExit();
Screen::keyPressed(keyCode);
}
void ChatScreen::sendMessageAndExit()