Solved
How can I get trigers button click and button unclick?
I want to use a button, than I need button click and unclick time execute virtual function. How can it?
Thanks.
I want to use a button, than I need button click and unclick time execute virtual function. How can it?
Thanks.
I'm not really understand what's you want, but as my guest, I think you need to call function when the button Pressed and one again when Released.
You can refer this function, add to ScreenView.cpp. and dont forget to define it at header file.
Best Regard,
Hieu
void Screen1View::handleClickEvent(const ClickEvent& evt)
{
if (your_object.getRect().intersect(Rect(evt.getX(), evt.getY(), 1, 1)))
{
if (evt.getType() == ClickEvent::PRESSED)
{
// Your code when Pressed
}
if (evt.getType() == ClickEvent::RELEASED)
{
// Your code when Released
}
}
}Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.