Skip to main content

Symbol types

In the boards system, each symbol has an associated symbol type. The symbol type determines all these things for a symbol:

  • The kind of figure to display when representing the symbol on the board
  • What type of children it can have (allowable symbol types)
  • Custom fields that will store the symbol's user-defined data
  • Which of these fields should get emitted as code
  • The emitted class name; by default, it is the same as the symbol type name
  • Some initial parameters; for example, what figure color to use for newly created symbols

To manage symbol types, go to the BOARDS tab, then click the "SYMBOL TYPES" button.

SYMBOL TYPES button
The "SYMBOL TYPES" button opens the editor

Editing symbol types

In the symbol type editor, your project's symbols types appear in the list on the left. Select an item from the list, and its configuration appears in the middle of the screen. On the right side, you will see a code sample (not real data) showing an example of how the symbol might be emitted.

The example below shows the configuration for the framework's S_ACTOR_SPOT symbol type:

SYMBOL TYPES screen
Editing a symbol type

Symbol type settings

In the above screenshot, the top middle panel shows settings available to every symbol type. Below that are panels for each custom field.

Symbol type name

Specify the name of this symbol type.

Description

Add an informational description, like a code comment.

Figure kind

Specify how symbols with this symbol type will be displayed on the board.

Require Palix-sized

If the figure kind is "tilemap", a checkbox appears:

Require the figure tilemap to be Palix-sized

If checked, this displays a warning if the user attempts to select a tilemap whose dimensions are not Palix-sized.

Initial color

For figure kinds that support a color, the symbol type can determine the initial color for newly created symbols.

Initial background

For figure kinds that support a background color, the symbol type can determine the initial background color for newly created symbols.

Initial theme

For figure kinds that support a Palix theme, the symbol type can determine the value.

Initial line style

If the figure kind is "line", specify the line style (arrowheads, straight/curved) for newly created symbols.

Allowed children

A symbol type can restrict which other symbol types are allowed as children in the symbol tree.

Child only

This checkbox says:

Child only (must go under another symbol)

If checked, then symbols with this symbol type cannot be placed as top-level items on the board; they must always be children of some other symbol.

Tile snapping

This checkbox says:

Tile snapping (align to grid of parent tilemap)

If this symbol has a parent (including ancestors higher up in the tree) whose figure is a tilemap, then this symbol's (X,Y) coordinates will be "snapped" to the tile grid. For regular tiles, it snaps to multiples of 8 pixels. For jumbo tiles, it snaps to multiples of 16 pixels.

Custom class name

When emitting symbols, the code CLASS name is normally assumed to be the same as the symbol type name. If needed, for example because you want two different symbol types to emit the same class, you can customize the class name.