Question
How do I get click coordinates continuously?
Hello!
I want to click on the touch screen, get the coordinates, then, without releasing my finger, move my finger and get new coordinates continuously.
Like slider widget)
How do I do this?
This code
void PRINT_PROGRESS_ScreenView::Box3DClickHandler(const BoxWithBorder& b, const ClickEvent& evt)
{
if (&b == &Box3D)
{
//Implement what should happen when 'box' is touched/clicked here.
// if(evt.getType() == ClickEvent::PRESSED)
// {
int x = evt.getX();
int y = evt.getY();
// Do something with x and y, such as...
// presenter->touchRegistered(x, y); // you write this function in the presenter
// }
}
}gives coordinates only twice time - at pressing and at releasing ....