Skip to content

Commit

Permalink
Update api.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkauzh committed Aug 15, 2023
1 parent d75a5b9 commit 27a5057
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/wiki/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,21 @@ def loop():
... # Do your stuff
```

### Rendering text
If you want to render some fonts, then you can do it like this:

- Option 1: Render text with build into fusion or your own font
```python
# x y font size color
main.ui.text.print_text(window, "Your text", 10, 10, main.fonts.NUNITO_LIGHT, 20, main.color.WHITE)
```

- Option 2: Render text with system font
Its the same option 1, but you change the font to name of the font, like this:
```python
main.ui.text.print_text(window, "Your text", 10, 10, "Arial", 20, main.color.WHITE)
```

## Quit

The quitting of the engine is done automaticly for you, so you dont have to worry about it.
Expand Down

0 comments on commit 27a5057

Please sign in to comment.