README: interface clarifications

master
LEdoian 6 months ago
parent ada68944ca
commit 8d6a194563

@ -17,8 +17,8 @@ The default renderer only displays the item as the text. The API for custom rend
```python3 ```python3
class Whatever(triditko.Renderer): class Whatever(triditko.Renderer):
def render(itemname: str) -> pygame.Surface: ... def render(itemname: str, w: int, h: int) -> pygame.Surface: ...
``` ```
The renderer is passed as the fully qualified class name (i.e. if that code is The renderer is passed as the fully qualified class name (i.e. if that code is
in file `renderers.py`, pass `renderers.Whatever`) in file `renderers.py`, pass `renderers:Whatever`)

Loading…
Cancel
Save