spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * GUI functions and properties

SetPosition (GUI)

(Formerly known as SetGUIPosition, which is now obsolete)

GUI.SetPosition(int x, int y)
Moves the top-left corner of GUI to the new location (X,Y) on the screen. This allows you to dynamically move GUIs around on the screen while the game is running. The co-ordinates are screen co-ordinates, not room co-ordinates, and use the same scale as in the editor.

Example:

gVerbcoin.SetPosition(mouse.x, mouse.y);
will move the VERBCOIN GUI to the position where the cursor is.

See Also: GUI.Centre, GUI.BackgroundGraphic, GUIControl.SetPosition, GUI.SetSize, GUI.X, GUI.Y


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.