diff options
author | Andrei Karas <akaras@inbox.ru> | 2020-05-07 12:22:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2020-05-07 12:41:56 +0300 |
commit | 4bb9a1021066ef96e7b424fe7a3949cbbcfa195c (patch) | |
tree | 547859c6d825513aa984d57fc8617fb4943f60be /src/gui | |
parent | 75b5c657a149010e075f172cc9262432399ba54c (diff) | |
download | ManaVerse-4bb9a1021066ef96e7b424fe7a3949cbbcfa195c.tar.gz ManaVerse-4bb9a1021066ef96e7b424fe7a3949cbbcfa195c.tar.bz2 ManaVerse-4bb9a1021066ef96e7b424fe7a3949cbbcfa195c.tar.xz ManaVerse-4bb9a1021066ef96e7b424fe7a3949cbbcfa195c.zip |
Fix code style after merged switch port code
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/sdlinput.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 5 | ||||
-rw-r--r-- | src/gui/windows/logindialog.cpp | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index c4c7c9741..00c95092e 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -141,11 +141,11 @@ void SDLInput::pushInput(const SDL_Event &event) #ifdef __SWITCH__ // send an enter/select key on keyboard dismiss event bool visible = SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE; - if(visible) + if (visible) { keyboardClosed = false; } - else if(!keyboardClosed) + else if (!keyboardClosed) { simulateKey(KeyValue::ENTER, InputAction::GUI_SELECT2); keyboardClosed = true; diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 759764e48..7fc059f5c 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -823,11 +823,12 @@ void ChatWindow::keyPressed(KeyEvent &event) const InputActionT actionId = event.getActionId(); std::string temp; #ifdef __SWITCH__ - if(event.getKey().getValue() == KeyValue::TEXTINPUT) + if (event.getKey().getValue() == KeyValue::TEXTINPUT) { action(ActionEvent(this, "chatinput")); return; - } else + } + else #endif if (actionId == InputAction::GUI_DOWN) { diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index 7f36704cb..168b1b76a 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -74,10 +74,11 @@ LoginDialog::LoginDialog(LoginData &data, mUserField(new TextField(this, mLoginData->username, LoseFocusOnTab_true, nullptr, std::string(), false)), mPassField(new PasswordField(this, mLoginData->password)), - // TRANSLATORS: login dialog label #ifdef SAVE_PASSWORD + // TRANSLATORS: login dialog label mKeepCheck(new CheckBox(this, _("Remember user and password"), #else + // TRANSLATORS: login dialog label mKeepCheck(new CheckBox(this, _("Remember username"), #endif mLoginData->remember, nullptr, std::string())), @@ -209,9 +210,8 @@ void LoginDialog::postInit() #else if (mUserField->getText().empty()) mUserField->requestFocus(); - else { + else mPassField->requestFocus(); - } #endif mLoginButton->setEnabled(canSubmit()); |