void MSEntryFieldCombo::buttonPress(const XEvent *pEvent_) { if (sensitive()==MSTrue) { if(pEvent_->xbutton.x<_fieldValue->x()+_fieldValue->width()) { MSEntryField::buttonPress(pEvent_); } else { activate(); if (_editor->mapped()==MSFalse) { MSBoolean focusOK=MSTrue; if (acceptFocus()==MSTrue) focusOK=traverseFocus(this); if (focusOK==MSTrue) { if (pEvent_->xbutton.button==Button1&&_buttonFlags!=0) { if (comboOrTextButton()==MSTrue&& pEvent_->xbutton.x>=buttonRect().x()&& pEvent_->xbutton.y>=buttonRect().y()) { if(buttonState(ComboButton) == MSTrue) { buttonActivate(); } else { drawTextButton(MSTrue); _buttonSelected = MSTrue; } } else if(buttonState(UpDownArrows) == MSTrue) { if (isProtected()==MSFalse) { if(pEvent_->xbutton.y <_fieldValue->y() +_fieldValue->height()/2) armUpArrow(); else armDownArrow(); } } } } } } } }
void StartMenu::update() { if(HowToPlay == false) { updateCurrentButton(); changeButton(); } if(LevelManager::getInstance()->getCurrentLevel() > 0) { Resumedraw = false; } else { Resumedraw = true; } updateButtons(); buttonActivate(); }