|
@@ -26,6 +26,7 @@
|
|
|
#include "graphics/dgl.h"
|
|
|
#include "platform/event.h"
|
|
|
#include "platform/platform.h"
|
|
|
+#include "platform/platformInput.h"
|
|
|
#include "platform/platformVideo.h"
|
|
|
#include "gui/guiTypes.h"
|
|
|
#include "gui/guiControl.h"
|
|
@@ -57,6 +58,7 @@ GuiCanvas::GuiCanvas()
|
|
|
|
|
|
cursorON = true;
|
|
|
mShowCursor = false;
|
|
|
+ mUseNativeCursor = true;
|
|
|
|
|
|
lastCursorON = false;
|
|
|
rLastFrameTime = 0.0f;
|
|
@@ -135,6 +137,15 @@ void GuiCanvas::setCursorON(bool onOff)
|
|
|
mMouseControl = NULL;
|
|
|
}
|
|
|
|
|
|
+bool GuiCanvas::getUseNativeCursor(void)
|
|
|
+{
|
|
|
+ return mUseNativeCursor;
|
|
|
+}
|
|
|
+
|
|
|
+void GuiCanvas::useNativeCursor(bool useNative)
|
|
|
+{
|
|
|
+ mUseNativeCursor = useNative;
|
|
|
+}
|
|
|
|
|
|
void GuiCanvas::setCursorPos(const Point2I &pt)
|
|
|
{
|
|
@@ -1295,7 +1306,7 @@ void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */)
|
|
|
dglSetClipRect(updateUnion);
|
|
|
|
|
|
//temp draw the mouse
|
|
|
- if (cursorON && mShowCursor && !mouseCursor)
|
|
|
+ if (cursorON && mShowCursor && !mouseCursor && Canvas->getUseNativeCursor())
|
|
|
{
|
|
|
#if defined(TORQUE_OS_IOS) || defined(TORQUE_OS_ANDROID) || defined(TORQUE_OS_EMSCRIPTEN)
|
|
|
glColor4ub(255, 0, 0, 255);
|