JTraffic Screensaver

[ABC: ]

[T: <TextToWrite>,<XA>,<YA>,<PictureName>,<NewColor>,<Border>,<Delim> ] [ABC: <Characters>,<Delim>,<CharWidth>, ... ]

[TD: <XA>,<YA>,<PictureName>,<NewColor>,<Border>,<Delim> ]

[TX: <TextToWrite> ]


<TextToWrite> == <Text> || # <Integer>

<Characters> == <Text>

<Delim> == <Simple>

<CharWidth> == <Simple>

<Border> == <Simple>

Write text on the picture with a given alphabet.

The [T: ] modifier can be used to write text on a vehicle or background element.  By using random selection you can create random texts / numbers, which is useful for making locomotive numbers different.  You can also write on the background images which can allow you to write out different station names on signs, for example.

The letters must appear in the Stock List and must contain a defined collection of characters which are determined by the [ABC: ] modifier.

The first parameter is the character sequence of the text to be written.   Every character can be in this character sequence.  If a character other than a letter, number or the underscore character is needed, this should be enclosed in quotation marks: " ... ".  Quotation marks inside the character sequence should be doubled: " ABC " " D " creates   ABC " D.

The parameter <Delim> specifies how many pixel space should appear between the  individual characters. As defined the characters called by the [ABC: ] command have no space between each other.

The [ABC: ] command also specifies the character width.  If nothing is input for the <CharWidth> parameter, all of the characters have the same width, derived from a division of the width of the ABC picture by the length of the number of characters specified in <Characters> (= number of characters that the ABC contains). If the ABC should have characters with varying widths, each character's width must be input individually.  This means that there can be as many parameters for <CharWidth> as there are characters in the ABC.

The text to be written is specified by the first parameter in [T: ]. The place is specified by the <XA>,<YA> parameters.  The size of the text determines the justification on the screen, so when specifying text placement on the screen, it is wise to consider this.

There are three possibilities for text colour specification:

  • If you do not input a value for the parameter <NewColor> then the colour of the base originals remain.  All other pixels are copied onto the target place: transparent pixels are displayed in their original colour.

  • If you have specified a single colour for the parameter <NewColor> the black pixels of the ABC picture remain unchanged.  All other pixels are replaced by the new colour.  They copy transparent characters in the specified colour.

  • If you have input both colours before and after the slash, the pixels which are not black in the ABC picture are coloured the first colour, the black pixels receive the second colour.  They  write non transparent text in the specified foreground and background colours.

The <Border> parameter specifies the width of a border which is filled with the background colour (the second colour).  This parameter is also taken into consideration by the program in the positioning of the text.  The entire square is filled with text and border.

You have two ways of letting traffic create random character selections. You can specify a random selection for each defined text or you can have traffic create a random interval by inputting an <Integer> number – a number expression which can contain selections and intervals – with a # preceding it. One can use this random number texts to write them on locomotives and wagons avoiding to have more vehicles with the same numbers - without to have to draw and store many vehicles differing only in the line numbers.

One can separate to specify the text position, the character set and colors by the [TD: ] modifier, and the text to be written by the [TX: ] modifier. The [TD:] modifier must precede the [TX:] - [TD:] only remembers the parameters, but [TX:] draws the characters on the picture. This separation is useful to write wagon or engine numbers on the vehicles: the character set, position and colors should be specified in the stock list - they are property of the vehicle picture -, and the text (the number) itself in the timetable, possibly by a random expression.

The Configuration Window
Program Window
Stock List
Description Editor
Graphic Testpad
Timetable Editor
Timetable Syntax and Semanics
The timetable header
Sections, Groups, Lines, Scenes
Stock List File