- added many new things and fixed a number of bugs (too tried to mention them all)

This commit is contained in:
Mark Vejvoda
2010-06-24 01:23:18 +00:00
parent a842909e7d
commit 1d4f47718c
23 changed files with 444 additions and 47 deletions

View File

@@ -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);