added cursor changing to resizer demo, for testing

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1587 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2013-04-04 11:04:17 +00:00
parent a66dc9389e
commit afb16d74ea

View File

@ -195,6 +195,26 @@ void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY )
}
glutHideWindow();
case 'p':
case 'P':
if (nChildWindow!=-1 && cChar=='p') /* Capital P always changes pointer for the main window*/
{
glutSetWindow(nChildWindow);
if (glutGet(GLUT_WINDOW_CURSOR)==GLUT_CURSOR_TOP_SIDE)
glutSetCursor(GLUT_CURSOR_RIGHT_ARROW);
else
glutSetCursor(GLUT_CURSOR_TOP_SIDE);
}
else
{
glutSetWindow(nWindow);
if (glutGet(GLUT_WINDOW_CURSOR)==GLUT_CURSOR_CYCLE)
glutSetCursor(GLUT_CURSOR_RIGHT_ARROW);
else
glutSetCursor(GLUT_CURSOR_CYCLE);
}
default:
break;
}