GradientExampleCode

From Crumbled World Wiki
Revision as of 07:57, 6 July 2025 by Anders (talk | contribs) (Created page with "==Example== <syntaxhighlight lang="lua"> local panel = form:add(Panel(PanelSize(Vec2(-1)))) --create a background, white in the top and black at the bottom of the panel panel:setBackground(Gradient(Vec3(1),Vec3())) </syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Example

local panel = form:add(Panel(PanelSize(Vec2(-1))))
--create a background, white in the top and black at the bottom of the panel
panel:setBackground(Gradient(Vec3(1),Vec3()))