allowing touch event to work on iOS and Android
This commit is contained in:
parent
6ac034c803
commit
3debbd2104
@ -319,6 +319,8 @@ nk_sfml_handle_event(sf::Event* evt)
|
||||
} else if(evt->type == sf::Event::TouchBegan || evt->type == sf::Event::TouchEnded) {
|
||||
int down = evt->type == sf::Event::TouchBegan;
|
||||
const int x = evt->touch.x, y = evt->touch.y;
|
||||
ctx->input.mouse.pos.x = x;
|
||||
ctx->input.mouse.pos.y = y;
|
||||
nk_input_button(ctx, NK_BUTTON_LEFT, x, y, down);
|
||||
return 1;
|
||||
} else if(evt->type == sf::Event::TouchMoved) {
|
||||
|
Loading…
Reference in New Issue
Block a user