Page 1 of 1

Mouse Cursor

Posted: Thu Jan 18, 2007 19:34
by JohnArgentieri
Hello all.

I need to make a unique mouse cursor for each of my views, since the single mouse cursor gets rendered incorrectly. Is this task possible to achieve?

Thanks,
John Argentieri

Posted: Tue Jan 23, 2007 12:44
by JohnArgentieri
Hello again.

I must apologize for the ambiguity. What I mean to ask is, when I go to resize a window, CEGUI makes a mouse resize cursor where my mouse is, despite whether or not I specified a cursor. I need these to be unique in my multiple view application, because the cursor gets drawn in all the views in erratic positions. I hope that clears it up a little more.

Posted: Tue Jan 23, 2007 16:22
by LennyH
I'm not too clear the ultimate desire here, but, as far as the cursor changing - you should be able to do that in the .imageset file ( I have not yet looked if there is a function that lets you specify at runtime which cursor you want for each of the states ).

But, in your imageset file, you'd see something like:

Code: Select all

   <Image Name="MouseArrow" XPos="2" YPos="90" Width="10" Height="19" XOffset="0" YOffset="0" />
   <Image Name="MouseMoveCursor" XPos="14" YPos="90" Width="22" Height="22" XOffset="-10" YOffset="-10" />
   <Image Name="MouseNoSoCursor" XPos="38" YPos="89" Width="11" Height="19" XOffset="-4" YOffset="-9" />
   <Image Name="MouseEsWeCursor" XPos="2" YPos="116" Width="19" Height="8" XOffset="-9" YOffset="-4" />
   <Image Name="MouseNeSwCursor" XPos="51" YPos="90" Width="15" Height="15" XOffset="-7" YOffset="-6" />
   <Image Name="MouseNwSeCursor" XPos="68" YPos="90" Width="15" Height="15" XOffset="-6" YOffset="-7" />

MouseArrow, I believe, is the default normal cursor. You could then change all the other cursors to have matching positions and dimensions as to the MouseArrow.