Image||doc136469

September 20, 2022

Format

Image.Image

Describe

The resource path of the picture displayed by the picture control can be specified in the interface editor or modified by the script when the game is running.

Code Example

image.png

-- create layout window
local APIRootWindow = UI:CreateGUIWindow("API")

--Set the window to the root node of the UI
APIRootWindow.Parent = UI.Root

--Get the Image control for testing according to the name
local image = APIRootWindow.APIImage

--Set the picture of the picture control
image.Image = "asset/Texture/GUI/radio_button_selectable.png"