 |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
4 #ifndef RAYLIB_CPP_INCLUDE_TEXT_HPP_
5 #define RAYLIB_CPP_INCLUDE_TEXT_HPP_
9 #include "./raylib.hpp"
15 #define RLCPPAPI static
24 const std::string& title,
29 ::DrawText(title.c_str(), posX, posY, fontSize, color);
35 RLCPPAPI
inline int MeasureText(
const std::string& text,
int fontSize) {
36 return ::MeasureText(text.c_str(), fontSize);
42 RLCPPAPI
inline bool TextIsEqual(
const std::string& text1,
const std::string& text2) {
43 return ::TextIsEqual(text1.c_str(), text2.c_str());
49 RLCPPAPI
inline unsigned int TextLength(
const std::string& text) {
50 return ::TextLength(text.c_str());
57 #endif // RAYLIB_CPP_INCLUDE_TEXT_HPP_
All raylib-cpp classes and functions appear in the raylib namespace.
static bool TextIsEqual(const std::string &text1, const std::string &text2)
Check if two text string are equal.
static int MeasureText(const std::string &text, int fontSize)
Measure string width for default font.
static void DrawText(const std::string &title, int posX, int posY, int fontSize, ::Color color)
Draw text (using default font)
static unsigned int TextLength(const std::string &text)
Check if two text string are equal.