mirror of
https://github.com/glest/glest-source.git
synced 2025-09-27 16:09:00 +02:00
- added many new things and fixed a number of bugs (too tried to mention them all)
This commit is contained in:
@@ -49,6 +49,7 @@ bool Window::isFullScreen = false;
|
||||
SDL_keysym Window::keystate;
|
||||
|
||||
bool Window::isActive = false;
|
||||
bool Window::no2DMouseRendering = false;
|
||||
|
||||
// ========== PUBLIC ==========
|
||||
|
||||
@@ -176,8 +177,10 @@ bool Window::handleEvent() {
|
||||
Window::isActive = true;
|
||||
}
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Window::isActive = %d\n",__FILE__,__FUNCTION__,__LINE__,Window::isActive);
|
||||
showCursor(!Window::isActive);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Window::isActive = %d\n",__FILE__,__FUNCTION__,__LINE__,Window::isActive);
|
||||
if(Window::isActive && Window::getUseDefaultCursorOnly() == false) {
|
||||
showCursor(!Window::isActive);
|
||||
}
|
||||
}
|
||||
// Check if the program has lost window focus
|
||||
else if (event.active.state == SDL_APPACTIVE) {
|
||||
@@ -188,8 +191,10 @@ bool Window::handleEvent() {
|
||||
Window::isActive = true;
|
||||
}
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Window::isActive = %d\n",__FILE__,__FUNCTION__,__LINE__,Window::isActive);
|
||||
showCursor(!Window::isActive);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Window::isActive = %d\n",__FILE__,__FUNCTION__,__LINE__,Window::isActive);
|
||||
if(Window::isActive && Window::getUseDefaultCursorOnly() == false) {
|
||||
showCursor(!Window::isActive);
|
||||
}
|
||||
}
|
||||
// Check if the program has lost window focus
|
||||
else if (event.active.state == SDL_APPMOUSEFOCUS) {
|
||||
@@ -200,8 +205,10 @@ bool Window::handleEvent() {
|
||||
Window::isActive = true;
|
||||
}
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Window::isActive = %d\n",__FILE__,__FUNCTION__,__LINE__,Window::isActive);
|
||||
showCursor(!Window::isActive);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Window::isActive = %d\n",__FILE__,__FUNCTION__,__LINE__,Window::isActive);
|
||||
if(Window::isActive && Window::getUseDefaultCursorOnly() == false) {
|
||||
showCursor(!Window::isActive);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (event.active.gain == 0) {
|
||||
@@ -211,8 +218,10 @@ bool Window::handleEvent() {
|
||||
Window::isActive = true;
|
||||
}
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Window::isActive = %d, event.active.state = %d\n",__FILE__,__FUNCTION__,__LINE__,Window::isActive,event.active.state);
|
||||
showCursor(!Window::isActive);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Window::isActive = %d, event.active.state = %d\n",__FILE__,__FUNCTION__,__LINE__,Window::isActive,event.active.state);
|
||||
if(Window::isActive && Window::getUseDefaultCursorOnly() == false) {
|
||||
showCursor(!Window::isActive);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -413,8 +422,10 @@ void Window::toggleFullscreen() {
|
||||
|
||||
if(Window::isFullScreen == true) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d] Window::isFullScreen == true [%d]\n",__FILE__,__FUNCTION__,__LINE__,handle);
|
||||
ShowWindow(handle, SW_MAXIMIZE);
|
||||
showCursor(false);
|
||||
ShowWindow(handle, SW_MAXIMIZE);
|
||||
if(Window::isActive && Window::getUseDefaultCursorOnly() == false) {
|
||||
showCursor(false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d] Window::isFullScreen == false [%d]\n",__FILE__,__FUNCTION__,__LINE__,handle);
|
||||
|
Reference in New Issue
Block a user