Ce que fait la commande
FontExists répond à une question : il dit si un objet Font existe encore. Il prend iFontID (un entier), et rend un entier. iFontID est l'identifiant d'un objet Font, celui que LoadFont a rendu : c'est ainsi que l'appel sait sur quoi agir.
Syntaxe
FontExists(iFontID integer) → integerParamètres
| Nom | Type |
|---|---|
| iFontID | integer |
Chaque forme rend
integer
Exemple · engendré
font = LoadFont("assets/font.ttf")DO Print(FontExists(font)) Sync()LOOPLoadFont est là pour donner à l'appel quelque chose sur quoi agir : FontExists est la ligne qui compte. La boucle DO … LOOP n'est pas décorative : un programme BASIC classique s'arrête dès qu'il n'a plus de lignes, et c'est Sync() qui dessine l'image.