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); }
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 ); } }