1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Move text input widget code from game lib to ui lib

This commit is contained in:
duncanspumpkin
2024-03-22 08:43:42 +00:00
committed by Gymnasiast
parent f4cebb11df
commit 3448926251
15 changed files with 139 additions and 113 deletions

View File

@@ -84,7 +84,7 @@ void TextComposition::HandleMessage(const SDL_Event* e)
Insert(e->text.text);
console.RefreshCaret(_session.SelectionStart);
WindowUpdateTextbox();
OpenRCT2::Ui::Windows::WindowUpdateTextbox();
}
break;
case SDL_KEYDOWN:
@@ -127,7 +127,7 @@ void TextComposition::HandleMessage(const SDL_Event* e)
Delete();
console.RefreshCaret(_session.SelectionStart);
WindowUpdateTextbox();
OpenRCT2::Ui::Windows::WindowUpdateTextbox();
}
break;
case SDLK_HOME:
@@ -149,11 +149,11 @@ void TextComposition::HandleMessage(const SDL_Event* e)
_session.SelectionStart = startOffset;
Delete();
console.RefreshCaret(_session.SelectionStart);
WindowUpdateTextbox();
OpenRCT2::Ui::Windows::WindowUpdateTextbox();
break;
}
case SDLK_RETURN:
WindowCancelTextbox();
OpenRCT2::Ui::Windows::WindowCancelTextbox();
break;
case SDLK_LEFT:
if (modifier & KEYBOARD_PRIMARY_MODIFIER)
@@ -182,7 +182,7 @@ void TextComposition::HandleMessage(const SDL_Event* e)
utf8* text = SDL_GetClipboardText();
Insert(text);
SDL_free(text);
WindowUpdateTextbox();
OpenRCT2::Ui::Windows::WindowUpdateTextbox();
}
break;
}