Exemple #1
0
 void CheckBox::mouseClicked(MouseEvent& mouseEvent)
 {
     if (mouseEvent.GetButton() == MouseEvent::LEFT)
     {
         toggleSelected();
     }
 }
Exemple #2
0
    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();
}
Exemple #5
0
//==============================================================================
// User interaction methods
//==============================================================================
void ListItem::activate()
{
	toggleSelected();
}