mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 20:03:58 +02:00
Commented out temp debug printing
This commit is contained in:
@@ -92,14 +92,6 @@ const char vkDown = -10;
|
|||||||
const char vkReturn = -11;
|
const char vkReturn = -11;
|
||||||
const char vkBack = -12;
|
const char vkBack = -12;
|
||||||
|
|
||||||
/*
|
|
||||||
struct MouseState{
|
|
||||||
bool leftMouse;
|
|
||||||
bool rightMouse;
|
|
||||||
bool centerMouse;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
enum WindowStyle{
|
enum WindowStyle{
|
||||||
wsFullscreen,
|
wsFullscreen,
|
||||||
wsWindowedFixed,
|
wsWindowedFixed,
|
||||||
|
@@ -66,7 +66,7 @@ bool Window::handleEvent() {
|
|||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
case SDL_MOUSEMOTION:
|
case SDL_MOUSEMOTION:
|
||||||
|
|
||||||
printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
//printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
setLastMouseEvent(Chrono::getCurMillis());
|
setLastMouseEvent(Chrono::getCurMillis());
|
||||||
setMousePos(Vec2i(event.button.x, event.button.y));
|
setMousePos(Vec2i(event.button.x, event.button.y));
|
||||||
break;
|
break;
|
||||||
@@ -74,16 +74,16 @@ bool Window::handleEvent() {
|
|||||||
|
|
||||||
switch(event.type) {
|
switch(event.type) {
|
||||||
case SDL_QUIT:
|
case SDL_QUIT:
|
||||||
printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
//printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
return false;
|
return false;
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
//printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
if(global_window) {
|
if(global_window) {
|
||||||
global_window->handleMouseDown(event);
|
global_window->handleMouseDown(event);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SDL_MOUSEBUTTONUP: {
|
case SDL_MOUSEBUTTONUP: {
|
||||||
printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
//printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
if(global_window) {
|
if(global_window) {
|
||||||
MouseButton b = getMouseButton(event.button.button);
|
MouseButton b = getMouseButton(event.button.button);
|
||||||
setMouseState(b, false);
|
setMouseState(b, false);
|
||||||
@@ -94,7 +94,7 @@ bool Window::handleEvent() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SDL_MOUSEMOTION: {
|
case SDL_MOUSEMOTION: {
|
||||||
printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
//printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
//MouseState ms;
|
//MouseState ms;
|
||||||
//ms.leftMouse = (event.motion.state & SDL_BUTTON_LMASK) != 0;
|
//ms.leftMouse = (event.motion.state & SDL_BUTTON_LMASK) != 0;
|
||||||
//ms.rightMouse = (event.motion.state & SDL_BUTTON_RMASK) != 0;
|
//ms.rightMouse = (event.motion.state & SDL_BUTTON_RMASK) != 0;
|
||||||
@@ -109,7 +109,8 @@ bool Window::handleEvent() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
//printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
/* handle ALT+Return */
|
/* handle ALT+Return */
|
||||||
if(event.key.keysym.sym == SDLK_RETURN
|
if(event.key.keysym.sym == SDLK_RETURN
|
||||||
&& (event.key.keysym.mod & (KMOD_LALT | KMOD_RALT))) {
|
&& (event.key.keysym.mod & (KMOD_LALT | KMOD_RALT))) {
|
||||||
@@ -121,7 +122,7 @@ bool Window::handleEvent() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SDL_KEYUP:
|
case SDL_KEYUP:
|
||||||
printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
//printf("In [%s::%s] Line :%d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
if(global_window) {
|
if(global_window) {
|
||||||
global_window->eventKeyUp(getKey(event.key.keysym));
|
global_window->eventKeyUp(getKey(event.key.keysym));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user