Skip to content

Size

Set the text size scaling to render from now on with the ability to prevent processing of further size commands temporarily.

Syntax

(1)

|size,sizeuniform|

(2)

|size,sizex,sizey|

(3)

|size,unpause,sizex,sizey|

(4)

|size,sizex,sizey,lockcontrol|

Parameters

sizeuniform: float

The text size scaling to set uniformly in the vertical and horizontal direction. This must be a valid float or an exception will be thrown.

sizex: float | x

The text size scaling to set horizontally. The float form must be a valid float or an exception will be thrown. x will cause the existing y size (NOT X SIZE which is likely an error!) to be used instead. Any other value will be interpreted as the float form which will cause an exception to be thrown if it isn't one. NOTE: In single letter rendering while languageid is 6 (Russian), the actual x size of the letter slot is going to be this parameter value * 0.9 so a decrease by 10%.

sizey: float | y

The text size scaling to set vertically. The float form must be a valid float or an exception will be thrown. x will cause the existing y size to be used instead which essentially ignores the value. Any other value will be interpreted as the float form which will cause an exception to be thrown if it isn't one.

unpause

Tells this command to only change the size when unpaused and inlist from the ItemList State Machine is true (NOTE: see inlist issue for potential issues). If paused or inlist is false, the size will not change, but the rest of the command will still be processed (see remarks for details). Any other value will process the command in syntax (2) which will throw an exception.

lockcontrol: lock | force | unlock

Tells how to treat this command in regards to the size locks which tells SetText to not process further size commands:

  • lock: Engages the size lock. Any further size commands not sent with this parameter set to force or unlock will do nothing.
  • force: Ignores the size lock when processing the command, but do not disengage the size lock. Only this command will process normally.
  • unlock: Disengages the size lock. Further size commands will process normally.

Any other value is ignored.

Remarks

In Single Letter Rendering, this also sets the localScale of the letter slot to (size.x, size.y, 1.0) * 0.07. This essentially scales everything down to 7% of the new size. However, if the languageid is 6 (Russian), the localScale becomes (size.x * 0.9, size.y, 1.0) * 0.07. This is the same, but the x size is decreased by 10% and the scaling of the letter slot is 7% after that.

Additionally, the bleep volume is adjusted to the new size's magnitude which will make bleeps go louder or softer depending on the new size.

This command affects OrganiseLines by changing the horizontal size scaling used to predict the amount of space further letters will take. This is done ignoring the locking system so even if the command isn't going to change the size once processed, it will still be taken as a width change for the auto line breaker which can cause problems.

This command is accumulated for the Backtracking system, but it does so by adding the same command twice in a row. (NOTE: Why?)