Solved
I want to know the X and Y coordinates when the button is pressed
Thank you for helping.
At the event of pressing the button of the view class
Is there a way to find out the touched X, Y coordinates?
Thank you.
Thank you for helping.
At the event of pressing the button of the view class
Is there a way to find out the touched X, Y coordinates?
Thank you.
Hi Ebun.1,
You cannot do that simply like this.
I would highly recommend you to use handleClickEvent() function and do something like :
void Screen1View::handleClickEvent(const ClickEvent& evt)
{
if(button1.getAbsoluteRect().intersect(evt.getX(), evt.getY()))
{
if(evt.getType() == ClickEvent::PRESSED)
{
//retrieve x, y with evt.getX()/evt.getY()
//Do whatever you want, you can even call other functions
}
}
Screen1ViewBase::handleClickEvent(evt);
}/Alexandre
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.