コード例 #1
0
	void onButtonA( Gwen::Controls::Base* pControl )
	{
		Gwen::Controls::Button* but = (Gwen::Controls::Button*) pControl;
//		int dep = but->IsDepressed();
		int tog = but->GetToggleState();
		if (m_data->m_toggleButtonCallback)
			(*m_data->m_toggleButtonCallback)(m_buttonId,tog);
	}
コード例 #2
0
	void onButtonPress( Gwen::Controls::Base* pControl )
	{
		if (m_callback)
		{
            bool buttonState = true;
            if (m_buttonControl->IsToggle())
            {
                buttonState = m_buttonControl->GetToggleState();
            }
            ( *m_callback )( m_buttonId, buttonState, m_userPointer );
		}
	}