Cleanup, using Mouse.warp and Mouse.lock, window.onMouseMoveRelative, removing 'button' value from mouse move event

This commit is contained in:
Joshua Granick
2015-03-26 02:10:08 -07:00
parent 3ea7830673
commit 6d8c9458fe
24 changed files with 233 additions and 204 deletions

View File

@@ -3,6 +3,7 @@
#include <ui/MouseCursor.h>
#include <ui/Window.h>
namespace lime {
@@ -14,11 +15,11 @@ namespace lime {
static MouseCursor currentCursor;
static void WarpGlobal (int x, int y);
static void SetLock (bool value);
static void Hide ();
static void SetCursor (MouseCursor cursor);
static void SetLock (bool lock);
static void Show ();
static void Warp (int x, int y, Window* window);
};

View File

@@ -30,6 +30,8 @@ namespace lime {
static void Dispatch (MouseEvent* event);
int button;
double movementX;
double movementY;
MouseEventType type;
double x;
double y;

View File

@@ -28,7 +28,6 @@ namespace lime {
virtual bool SetFullscreen (bool fullscreen) = 0;
virtual void SetIcon (ImageBuffer *imageBuffer) = 0;
virtual bool SetMinimized (bool minimized) = 0;
virtual void WarpMouse (int x, int y) = 0;
Application* currentApplication;
int flags;