void show_os_cursor( int tipo_cursor )
Descripción:
Establece el tipo de cursor a mostrar en la aplicación. Tipos de cursores que se pueden establecer:
MOUSE_CURSOR_ALLEGRO // Cursor de Allegro MOUSE_CURSOR_ARROW // Cursor normal MOUSE_CURSOR_BUSY // Cursor de ocupado MOUSE_CURSOR_QUESTION // Cursor de pregunta MOUSE_CURSOR_EDIT // Cursor de edición MOUSE_CURSOR_NONE // Sin cursor
MAIN_PROGRAM_CDIV
PUBLIC
int tipo;
BEGIN_PROGRAM
tipo = 1;
set_gfx(GFX_AUTODETECT_WINDOWED);
set_mode( 320, 240 );
write(0,0,0,0, "--- Ejemplo de Cambio de Cursor ---");
write(0,0,20,0, "( 0 ) Cursor de ALLEGRO");
write(0,0,30,0, "( 1 ) Cursor normal");
write(0,0,40,0, "( 2 ) Cursor ocupado");
write(0,0,50,0, "( 3 ) Cursor pregunta");
write(0,0,60,0, "( 4 ) Cursor de edición");
write(0,0,70,0, "( 5 ) Sin cursor");
// Bucle de espera
LOOP{
if( key(_0) ) tipo = 0;
if( key(_1) ) tipo = 1;
if( key(_2) ) tipo = 2;
if( key(_3) ) tipo = 3;
if( key(_4) ) tipo = 4;
if( key(_5) ) tipo = 5;
switch(tipo)
{
case 0: show_os_cursor(MOUSE_CURSOR_ALLEGRO); break;
case 1: show_os_cursor(MOUSE_CURSOR_ARROW); break;
case 2: show_os_cursor(MOUSE_CURSOR_BUSY); break;
case 3: show_os_cursor(MOUSE_CURSOR_QUESTION); break;
case 4: show_os_cursor(MOUSE_CURSOR_EDIT); break;
case 5: show_os_cursor(MOUSE_CURSOR_NONE); break;
}
FRAME;
}
END_PROGRAMEn el ejemplo podemos ver los diferentes tipos de cursores, seleccionándolos pulsando sobre los números del 0 al 5