P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
Loading...
Searching...
No Matches
RayFont.hpp
Go to the documentation of this file.
1
10
11#ifndef RAYFONT_HPP_
12#define RAYFONT_HPP_
13
14//Raylib (without conflict)
15#include "RaylibAliases.hpp"
16
17//Interface
18#include "IFont.hpp"
19
24class RayFont : public graphic::IFont {
25
26 public:
27 RayFont(std::string path) {
28 _font = raylib::LoadFont(path.c_str());
29 }
30
32 raylib::UnloadFont(_font);
33 }
34
35 bool isReady() const override {
36 return raylib::IsFontValid(_font);
37 }
38
39 raylib::Font handle() const {
40 return _font;
41 }
42
43 private:
44 raylib::Font _font;
45};
46
48
49#endif /* !RAYFONT_HPP_ */
bool isReady() const override
notice if the font is ready
Definition RayFont.hpp:35
~RayFont()
Definition RayFont.hpp:31
RayFont(std::string path)
Definition RayFont.hpp:27
raylib::Font handle() const
Definition RayFont.hpp:39
Loaded font data, independent of any IText that references it. Deleting every IText built with a font...
Definition IFont.hpp:22