Skip to content

Commit 46766d6

Browse files
committed
update
1 parent 8d5697c commit 46766d6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/content/docs/ch04/04-text-draws.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use_text_commands {state} false
4242

4343
The order of setup commands does not matter, as long as they come before `DISPLAY_TEXT`.
4444

45-
## Color and Scale
45+
### Color and Scale
4646

4747
`SET_TEXT_COLOUR` sets the text color using RGBA values, where each component ranges from 0 to 255:
4848

@@ -60,7 +60,7 @@ set_text_scale {widthX} 0.48 {heightY} 1.12
6060

6161
The default scale in San Andreas is roughly 0.48 × 1.12.
6262

63-
## Alignment
63+
### Alignment
6464

6565
By default, text is left-aligned. You can change the alignment with `SET_TEXT_CENTRE` or `SET_TEXT_RIGHT_JUSTIFY`:
6666

@@ -79,7 +79,7 @@ set_text_centre {state} true
7979
set_text_centre_size {width} 400.0
8080
```
8181

82-
## Text Wrapping
82+
### Text Wrapping
8383

8484
`SET_TEXT_WRAPX` controls where the text wraps to the next line. The value is a screen position (not a width), so a wrap x of `400.0` means the text will wrap when it reaches the `400.0` mark on the screen:
8585

@@ -89,23 +89,23 @@ set_text_wrapx {width} 400.0
8989

9090
If your text is being cut off or wrapping too early, adjusting this value is usually the fix.
9191

92-
## Font
92+
### Font
9393

9494
`SET_TEXT_FONT` selects which font to use. The available fonts depend on the game:
9595

9696
```sb
9797
set_text_font {font} 2
9898
```
9999

100-
## Background
100+
### Background
101101

102102
`SET_TEXT_BACKGROUND` adds a dark rectangle behind the text, making it easier to read over busy scenes:
103103

104104
```sb
105105
set_text_background {state} true
106106
```
107107

108-
## Other Options
108+
### Other Options
109109

110110
`SET_TEXT_PROPORTIONAL` enables proportional character spacing, where each character takes up only as much width as it needs. When disabled, all characters occupy the same width:
111111

0 commit comments

Comments
 (0)