mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Fixed an issue where line breaks could not be inserted into multline text entry fields.
This commit is contained in:
parent
2874d9abdc
commit
c45678e857
|
@ -155,11 +155,16 @@ bool TextEditComponent::input(InputConfig* config, Input input)
|
||||||
if (mEditing) {
|
if (mEditing) {
|
||||||
if (config->getDeviceId() == DEVICE_KEYBOARD) {
|
if (config->getDeviceId() == DEVICE_KEYBOARD) {
|
||||||
// Special handling for keyboard input as the "A" and "B" buttons are overridden.
|
// Special handling for keyboard input as the "A" and "B" buttons are overridden.
|
||||||
if (input.id == SDLK_RETURN) {
|
if (input.id == SDLK_RETURN || input.id == SDLK_KP_ENTER) {
|
||||||
if (isMultiline())
|
if (isMultiline()) {
|
||||||
|
const bool maskValue {mMaskInput};
|
||||||
|
mMaskInput = false;
|
||||||
textInput("\n");
|
textInput("\n");
|
||||||
else
|
mMaskInput = maskValue;
|
||||||
|
}
|
||||||
|
else {
|
||||||
stopEditing();
|
stopEditing();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue