RE: My custom scrolling dialog template -- I'm rescripting it in 2.7
Is there a way to get the integer value of the GUI object at a point, i.e., mouse.x, mouse.y? I have something of a work-around:
short y = 143; /* y-value of GUI */
short my = mouse.y; /* y-value of cursor */
short objHeight = 8; /* height of GUI object */
short objAt = (mouse.y - y) / objHeight; /* object at cursor */
However, this doesn't exactly work the way I need it to now that I've made some changes. I now have labels behind the seven I use for normal text display, and I shift the labels if the text of a dialog option is too long. The problem is that this code returns an index of 0 - 6 when really I now need an index of 0 - 13... I use this to determine which dialog to run when the user chooses an option. Any help would be greatly appreciated.
Quote
Is there a way to get the integer value of the GUI object at a point, i.e., mouse.x, mouse.y?
GUIControl *thecontrol = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (thecontrol != null) integervalue = thecontrol.ID;
Ah...Thanks...