Getfont(), Getlabelfont(), Gettextfieldfont() – Expert Sleepers Augustus Loop v2.4.1 User Manual

Page 44: Createui()

Advertising
background image

return 773, 491

end

getFont()

This function should return a list of fonts that the GUI should attempt to use as the general
purpose font for e.g. group labels. The first font in the list that the system can successfully
find and load will be used. Each entry in the list is a Lua table, defining the file name and
point size of the font. All the standard locations are searched for the font file - on Mac OS
X, that’s

Library/Fonts

in the user, local and system domains; on Windows, it’s

$WINDIR

\Fonts

.

E.g.

function getFont()

if isMac then

return { { name="GillSans.dfont", size=14 }, { name="Monaco.dfont", size=12 } }

else

return { { name="tahoma.ttf", size=14 }, { name="arial.ttf", size=12 } }

end

end

getLabelFont()

As getFont(), but returns the font to be used for knob labels.

getTextFieldFont()

As getFont(), but return the font to be used for editable text fields.

createUI()

This function defines the guts of the script. It’s where all the GUI elements are created and
laid out. Things you’ll want to do in this function include:

Load images into textures, for use as buttons, or the GUI background.

Set the position of the banner (the plug-in name and version information, and the pa-
rameter value display)

Create the ‘renderers’ that handle actually drawing knobs, buttons etc.

Create groups, knobs, buttons etc.

Lay out the groups and other elements.

Advertising