/** * React on keypress * * @author Divan */ bool iwPostWindow::Msg_KeyDown(const KeyEvent& ke) { switch(ke.kt) { default: break; case KT_DELETE: // Delete current message { Msg_ButtonClick(15); } return true; } switch(ke.c) { case '+': // Next message { Msg_ButtonClick(10); } return true; case '-': // Previous message { Msg_ButtonClick(9); } return true; case 'g': // Go to site of event { if (GameClient::inst().GetPostMessages().size()) { Msg_ButtonClick(14); } } return true; } return false; }
/** * React on keypress */ bool iwPostWindow::Msg_KeyDown(const KeyEvent& ke) { switch(ke.kt) { default: break; case KT_DELETE: // Delete current message #ifdef __APPLE__ case KT_BACKSPACE: // Macs usually have no delete key on small keyboards, so backspace is more convenient #endif Msg_ButtonClick(ID_DELETE); return true; } switch(ke.c) { case '+': // Next message Msg_ButtonClick(ID_GO_FWD); return true; case '-': // Previous message Msg_ButtonClick(ID_GO_BACK); return true; case 'g': // Go to site of event Msg_ButtonClick(ID_GOTO); return true; } return false; }
/** * Bei Enter nächstes Steuerelement auswählen * * @author FloSoft */ void iwDirectIPCreate::Msg_EditEnter(const unsigned int ctrl_id) { ctrlEdit* name = GetCtrl<ctrlEdit>(1); ctrlEdit* port = GetCtrl<ctrlEdit>(3); ctrlEdit* pass = GetCtrl<ctrlEdit>(5); switch(ctrl_id) { case 1: { name->SetFocus(false); port->SetFocus(true); pass->SetFocus(false); } break; case 3: { name->SetFocus(false); port->SetFocus(false); pass->SetFocus(false); } break; case 5: { // Starten klicken Msg_ButtonClick(7); } break; } }
/** * * * @author FloSoft */ void iwLobbyConnect::Msg_EditEnter(const unsigned int ctrl_id) { ctrlEdit* user = GetCtrl<ctrlEdit>(1); ctrlEdit* pass = GetCtrl<ctrlEdit>(3); ctrlEdit* email = GetCtrl<ctrlEdit>(5); switch(ctrl_id) { case 1: { user->SetFocus(false); pass->SetFocus(true); email->SetFocus(false); } break; case 3: { user->SetFocus(false); pass->SetFocus(false); email->SetFocus(true); } break; case 5: { Msg_ButtonClick(7); } break; } }
/** * * * @author Divan */ bool ctrlProgress::Msg_WheelDown(const MouseCoords& mc) { // If mouse is over the controls, simulate button click if(Coll(mc.x, mc.y, GetX(), GetY(), width_, height_)) { Msg_ButtonClick(0); return true; } return false; }