C++ 예제 이벤트 클래스
기타/C++ GUI2015.10.28 20:43
C++ example Event Class
마우스 클릭할 때 이미지가 움직이도록 이벤트 호출
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | // Event handler for mouse clicks. // class EB_clickEventHandler : public B::flash::events::EventListenerBase { virtual void operator()(B::flash::events::IP_Event a_ipEvent) { B *pMain = (Main*)a_ipEvent->m_ipCurrentTarget.get(); // Function 1. Start the timer and play animation. // if(a_ipEvent->m_ipTarget == pMain->txt) { pMain->clickEventHandler(); } // Function 2. Reset the timer. // else if(a_ipEvent->m_ipTarget == pMain->txt2) { pMain->timer->reset(); } // Function 3. Stop the timer. // else if(a_ipEvent->m_ipTarget == pMain->txt3) { pMain->timer->stop(); } } }; | cs |
'기타 > C++ GUI' 카테고리의 다른 글
Billboarding Code (0) | 2015.11.03 |
---|---|
C++ 예제 이벤트 클래스 (0) | 2015.10.28 |
Good Class code using C++ (0) | 2015.10.28 |
Image Transform(get,set) (0) | 2015.10.27 |
댓글 영역