public void onClick(View arg0) { Intent intent=getIntent(); int value= Integer.parseInt(editNumber.getText()+""); intent.putExtra("data", value); setResult(MainActivity.B, intent); finish(); }
/** * * rct2: 0x0066DDF2 */ static void window_save_prompt_mouseup(rct_window *w, rct_widgetindex widgetIndex) { if (gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) { switch (widgetIndex) { case WQIDX_OK: game_load_or_quit_no_save_prompt(); break; case WQIDX_CLOSE: case WQIDX_CANCEL: window_close(w); break; } return; } else { switch (widgetIndex) { case WIDX_SAVE: { Intent * intent; if (gScreenFlags & (SCREEN_FLAGS_EDITOR)) { intent = new Intent(WC_LOADSAVE); intent->putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE); intent->putExtra(INTENT_EXTRA_PATH, std::string{gS6Info.name}); } else { intent = (Intent *) create_save_game_as_intent(); } window_close(w); intent->putExtra(INTENT_EXTRA_CALLBACK, (void *) window_save_prompt_callback); context_open_intent(intent); delete intent; break; } case WIDX_DONT_SAVE: game_load_or_quit_no_save_prompt(); return; case WIDX_CLOSE: case WIDX_CANCEL: window_close(w); return; } } }