Archived

This topic is now archived and is closed to further replies.

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
Help AVSIM continue to serve you!
Please donate today!

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