mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 06:19:57 -05:00
Changes to touch module to allow it to build with or without webbrowser module enabled (#808)
This commit is contained in:
committed by
Emil Axelsson
parent
f49202c36c
commit
63c1ac89fb
@@ -23,8 +23,9 @@
|
||||
****************************************************************************************/
|
||||
|
||||
#include <modules/touch/touchmodule.h>
|
||||
#ifdef OPENSPACE_MODULE_WEBBROWSER_ENABLED
|
||||
#include <modules/webbrowser/webbrowsermodule.h>
|
||||
#include <modules/webgui/webguimodule.h>
|
||||
#endif
|
||||
|
||||
#include <openspace/engine/globals.h>
|
||||
#include <openspace/engine/globalscallbacks.h>
|
||||
@@ -122,6 +123,7 @@ void TouchModule::hasNewWebInput(const std::vector<TuioCursor>& listOfContactPoi
|
||||
listOfContactPoints.at(0).getScreenY(res.y)
|
||||
);
|
||||
|
||||
#ifdef OPENSPACE_MODULE_WEBBROWSER_ENABLED
|
||||
WebBrowserModule& module = *(global::moduleEngine.module<WebBrowserModule>());
|
||||
if (module.eventHandler().hasContentCallback(pos.x, pos.y)) {
|
||||
webPositionCallback = glm::vec2(pos.x, pos.y);
|
||||
@@ -134,6 +136,7 @@ void TouchModule::hasNewWebInput(const std::vector<TuioCursor>& listOfContactPoi
|
||||
module.eventHandler().touchReleaseCallback(webPositionCallback.x,
|
||||
webPositionCallback.y);
|
||||
webPositionCallback = glm::vec2(0, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user