Module Reference Boxes

The reference box of a module can be thought of as being the window area occupied by all graphics drawn by a certain module. If various states of a module contain different graphic statements, as the module changes from state to state, its reference box likewise changes to always encompass the active graphics in that module. When a GUITransform is applied to a module, it also has a reference box, the result being that the module will be scaled such that its reference box will exactly fill the reference box of the transform. Now if a state change occurs and the module's reference box changes, this new reference box will still be scaled to fill the reference box of the transform. The result will be that there will not be a consistent scaling done to the module - it will vary depending on what state it is in (assuming that each state causes a change in the size of the reference box).

It is advantageous to be able to avoid the problem of having a module's reference box change; this can be accomplished by setting it to a fixed size. To do this, you may either use the SetModuleRefBox statement, or you may define the reference box using constants enclosed in parentheses and placed immediately after the module's name in its definition. The module's parameter list follows the reference box definition.

Module Reference Box with 4 Values Enclosed in Parentheses

Setting a module's reference box by following its name with 4 constants enclosed in parentheses will only work with numeric constants, or for the second, third, and fourth place, with variables that have been declared as constants. Mathematical expressions are not allowed.