Definition
SetGUIImagePosition(string GUIName, string imageName, int x, int y)
Description
This function sets the two-dimensional position of the image imageName of GUI GUIName relative to the lower left part of the screen as two x, y values. You can view and copy the name of the GUIs and their images in the Script Utility section (Tools > Script Editor > Tools > Script Utility) or the Prefabs and GUIs section of the current VScene.
Parameters
GUIName
Specifies the name of the GUI to which the imageName image belongs.
imageName
Specifies the the name of the image that belongs to GUIName.
x, y
Specify the two-dimensional position of the image imageName of GUI GUIName relative to the lower left part of the screen as two x, y values.
Example
function Init() SetGUIImagePosition("gui_SampleGUI17_MainMenuAbout", "backgroundImg", GetScreenWidth() / 2, GetScreenHeight() / 2) end function Update() end
In this example, SetGUIImagePosition function sets the X and Y components of 2D position of the “backgroundImg” image from the GUI named “gui_SampleGUI17_MainMenuAbout” to (screen width / 2) and (screen height / 2), respectively.
SetGUIImagePosition