CODE
#include
extern struct xmouse_data XMOUSE_current;
...
XKEYBOARD_STROKE Stroke;
char s[41]="";
int mx=640/2,my=480/2;
...
XInput_GetEvents();
if (XInputGetKeystroke(&Stroke)==0)
{
if ((Stroke.ucFlags&XKEYBOARD_KEYUP)==0)
{
if (strlen(s)==40) strcpy(s,"");
s[strlen(s)+1]='\0';
s[strlen(s)]=Stroke.ucAsciiValue;
}
}
pb_print("[%s]\n",s);
mx+=XMOUSE_current.x;
my+=XMOUSE_current.y;
XMOUSE_current.x=0;
XMOUSE_current.y=0;
if (mx<0) mx=0;
if (my<0) my=0;
if (mx>640-10) mx=640-10;
if (my>480-10) my=480-10;
pb_fill(mx,my,10,10,0xffffff);
pb_draw_text_screen();
Have fun with... your new complete computer!