Mouse over gui - show Gui name in description(@OVERHOTSPOT@)?(SOLVED)

Started by karja, Sat 23/04/2011 22:18:52

Previous topic - Next topic

karja

In Death episode 2, that I am working on, I have a box like graphic GUI that you need to click to open the inventory.
The problem is that i use overhotspot descrition to show what the mouse hovers over, but on GUIs it doesnt show anything.

So basically the question is:
Is it possible to get the GUIs name in the description GUIs overhotspot label?

Khris

Something like this should work:

Code: ags
  String d = "@OVERHOTSPOT@";

  GUI*g = GUI.GetAtScreenXY(mouse.x, mouse.y);
  if (g == gInventory) d = "inventory";

  lblDescription.Text = d;


Just a general way to do it; I guess in an actual game you'd use GUIControl.GetAtScreenXY and set the description to "load game" for the load button, etc.

karja


SMF spam blocked by CleanTalk