![]() |
|
how to hide mouse pointer |
raja peter
Member #7,835
October 2006
|
while i am file_select_ex() i am getting a default mouse cusor. How to hid it. luv, raja |
piccolo
Member #3,163
January 2003
![]() |
try hidemouse();;) wow |
Evert
Member #794
November 2000
![]() |
Yes, that's very useful. What's the point in telling someone to try a function that doesn't exist? Anyway, Allegro's dialog routines always display the mouse cursor, you cannot change that easily (there are workarounds, like removing the mouse driver before displaying the dialog). It's a bit easier if you're using your own dialog struct, in which case you can add a function to hide the mouse. |
Ceagon Xylas
Member #5,495
February 2005
![]() |
He ment, "try show_mouse(NULL)" But follow Evert's instructions. |
raja peter
Member #7,835
October 2006
|
this is the code set_mouse_sprite(img); } where to put show_mouse()here. Also tried scare and unscare. But didn't work. what is the proper order of displaying? luv, raja |
Ceagon Xylas
Member #5,495
February 2005
![]() |
Use the code tags. One mistake I noticed was you're drawing your buffer to the screen first... That needs to come last in your drawing operations. while() { logic(); draw_sprite(buffer,img22,...); blit(buffer,screen,0,0,0,0,buffer->w,buffer->h); } show_mouse(BITMAP*) tells allegro to draw the mouse to the specified bitmap (default is BITMAP *screen) So show_mouse(NULL), as I said earlier, should get rid of it. But you're unscaring the mouse right before you call file_select_ex(). This is exactly what you don't want to do. while() { ... scare_mouse(); file_select_ex(); unscare_mouse(); //optional } Make sure you're not manually drawing the mouse to buffer or screen. |
raja peter
Member #7,835
October 2006
|
I usually draw the mouse pointer using draw_sprite at mouse_x, mouse_y. Because of not knowing the correct order of these drawings. Since the file_select invoked the default mouse pointer extra, I wanted to use the alternative method to draw the invoked mouse with the cursor i use with draw_sprite and hide the one drawn using draw_sprite. luv, raja |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote:
set_mouse_sprite(img); Don't. Ever. set_mouse_sprite sets the sprite/bitmap that ALLEGRO will use to draw the mouse. show_mouse sets the bitmap that ALLEGRO draws the mouse_sprite TO. Quote: Since the file_select invoked the default mouse pointer extra, I wanted to use the alternative method to draw the invoked mouse with the cursor i use with draw_sprite and hide the one drawn using draw_sprite. There really isn't a way to draw a mouse cursor yourself while the file select dialog is being displayed. Allegro's gui dialogs run their own event loop, you won't be able to do anything else while they are displayed. -- |
Matthew Dalrymple
Member #7,922
October 2006
![]() |
How about show_mouse_to_elephant(); ... Oh wait.. we are trying to scare the mouse away.. not the elephant :-P =-----===-----===-----= |
|