Jump to content
Sign in to follow this  
dragonflightdesign

Changing cursors 'on the fly'

Recommended Posts

I'm sure this used to work for FS2K2 (it's in sd2gau27 so it must be true :( ) but I've only just discovered that it definately does not work for FS9 and FSX:if(!fuelsys_set_select) pgauge->mouse_rect[23].cursor = CURSOR_HAND;else pgauge->mouse_rect[23].cursor = CURSOR_DOWNARROW;The callback prototype is set to CURSOR_DOWNARROW. A bit of debug code shows the cursor number is changing from 1 (hand) to 5 (downarrow) but the screen cursor display never changes. What else needs to be done to force the change?-Dai

Share this post


Link to post
Share on other sites

Dai,This works in FSX. Don't know how much it will help though...BOOL FSAPI mouse_flip_mouse_cb( PPIXPOINT relative_point, FLAGS32 mouse_flags){ fuelsys_set_select = 1 - fuelsys_set_select; if(!fuelsys_set_select) ((PMOUSECALLBACK)relative_point)->mouse->cursor = CURSOR_UPARROW; else ((PMOUSECALLBACK)relative_point)->mouse->cursor = CURSOR_DOWNARROW; return FALSE;}

Share this post


Link to post
Share on other sites

Hi DougThat should fix the problem - thanks! The control that's giving me the stick is a small knob on a gross weight indicator. If the knob is in, the indicator decreases as fuel burns off. If it is out, it can be rotated to set the gross weight of the aircraft and the decrement action is halted. Consequently:BOOL FSAPI fuelsys_set_grossweight_up_mcb( PPIXPOINT relative_point, FLAGS32 mouse_flags){ if(mouse_flags & MOUSE_RIGHTSINGLE) { fuelsys_set_select = 1 - fuelsys_set_select;if(fuelsys_set_select)((PMOUSECALLBACK)relative_point)->mouse->cursor = CURSOR_UPARROW; else ((PMOUSECALLBACK)relative_point)->mouse->cursor = CURSOR_HAND; } if(mouse_flags & MOUSE_LEFTSINGLE) { if(fuelsys_set_select) { } } return FALSE;}One day I'll get round to checking to see if the mouse callback will accept more than two parameters....-Dai

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...