Buttonrenderer( texture ), Knobrenderer( texture, u, v, size ), Group( name ) – Expert Sleepers Augustus Loop v2.3.0 User Manual

Page 45: Group:add( control ), Group:width(), Group:height()

Advertising
background image

You can create multiple renderers, but there is a concept of a ‘current’ renderer. When a
new slider is created, it automatically associates itself with the current renderer. The cur-
rent renderer is the one named ‘theSliderRenderer’.

E.g.:

atlas = texture( "buttons.png" )
theSliderRenderer = sliderRenderer( atlas )

buttonRenderer( texture )

As

sliderRenderer()

, but for buttons. The current button renderer is named

‘theButtonRenderer’.

knobRenderer( texture, u, v, size )

As

sliderRenderer()

and

buttonRenderer()

but for knobs. The current knob renderer

is named ‘theKnobRenderer’.

The extra parameters (u, v, size) define the area of the texture that will be used to draw the
knobs.

group( name )

Creates a group, which is one of the labelled boxes you see in the default GUI. Groups
have several purposes:

They let you visually group controls, to make it clear which have similar functions.

They let you show and hide groups of controls.

In script building, they make it easier to move controls around as a group, since con-
trols are positioned relative to their enclosing group.

E.g.:

miscButtonsGroup = group( "Misc" )

group:add( control )

Adds a control to a group. Invoked as a member function on the group e.g.

miscButtonsGroup = group( "Misc" )
miscButtonsGroup:add( paramButton( ... ) )

group:width()

Returns the width of the group. E.g.

x = x + miscButtonsGroup:width()

group:height()

Returns the height of the group. E.g.

Advertising