From MegaZine3
Jump to navigation Jump to search

A "definition" in the context of MegaZine3 attributes and Asul attributes refers to an expression of certain format, defining some behavior.

The basic structure is:

command0(arg0, arg1, ...); command1(arg0, arg1, ...); ...

Depending on the context only one command may be used / allowed. The type of interpretation of such definitions is always context sensitive, i.e. it depends on where such a definition is used how it is interpreted. For example, for the Overlays plugin, the overlay attribute uses the format

overlay_type(alpha_normal, alpha_over, arg0, ...)

i.e. the first two arguments always have the same meaning (mouse over and out alpha values of the overlay), while the remaining attributes depend on the overlay type defined via the "command" (overlay_type).

For ASUL objects, an example is the definition of an element's background.

In the newer versions of the engine (2.0.6+) it is possible to use strings, i.e. to do something like this: command('arg with (special; chars). Oh, and \'escaped\' quotes!', arg2). Note that cmd(arg) and cmd('arg') are evaluated as exactly the same.