Re: [AD] todo.txt

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Evert Glebbeek wrote:
- Investigate mouse problem reported in http://www.allegro.cc/forums/view_thread.php?_id=459972

Same question.
The example linked to works if you call show_mouse(screen) before destroying canvas.
- Mouse problems in Windows reported in http://www.allegro.cc/forums/view_thread.php?_id=497651

I think this was fixed. Can someone with Windows check this?
This little program works so I think it is fixed. It doesn't work without the
calls to show_mouse(screen) in my_proc.

#include <allegro.h>

BITMAP *cursor;

int my_proc(int msg, DIALOG *d, int c)
{
   static int curr = 1;
   if ((mouse_x < 150) && curr) {
       set_mouse_sprite(cursor);
       set_mouse_sprite_focus(4, 4);
       show_mouse(screen);
       curr = 0;
   }
   else if ((mouse_x >= 150) && !curr) {
       set_mouse_sprite(NULL);
       set_mouse_sprite_focus(0, 0);
       show_mouse(screen);
       curr = 1;
   }
   return D_O_K;
}

DIALOG d[] = {
   { d_button_proc, 100, 100, 100, 20, 0, 0, 0, D_EXIT,
              0, 0, (void *)"Test", NULL, NULL },
   { my_proc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL },
   { NULL, }
};

int main(void)
{
   allegro_init();
   install_mouse();
   set_color_depth(32);
   set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
   cursor = load_bitmap("cursor.bmp", NULL);
   enable_hardware_cursor();
   set_dialog_color(d, gui_fg_color, gui_bg_color);
   show_mouse(screen);
   do_dialog(d, 0);
   allegro_exit();
   return 0;
}
END_OF_MAIN();





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/