mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 13:23:59 +02:00
ported new mouse changes by Titi to win32 (and removed debug output for image classes)
This commit is contained in:
@@ -35,6 +35,7 @@ int Window::nextClassName= 0;
|
||||
Window::WindowMap Window::createdWindows;
|
||||
|
||||
unsigned int Window::lastMouseEvent = 0; /** for use in mouse hover calculations */
|
||||
static int oldX=0,oldY=0;
|
||||
Vec2i Window::mousePos;
|
||||
MouseState Window::mouseState;
|
||||
|
||||
@@ -68,6 +69,13 @@ Window::~Window(){
|
||||
//static
|
||||
bool Window::handleEvent(){
|
||||
MSG msg;
|
||||
|
||||
POINT point;
|
||||
bool ret = GetCursorPos(&point);
|
||||
if(ret == true) {
|
||||
oldX = point.x;
|
||||
oldY = point.y;
|
||||
}
|
||||
|
||||
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)){
|
||||
if(msg.message==WM_QUIT){
|
||||
@@ -80,6 +88,10 @@ bool Window::handleEvent(){
|
||||
return true;
|
||||
}
|
||||
|
||||
void Window::revertMousePos() {
|
||||
SetCursorPos(oldX, oldY);
|
||||
}
|
||||
|
||||
string Window::getText(){
|
||||
if(handle==0){
|
||||
return text;
|
||||
|
Reference in New Issue
Block a user