Method | Description |
---|---|
setText(text, colour) | Sets the text |
setTextColour() | Sets the text's colour |
setTextColor() | alias for setTextColour() |
setSignal(firstSignal,secondSignal) | Displays custom shapes |
setText(text, colour)
Sets the text on the nixie tubes.
Parameters
- text:
string
New text to be displayed by the tubes. - colour?:
string = nil
Name of the colour (dye) to display the text. Doesn't change the color if nil.
setTextColour(colour)
Sets the nixie tube's colour.
Parameters
- colour:
string
Name of the colour (dye) to display the text.
setSignal(firstSignal, secondSignal)
Sets a custom signal for the nixie tubes.
This one is unique, as it only lets you control up to two nixie tubes at once, while the other functions let you control entire arrays.
The signal
table is built like so:
lua
{
r = 0, -- red color value between 0 and 255
g = 0, -- green color value between 0 and 255
b = 0, -- blue color value between 0 and 255
glowWidth, -- width of the glow shape between 1 and 4
glowHeight = , -- height of the glow shape between 1 and 4
blinkPeriod = 40, -- time between blinks in ticks
blinkOffTime = 20, -- downtime between blinks in ticks
}
All the fields are optional, but also have no default values, so if you first set {r=255} and then {b=255}, the color will be purple. You'd have to set {r=0, b=255} to reset the red value.
In this example, the node will blink ever 2 seconds for 1 second (which means it'll be on for a second, then off for a second in a loop.
Parameters
- firstSignal:
table
descrtibing the color, size and blink rate of the glow in the first tube. - secondSignal:
table
descrtibing the color, size and blink rate of the glow in the second tube.