* Updates the original text of the OSK so when the 'parent' changes the * original and you press on cancel you won't get the 'old' original text * but the updated one. * @param parent window that just updated its original text * @param button widget number of parent's textbox to update */
| 404 | * @param button widget number of parent's textbox to update |
| 405 | */ |
| 406 | void UpdateOSKOriginalText(const Window *parent, WidgetID button) |
| 407 | { |
| 408 | OskWindow *osk = dynamic_cast<OskWindow *>(FindWindowById(WC_OSK, 0)); |
| 409 | if (osk == nullptr || osk->parent != parent || osk->text_btn != button) return; |
| 410 | |
| 411 | osk->orig_str = osk->qs->text.GetText(); |
| 412 | |
| 413 | osk->SetDirty(); |
| 414 | } |
| 415 | |
| 416 | /** |
| 417 | * Check whether the OSK is opened for a specific editbox. |
no test coverage detected