Pie nodes are used to create circular or ellipsoid objects ranging from plain circles to pies and square donut shapes.
Right click the Nodes section in the Outline and select Add ▸ Pie. The new pie node is selected and you can modify its properties.
The following properties are unique to pie nodes:
Ellipse
will extend the node to the outer radius.Rectangle
will extend the node to the node’s bounding box.If you set a texture on the node, the texture image is applied flat, with the corners of the texture correlating to the corners of the node bounding box.
Pie nodes respond to any generic node manipulation functions for setting size, pivot, color and so forth. A few pie node only functions and properties exist:
local pienode = gui.get_node("my_pie_node")
-- get the outer bounds
local fill_angle = gui.get_fill_angle(pienode)
-- increase perimeter vertices
local vertices = gui.get_perimeter_vertices(pienode)
gui.set_perimeter_vertices(pienode, vertices + 1)
-- change outer bounds
gui.set_outer_bounds(pienode, gui.PIEBOUNDS_RECTANGLE)
-- animate the inner radius
gui.animate(pienode, "inner_radius", 100, gui.EASING_INOUTSINE, 2, 0, nil, gui.PLAYBACK_LOOP_PINGPONG)
Did you spot an error or do you have a suggestion? Please let us know on GitHub!
GITHUB