Passing over hotspot and see name

Started by the_graver, Thu 02/10/2003 20:55:19

Previous topic - Next topic

the_graver

Well, I'm sorry that I ask too many questions, I hope it's OK with you...

I need to put the name of the hot spot or object when the mouse is over it, how do I do that? I'v tried a dialog when mouse is over but it's not how I want it...
can you give me another way to do it please?
I'll give an example:
whene the mouse is over a hotspot, lets say, a stop sign, then in the left curner of the mouse you can see the name of it...
I'm very hapey that this forum really cares about new people...
thenks guys...  :-*  ;)
The_Graver games

Arcangel

I am not sure if this is what you look for.  
1) To know that there is under the mouse  
   GetLocationName(mouse.x, mouse.y, buffer);  

2) Initializes the variable buffer  
   string buffer;  

3) To see their name in the screen  
   DisplayAt(int x,  int y, int width, "Your text %s",buffer);

I believe that can give you an idea. :)

TeeKay

Make a new GUI, a fully traspearent, say we have a GUI 60 pixels wide in this example, put a label with "@OVERHOTSPOT@" on it (without quotemarks), and add to the global rep_ex:

the GUI name in this example is HOTSOPOTNAME
if res is 320x200, use this, but if 640x400, double the coreinates used with the if's.

if(mouse.x > 260) SetGUIPosition(HOTSPOTNAME,mouse.x - 60,mouse.y);
else SetGUIPosition(HOTSPOTNAME,mouse.x,mouse.y);


SMF spam blocked by CleanTalk