diff --git a/android/src/main/java/STKEditText.java b/android/src/main/java/STKEditText.java index 739d2e4af..03087701f 100644 --- a/android/src/main/java/STKEditText.java +++ b/android/src/main/java/STKEditText.java @@ -189,12 +189,16 @@ public class STKEditText extends EditText setInputType(InputType.TYPE_CLASS_TEXT); break; case 1: - setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); + setInputType(InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); break; case 2: - setInputType(InputType.TYPE_CLASS_NUMBER); + setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); break; case 3: + setInputType(InputType.TYPE_CLASS_NUMBER); + break; + case 4: setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); break; default: diff --git a/src/guiengine/widgets/text_box_widget.hpp b/src/guiengine/widgets/text_box_widget.hpp index 27dc9d452..529022909 100644 --- a/src/guiengine/widgets/text_box_widget.hpp +++ b/src/guiengine/widgets/text_box_widget.hpp @@ -31,10 +31,11 @@ namespace GUIEngine // This enum can allow showing different soft keyboard in android enum TextBoxType: int { - TBT_TEXT = 0, - TBT_PASSWORD = 1, - TBT_NUMBER = 2, - TBT_EMAIL = 3, + TBT_TEXT = 0, /* Normal text input (default) */ + TBT_CAP_SENTENCES = 1, /* Capitalize the first character of each sentence */ + TBT_PASSWORD = 2, /* Password input */ + TBT_NUMBER = 3, /* Number only input */ + TBT_EMAIL = 4, /* Email input */ }; class ITextBoxWidgetListener diff --git a/src/states_screens/dialogs/race_paused_dialog.cpp b/src/states_screens/dialogs/race_paused_dialog.cpp index cae827026..1503e7bbd 100644 --- a/src/states_screens/dialogs/race_paused_dialog.cpp +++ b/src/states_screens/dialogs/race_paused_dialog.cpp @@ -74,6 +74,7 @@ RacePausedDialog::RacePausedDialog(const float percentWidth, music_manager->pauseMusic(); SFXManager::get()->pauseAll(); m_text_box->clearListeners(); + m_text_box->setTextBoxType(TBT_CAP_SENTENCES); if (UserConfigParams::m_lobby_chat) { m_text_box->setActive(true); diff --git a/src/states_screens/online/networking_lobby.cpp b/src/states_screens/online/networking_lobby.cpp index b3b00392a..03a088858 100644 --- a/src/states_screens/online/networking_lobby.cpp +++ b/src/states_screens/online/networking_lobby.cpp @@ -188,6 +188,7 @@ void NetworkingLobby::init() m_state = LS_CONNECTING; m_chat_box->setVisible(false); m_chat_box->setActive(false); + m_chat_box->setTextBoxType(TBT_CAP_SENTENCES); m_send_button->setVisible(false); m_send_button->setActive(false);