Difference between revisions of "Coloured text"

From Cube Wiki
Jump to: navigation, search
 
 
Line 5: Line 5:
 
* On Linux '''Control + V''' and then '''L''' will produce it on the shell or similar enviroment
 
* On Linux '''Control + V''' and then '''L''' will produce it on the shell or similar enviroment
 
* On Windows you can also try to create it via '''AltGr + 1 + 2''' (numpad only!). The key combination '''Control + Alt''' can be used instead of '''AltGr''' if you don't have that key.
 
* On Windows you can also try to create it via '''AltGr + 1 + 2''' (numpad only!). The key combination '''Control + Alt''' can be used instead of '''AltGr''' if you don't have that key.
* You can also use [http://cubeengine.com/wiki/files/Control_char_formfeed.txt Control_char_formfeed.txt] (use "Save Link as..." from your browser!) - again, it may be rendered invisible by your editor - find one for your platform that shows up control-characters!
+
* You can also use [http://cubeengine.com/w/files/Control_char_formfeed.txt Control_char_formfeed.txt] (use "Save Link as..." from your browser!) - again, it may be rendered invisible by your editor - find one for your platform that shows up control-characters!
  
 
Colourization (this also applies for CubeScript/ingame colors) works via the control-char followed by a indication character. Apart from the special cases of "\fs" and "\fr" for saving/restoring previously set colors in the current line of text you can use the following numbers to set to the respective colour:
 
Colourization (this also applies for CubeScript/ingame colors) works via the control-char followed by a indication character. Apart from the special cases of "\fs" and "\fr" for saving/restoring previously set colors in the current line of text you can use the following numbers to set to the respective colour:

Latest revision as of 17:49, 12 December 2014

Coloured Text

You'll need to use the control-character "\f" (line-feed), If you need to use it interactively (in-game), you'll want to know it has the ASCII-code of 12;

  • On Linux and Windows Control + L will create it (unseen, it doesn't render - it's invisible!) in-game - behaviour in a gui-editor (3rd party) may vary.
  • On Linux Control + V and then L will produce it on the shell or similar enviroment
  • On Windows you can also try to create it via AltGr + 1 + 2 (numpad only!). The key combination Control + Alt can be used instead of AltGr if you don't have that key.
  • You can also use Control_char_formfeed.txt (use "Save Link as..." from your browser!) - again, it may be rendered invisible by your editor - find one for your platform that shows up control-characters!

Colourization (this also applies for CubeScript/ingame colors) works via the control-char followed by a indication character. Apart from the special cases of "\fs" and "\fr" for saving/restoring previously set colors in the current line of text you can use the following numbers to set to the respective colour:

  • 0: green
  • 1: blue
  • 2: yellow
  • 3: red
  • 4: grey
  • 5: magenta
  • 6: orange

Everything else is drawn in white; a commonly seen colour-code-string is "\ff" for white

Also see what the AssaultCube people wrote on the AC wiki about colouring text