Problem with label at...

Started by monkey0506, Sat 27/11/2004 21:31:55

Previous topic - Next topic

monkey0506

For the label I'm using in my map rooms, which has the text, "@OVERHOTSPOT@", I have the following script:

Code: ags

//in repeatedly_execute()
  string maptext;
  GetLocationName(mouse.x, mouse.y, maptext);
//  SetGUIPosition(MAPS, (mouse.x-(StrLen(maptext)/2)), mouse.y);
  SetGUIPosition(MAPS, mouse.x+5, mouse.y+5);


If I try to set the GUI position to the position of the mouse cursor, centered on the x-axis (mouse.x-(StrLen(maptext)/2)), the game becomes paused, and I can't un-pause it. But if I set the GUI to the position of the mouse +5 on the x and y axises (mouse.x+5, mouse.y+5) the game does not pause, and the label is shown appropriately. If you're asking how I know the game is getting paused, on_mouse_click isn't getting run when I set the GUI position to where I want it (the commented code)... Help would be appreciated!

Radiant

At a guess, if the GUI is clickable, then it will catch any clicks directed to the room beneath it. It may also affect GetLocationName to instead return the fact that there is a GUI object present.
Try setting the GUI to non-clickable?

monkey0506

#2
Oh...Ã,  :-[ That was it... Thanks...

EDIT: I should've also been trying to center the GUI on the x-axis, not the text. SetGUIPosition(MAPS, mouse.x-50, mouse.y);

SMF spam blocked by CleanTalk