add tap event on iOS

This commit is contained in:
2019-11-26 21:44:01 +01:00
parent 9eafcecde9
commit 64f6b90911
5 changed files with 80 additions and 3 deletions

View File

@@ -454,6 +454,18 @@ bool App::gesture_end()
ret = main->on_event(&e);
return ret == kEventResult::Consumed;
}
bool App::touch_tap(const glm::vec2& pos, int fingers, int tap_count)
{
redraw = true;
TouchEvent e;
e.m_type = kEventType::TouchTap;
e.m_finger_count = fingers;
e.m_tap_count = tap_count;
kEventResult ret = kEventResult::Available;
if (auto* main = layout[main_id])
ret = main->on_event(&e);
return ret == kEventResult::Consumed;
}
bool App::key_down(kKey key)
{
if (key == kKey::KeySpacebar && vr_active)