I want to set my GUI up so that when the cursor mouse-overs any button in the GUI, it switches to a pointing cursor, and when it moves off that button, it goes back to what it was.
So I figured the best was to go about it is to add in rep_exec :
GUIControl*gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (gc == btnIconInv) mouse.UseModeGraphic(eModePointer);
else mouse.UseDefaultGraphic();
Problem is, now it's constantly calling the current cursor, resulting in the stuttering of the cursor animation. Is there a better way to accomplish my objective?
Have you tried adding a condition to your else?
Something like:
GUIControl*gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (gc == btnIconInv) mouse.UseModeGraphic(eModePointer);
else if (gc != btnIconInv && mouse.GetModeGraphic(eModeInteract) != 2389) mouse.UseDefaultGraphic();
There we go. Thanks!
Jolly good! :)