-
-
Notifications
You must be signed in to change notification settings - Fork 8
Group
João Cardoso edited this page Dec 5, 2019
·
22 revisions
Group is a frame class which inherits from Callable and allows to quickly generate entire menus. The menus are automatically updated and arranged.
Name | Description |
---|---|
SetChildren (call) | Adds an OnChildren handler for generating content and forces an update. |
UpdateChildren | Forces the group content to re-build. |
Add (name or object [, args]) | Adds a frame to the layout. If a Sushi class name is provided, generates a new frame using args . Should only be called during OnChildren . |
AddBreak | Adds a break to the layout. Should only be called during OnChildren . |
SetOrientation (orientation) | Sets the orientation of the group layout. Valid values are VERTICAL and HORIZONTAL . |
GetOrientation | Returns the orientation for the group's layout. |
SetResizing (resizing) | Sets in which direction the group should grow to fit all the content. Possible values are VERTICAL and HORIZONTAL . |
GetResizing | Returns the group's resizing orientation. |
Name | Description |
---|---|
OnResize | Fired whenever the group changes dimensions. |
OnChildren | Fired during the content generation stage. |
local group = Sushi.Group(parent)
group:SetPoint('TOPLEFT')
group:SetOrientation('VERTICAL')
group:SetChildren(function()
for i = 1, 12 do
group:Add('HelpButton').left = 0
group:Add('HelpButton').left = 0
group:AddBreak()
end
end)
This is the Sushi-3.1 wiki. Wiki Home