mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 00:04:43 +01:00
implement textinput_cancel and refactor textinput event calls
This commit is contained in:
@@ -207,7 +207,7 @@ static void window_banner_mouseup()
|
||||
window_text_input_open(w, WIDX_BANNER_TEXT, 2982, 2983, gBanners[w->number].string_idx, 0, 32);
|
||||
break;
|
||||
case WIDX_BANNER_NO_ENTRY:
|
||||
RCT2_CALLPROC_EBPSAFE(0x006EE3C3);
|
||||
textinput_cancel();
|
||||
banner->flags ^= BANNER_FLAG_NO_ENTRY;
|
||||
window_invalidate(w);
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ static void window_text_input_mouseup(){
|
||||
// Pass back the text that has been entered.
|
||||
// ecx when zero means text input failed
|
||||
if (calling_w != NULL)
|
||||
RCT2_CALLPROC_X(calling_w->event_handlers[WE_TEXT_INPUT], 0, 0, 0, calling_widget, (int)calling_w, (int)text_input, 0);
|
||||
window_event_textinput_call(calling_w, calling_widget, NULL);
|
||||
window_close(w);
|
||||
break;
|
||||
case WIDX_OKAY:
|
||||
@@ -248,7 +248,7 @@ static void window_text_input_mouseup(){
|
||||
// Pass back the text that has been entered.
|
||||
// ecx when none zero means text input success
|
||||
if (calling_w != NULL)
|
||||
RCT2_CALLPROC_X(calling_w->event_handlers[WE_TEXT_INPUT], 0, 0, 1, calling_widget, (int)calling_w, (int)text_input, 0);
|
||||
window_event_textinput_call(calling_w, calling_widget, text_input);
|
||||
window_close(w);
|
||||
}
|
||||
}
|
||||
@@ -340,7 +340,7 @@ static void window_text_input_text(int key, rct_window* w){
|
||||
// Pass back the text that has been entered.
|
||||
// ecx when none zero means text input success
|
||||
if (calling_w)
|
||||
RCT2_CALLPROC_X(calling_w->event_handlers[WE_TEXT_INPUT], 0, 0, 1, calling_widget, (int)calling_w, (int)text_input, 0);
|
||||
window_event_textinput_call(calling_w, calling_widget, text_input);
|
||||
}
|
||||
|
||||
window_invalidate(w);
|
||||
|
||||
Reference in New Issue
Block a user