* Text Functions. */
| 12 | * Text Functions. |
| 13 | */ |
| 14 | class Text { |
| 15 | public: |
| 16 | /** |
| 17 | * The internal text. |
| 18 | */ |
| 19 | std::string text; |
| 20 | |
| 21 | /** |
| 22 | * The size of the text. |
| 23 | */ |
| 24 | float fontSize; |
| 25 | |
| 26 | /** |
| 27 | * The color of the text. |
| 28 | */ |
| 29 | ::Color color; |
| 30 | |
| 31 | /** |
| 32 | * The internal raylib font to use for the text. |
| 33 | */ |
| 34 | ::Font font; |
| 35 | |
| 36 | /** |
| 37 | * The character spacing for the text. |
| 38 | */ |
| 39 | float spacing; |
| 40 | |
| 41 | /** |
| 42 | * Initializes a new Text object. |
| 43 | * |
| 44 | * @param text Text to initialize. |
| 45 | * @param fontSize The size of the text. |
| 46 | * @param color The color of the font. |
| 47 | * @param font Font to initialize. |
| 48 | * @param spacing The spacing of the text. |
| 49 | */ |
| 50 | Text( |
| 51 | const std::string& text = "", |
| 52 | float fontSize = 10, |
| 53 | const ::Color& color = WHITE, |
| 54 | const ::Font& font = ::GetFontDefault(), |
| 55 | float spacing = 0) |
| 56 | : text(text) |
| 57 | , fontSize(fontSize) |
| 58 | , color(color) |
| 59 | , font(font) |
| 60 | , spacing(spacing) { |
| 61 | // Nothing. |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Initializes a new Text object with a custom font. |
| 66 | * |
| 67 | * @param font Font to initialize. |
| 68 | * @param text Text to initialize. |
| 69 | * @param fontSize The size of the text. |
| 70 | * @param spacing The spacing of the text. |
| 71 | * @param color The color of the font. |
nothing calls this directly
no outgoing calls
no test coverage detected