bool ClientPage::textEntered(sf::Uint32 character) { bool didReturn = ipTextBox.textEntered(character); didReturn = didReturn || portTextBox.textEntered(character); if(didReturn) submitForm(); return true; }
/** The function to call to performed operation * * it successively calls controlBefore, computePostedData, submitForm and * controlAfter. * * \return true if all operations are successful, otherwise returns false. */ bool RainbruRPG::Network::Ident::CurlSubmitForm::perform(){ bool ret=false; LOGI(_("Performing CurlSubmitForm action...")); if (controlBefore()){ // Control before success if (computePostedData()){ // Compute data success if (submitForm()){ // Form submitting success if (controlAfter()){ // The operation is successful ret=true; } else{ LOGW(_("CurlSubmitForm controlAfter() failed...")); ret=false; } } else{ LOGW(_("CurlSubmitForm failed to submit form...")); ret=false; } } else{ LOGW(_("CurlSubmitForm failed to compute posted data...")); ret=false; } } else{ LOGW(_("CurlSubmitForm controlBefore() failed...")); ret=false; } return ret; }
bool ClientPage::mouseReleased(sf::Mouse::Button button, int x, int y) { bool wasClicked = backButton.mouseReleased(button, x, y); if(wasClicked) *pageNum = 1; wasClicked = connectButton.mouseReleased(button, x, y); if(wasClicked) submitForm(); return true; }
void OutgoingAdHocCommandSession::goNext(Form::ref form) { submitForm(form, Command::Next); }
void OutgoingAdHocCommandSession::complete(Form::ref form) { submitForm(form, Command::Complete); }
void OutgoingAdHocCommandSession::goBack() { submitForm(Form::ref(), Command::Prev); }
void OutgoingAdHocCommandSession::cancel() { if (!sessionID_.empty()) { submitForm(Form::ref(), Command::Cancel); } }