void CheckBox::mouseClicked(MouseEvent& mouseEvent) { if (mouseEvent.GetButton() == MouseEvent::LEFT) { toggleSelected(); } }
void CheckBox::keyPressed(KeyEvent& keyEvent) { Key key = keyEvent.getKey(); if (key.getValue() == Key::ENTER || key.getValue() == Key::SPACE) { toggleSelected(); keyEvent.consume(); } }
void RCCheckButton::ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent) { CCRect checkBtnRect = getNodeRect(); if(checkBtnRect.containsPoint(convertToNodeSpace(pTouch->getLocation()))) { toggleSelected(); if(m_pListener && m_pfnSelector) { (m_pListener->*m_pfnSelector)(this); } } m_pText->setColor(m_normalLabelColor); }
void Card::click() { toggleSelected(); }
//============================================================================== // User interaction methods //============================================================================== void ListItem::activate() { toggleSelected(); }