ImageExampleCode

From Crumbled World Wiki
Revision as of 07:57, 6 July 2025 by Anders (talk | contribs) (Created page with "==Example== <syntaxhighlight lang="lua"> --add an image to panel with fill and the images width and height need to of equal length. local image = panel:add(Image(PanelSize(Vec2(-1),Vec2(1)), "LoadingScreen\loadingScreen1")) --set image uvcoord image:setUvCoord(Vec2(0.25,0.25),Vec2(0.75,0.75)) </syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Example

--add an image to panel with fill and the images width and height need to of equal length. 
local image = panel:add(Image(PanelSize(Vec2(-1),Vec2(1)), "LoadingScreen\loadingScreen1"))
--set image uvcoord
image:setUvCoord(Vec2(0.25,0.25),Vec2(0.75,0.75))