mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-28 07:59:37 -06:00
modification to allow gui control through touch
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
namespace openspace {
|
||||
|
||||
gui::GUI OnScreenGUIModule::gui;
|
||||
Touch OnScreenGUIModule::touchInput;
|
||||
|
||||
OnScreenGUIModule::OnScreenGUIModule()
|
||||
: OpenSpaceModule("OnScreenGUI")
|
||||
@@ -135,7 +136,10 @@ OnScreenGUIModule::OnScreenGUIModule()
|
||||
uint32_t mouseButtons = wrapper.mouseButtons(2);
|
||||
|
||||
double dt = std::max(wrapper.averageDeltaTime(), 0.0);
|
||||
|
||||
if (touchInput.active && mouseButtons == 0) {
|
||||
mouseButtons = touchInput.action;
|
||||
mousePosition = touchInput.pos;
|
||||
}
|
||||
// We don't do any collection of immediate mode user interface, so it is
|
||||
// fine to open and close a frame immediately
|
||||
gui.startFrame(
|
||||
|
||||
Reference in New Issue
Block a user