resizer demo: adding a bit more output to console to indicate what is going on upon keypress

(cherry picked from commit f04be0c4f2)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1805 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2017-06-14 20:51:14 +00:00
parent 26a9d9ca03
commit caa5ffe29a

View File

@ -202,17 +202,29 @@ void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY )
{ {
glutSetWindow(nChildWindow); glutSetWindow(nChildWindow);
if (glutGet(GLUT_WINDOW_CURSOR)==GLUT_CURSOR_TOP_SIDE) if (glutGet(GLUT_WINDOW_CURSOR)==GLUT_CURSOR_TOP_SIDE)
{
glutSetCursor(GLUT_CURSOR_RIGHT_ARROW); glutSetCursor(GLUT_CURSOR_RIGHT_ARROW);
printf("reverting child window cursor\n");
}
else else
{
glutSetCursor(GLUT_CURSOR_TOP_SIDE); glutSetCursor(GLUT_CURSOR_TOP_SIDE);
printf("changing child window cursor\n");
}
} }
else else
{ {
glutSetWindow(nWindow); glutSetWindow(nWindow);
if (glutGet(GLUT_WINDOW_CURSOR)==GLUT_CURSOR_CYCLE) if (glutGet(GLUT_WINDOW_CURSOR)==GLUT_CURSOR_CYCLE)
{
glutSetCursor(GLUT_CURSOR_RIGHT_ARROW); glutSetCursor(GLUT_CURSOR_RIGHT_ARROW);
printf("reverting main window cursor\n");
}
else else
{
glutSetCursor(GLUT_CURSOR_CYCLE); glutSetCursor(GLUT_CURSOR_CYCLE);
printf("changing main window cursor\n");
}
} }
break; break;