Skip to content

Commit 074022a

Browse files
committed
Add support for control codes in scroll text
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 7e4a00a commit 074022a

File tree

3 files changed

+575
-33
lines changed

3 files changed

+575
-33
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,34 @@ useful when running in containers where you can mount your scroll text file:
106106
```bash
107107
./demo -t /path/to/scroll.txt
108108
```
109+
110+
### Control Codes
111+
112+
The scroll text supports embedded control codes for dynamic effects, inspired
113+
by classic demoscene scrollers. Control codes use the format `{CODE:PARAMETER}`.
114+
115+
#### Available Control Codes
116+
117+
| Code | Description | Example |
118+
|------|-------------|---------|
119+
| `{PAUSE:seconds}` | Pause scrolling for N seconds | `{PAUSE:3}` |
120+
| `{SPEED:pixels}` | Change scroll speed (pixels/sec) | `{SPEED:100}` |
121+
| `{STYLE:name}` | Switch scroll effect style | `{STYLE:roller}` |
122+
| `{COLOR:r,g,b}` | Set text color (RGB 0-255) | `{COLOR:255,0,0}` |
123+
124+
#### Style Names
125+
126+
- `wave` - Sine wave scroller
127+
- `roller` - 3D roller scroller with outline and glow
128+
- `bottom` - Traditional bottom scroller
129+
130+
#### Example Scroll Text
131+
132+
```
133+
Welcome to the Infix Demo!{PAUSE:2} {SPEED:250}Fast text!{SPEED:180}
134+
{STYLE:roller} Now with 3D roller effect!{PAUSE:1.5}
135+
{COLOR:255,0,0}Red text!{COLOR:0,255,0} Green text!{COLOR:0,0,0}
136+
{STYLE:wave} Back to sine wave... Greetings to the demoscene!
137+
```
138+
139+
**Note:** Use `{COLOR:0,0,0}` to return to the default rainbow gradient effect.

0 commit comments

Comments
 (0)