diff --git a/CMakeLists.txt b/CMakeLists.txt index e348769a..0318b98a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.11) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") project (raylib_cpp - VERSION 4.2.1 + VERSION 4.2.2 DESCRIPTION "raylib-cpp C++ Object Oriented Wrapper for raylib" HOMEPAGE_URL "https://github.com/robloach/raylib-cpp" LANGUAGES C CXX) diff --git a/clib.json b/clib.json index 2e641342..f61d4ca4 100644 --- a/clib.json +++ b/clib.json @@ -1,6 +1,6 @@ { "name": "raylib-cpp", - "version": "4.2.1", + "version": "4.2.2", "repo": "RobLoach/raylib-cpp", "description": "raylib-cpp: C++ Object-Oriented Wrapper for raylib", "homepage": "https://github.com/robloach/raylib-cpp", diff --git a/docs/_audio_stream_8hpp_source.html b/docs/_audio_stream_8hpp_source.html index a5321710..503ff536 100644 --- a/docs/_audio_stream_8hpp_source.html +++ b/docs/_audio_stream_8hpp_source.html @@ -125,7 +125,7 @@
60 
61  AudioStream& operator=(const AudioStream&) = delete;
62 
-
63  AudioStream& operator=(AudioStream&& other) {
+
63  AudioStream& operator=(AudioStream&& other) noexcept {
64  if (this == &other) {
65  return *this;
66  }
diff --git a/docs/_font_8hpp_source.html b/docs/_font_8hpp_source.html index e53b5263..25c6ebb8 100644 --- a/docs/_font_8hpp_source.html +++ b/docs/_font_8hpp_source.html @@ -106,7 +106,7 @@
43  }
44  }
45 
-
55  Font(const std::string& fileName, int fontSize, int* fontChars, int charCount) {
+
55  Font(const std::string& fileName, int fontSize, int* fontChars = 0, int charCount = 0) {
56  if (!Load(fileName, fontSize, fontChars, charCount)) {
57  throw RaylibException("Failed to load font from font with extras");
58  }
@@ -154,123 +154,126 @@
116  GETTERSETTER(::GlyphInfo*, Glyphs, glyphs)
117 
118  Font& operator=(const ::Font& font) {
-
119  set(font);
-
120  return *this;
-
121  }
-
122 
-
123  Font& operator=(const Font&) = delete;
-
124 
-
125  Font& operator=(Font&& other) {
-
126  if (this == &other) {
-
127  return *this;
-
128  }
-
129 
-
130  Unload();
-
131  set(other);
-
132 
-
133  other.baseSize = 0;
-
134  other.glyphCount = 0;
-
135  other.glyphPadding = 0;
-
136  other.texture = {};
-
137  other.recs = nullptr;
-
138  other.glyphs = nullptr;
-
139 
-
140  return *this;
-
141  }
-
142 
-
152  bool Load(const std::string& fileName) {
-
153  set(::LoadFont(fileName.c_str()));
-
154  return baseSize > 0;
-
155  }
-
156 
-
167  bool Load(const std::string& fileName, int fontSize, int* fontChars, int charCount) {
-
168  set(::LoadFontEx(fileName.c_str(), fontSize, fontChars, charCount));
-
169  return baseSize > 0;
-
170  }
-
171 
-
172  bool Load(const ::Image& image, ::Color key, int firstChar) {
-
173  set(::LoadFontFromImage(image, key, firstChar));
-
174  return baseSize > 0;
-
175  }
-
176 
-
177  bool Load(const std::string& fileType, const unsigned char* fileData, int dataSize, int fontSize,
-
178  int *fontChars, int charsCount) {
-
179  set(::LoadFontFromMemory(fileType.c_str(), fileData, dataSize, fontSize, fontChars,
-
180  charsCount));
-
181  return baseSize > 0;
-
182  }
-
183 
-
187  inline Font& DrawText(const std::string& text, ::Vector2 position, float fontSize,
-
188  float spacing, ::Color tint = WHITE) {
-
189  ::DrawTextEx(*this, text.c_str(), position, fontSize, spacing, tint);
-
190  return *this;
-
191  }
-
192 
-
193  inline Font& DrawText(
-
194  const std::string& text,
-
195  ::Vector2 position,
-
196  ::Vector2 origin,
-
197  float rotation,
-
198  float fontSize,
-
199  float spacing,
-
200  ::Color tint = WHITE) {
-
201  ::DrawTextPro(*this, text.c_str(), position, origin, rotation, fontSize, spacing, tint);
-
202  return *this;
-
203  }
-
204 
-
208  inline Font& DrawText(int codepoint,
-
209  ::Vector2 position,
-
210  float fontSize,
-
211  ::Color tint = { 255, 255, 255, 255 }) {
-
212  ::DrawTextCodepoint(*this, codepoint, position, fontSize, tint);
-
213  return *this;
-
214  }
-
215 
-
219  inline Vector2 MeasureText(const std::string& text, float fontSize, float spacing) const {
-
220  return ::MeasureTextEx(*this, text.c_str(), fontSize, spacing);
-
221  }
-
222 
-
226  inline int GetGlyphIndex(int character) const {
-
227  return ::GetGlyphIndex(*this, character);
-
228  }
-
229 
-
233  inline ::Image ImageText(const std::string& text, float fontSize,
-
234  float spacing, ::Color tint) const {
-
235  return ::ImageTextEx(*this, text.c_str(), fontSize, spacing, tint);
-
236  }
-
237 
-
238  private:
-
239  void set(const ::Font& font) {
-
240  baseSize = font.baseSize;
-
241  glyphCount = font.glyphCount;
-
242  glyphPadding = font.glyphPadding;
-
243  texture = font.texture;
-
244  recs = font.recs;
-
245  glyphs = font.glyphs;
-
246  }
-
247 };
-
248 } // namespace raylib
-
249 
-
250 #endif // RAYLIB_CPP_INCLUDE_FONT_HPP_
+
119  Unload();
+
120  set(font);
+
121  return *this;
+
122  }
+
123 
+
124  Font& operator=(const Font&) = delete;
+
125 
+
126  Font& operator=(Font&& other) noexcept {
+
127  if (this == &other) {
+
128  return *this;
+
129  }
+
130 
+
131  Unload();
+
132  set(other);
+
133 
+
134  other.baseSize = 0;
+
135  other.glyphCount = 0;
+
136  other.glyphPadding = 0;
+
137  other.texture = {};
+
138  other.recs = nullptr;
+
139  other.glyphs = nullptr;
+
140 
+
141  return *this;
+
142  }
+
143 
+
153  bool Load(const std::string& fileName) {
+
154  set(::LoadFont(fileName.c_str()));
+
155  return baseSize > 0;
+
156  }
+
157 
+
168  bool Load(const std::string& fileName, int fontSize, int* fontChars, int charCount) {
+
169  set(::LoadFontEx(fileName.c_str(), fontSize, fontChars, charCount));
+
170  return baseSize > 0;
+
171  }
+
172 
+
173  bool Load(const ::Image& image, ::Color key, int firstChar) {
+
174  set(::LoadFontFromImage(image, key, firstChar));
+
175  return baseSize > 0;
+
176  }
+
177 
+
178  bool Load(const std::string& fileType, const unsigned char* fileData, int dataSize, int fontSize,
+
179  int *fontChars, int charsCount) {
+
180  set(::LoadFontFromMemory(fileType.c_str(), fileData, dataSize, fontSize, fontChars,
+
181  charsCount));
+
182  return baseSize > 0;
+
183  }
+
184 
+
188  inline Font& DrawText(const std::string& text, ::Vector2 position, float fontSize,
+
189  float spacing, ::Color tint = WHITE) {
+
190  ::DrawTextEx(*this, text.c_str(), position, fontSize, spacing, tint);
+
191  return *this;
+
192  }
+
193 
+
194  inline Font& DrawText(
+
195  const std::string& text,
+
196  ::Vector2 position,
+
197  ::Vector2 origin,
+
198  float rotation,
+
199  float fontSize,
+
200  float spacing,
+
201  ::Color tint = WHITE) {
+
202  ::DrawTextPro(*this, text.c_str(), position, origin, rotation, fontSize, spacing, tint);
+
203  return *this;
+
204  }
+
205 
+
209  inline Font& DrawText(int codepoint,
+
210  ::Vector2 position,
+
211  float fontSize,
+
212  ::Color tint = { 255, 255, 255, 255 }) {
+
213  ::DrawTextCodepoint(*this, codepoint, position, fontSize, tint);
+
214  return *this;
+
215  }
+
216 
+
220  inline Vector2 MeasureText(const std::string& text, float fontSize, float spacing) const {
+
221  return ::MeasureTextEx(*this, text.c_str(), fontSize, spacing);
+
222  }
+
223 
+
227  inline int GetGlyphIndex(int character) const {
+
228  return ::GetGlyphIndex(*this, character);
+
229  }
+
230 
+
234  inline ::Image ImageText(const std::string& text, float fontSize,
+
235  float spacing, ::Color tint) const {
+
236  return ::ImageTextEx(*this, text.c_str(), fontSize, spacing, tint);
+
237  }
+
238 
+
239  private:
+
240  void set(const ::Font& font) {
+
241  baseSize = font.baseSize;
+
242  glyphCount = font.glyphCount;
+
243  glyphPadding = font.glyphPadding;
+
244  texture = font.texture;
+
245  recs = font.recs;
+
246  glyphs = font.glyphs;
+
247  }
+
248 };
+
249 } // namespace raylib
+
250 
+
251 #endif // RAYLIB_CPP_INCLUDE_FONT_HPP_
raylib::Font::Font
Font(const std::string &fileName)
Loads a Font from the given file.
Definition: Font.hpp:40
raylib
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
-
raylib::Font::DrawText
Font & DrawText(const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE)
Draw text using font and additional parameters.
Definition: Font.hpp:187
+
raylib::Font::DrawText
Font & DrawText(const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE)
Draw text using font and additional parameters.
Definition: Font.hpp:188
+
raylib::LoadFont
static inline ::Font LoadFont(const std::string &fileName)
Load font from file (filename must include file extension)
Definition: Functions.hpp:279
raylib::Font::Font
Font(const ::Image &image, ::Color key, int firstChar)
Loads a Font from the given image with a color key.
Definition: Font.hpp:70
-
raylib::Font::DrawText
Font & DrawText(int codepoint, ::Vector2 position, float fontSize, ::Color tint={ 255, 255, 255, 255 })
Draw one character (codepoint)
Definition: Font.hpp:208
+
raylib::Font::DrawText
Font & DrawText(int codepoint, ::Vector2 position, float fontSize, ::Color tint={ 255, 255, 255, 255 })
Draw one character (codepoint)
Definition: Font.hpp:209
raylib::Font::Font
Font(const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)
Loads a font from memory, based on the given file type and file data.
Definition: Font.hpp:83
+
raylib::Font::Font
Font(const std::string &fileName, int fontSize, int *fontChars=0, int charCount=0)
Loads a Font from the given file, with generation parameters.
Definition: Font.hpp:55
raylib::DrawTextPro
static void DrawTextPro(const Font &font, const std::string &text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint)
Draw text using Font and pro parameters (rotation)
Definition: Functions.hpp:271
raylib::Rectangle
Rectangle type.
Definition: Rectangle.hpp:12
raylib::Font
Font type, includes texture and charSet array data.
Definition: Font.hpp:14
-
raylib::Font::GetGlyphIndex
int GetGlyphIndex(int character) const
Get index position for a unicode character on font.
Definition: Font.hpp:226
+
raylib::Font::GetGlyphIndex
int GetGlyphIndex(int character) const
Get index position for a unicode character on font.
Definition: Font.hpp:227
raylib::Vector2
Vector2 type.
Definition: Vector2.hpp:16
-
raylib::Font::Font
Font(const std::string &fileName, int fontSize, int *fontChars, int charCount)
Loads a Font from the given file, with generation parameters.
Definition: Font.hpp:55
raylib::Color
Color type, RGBA (32bit)
Definition: Color.hpp:14
-
raylib::Font::ImageText
inline ::Image ImageText(const std::string &text, float fontSize, float spacing, ::Color tint) const
Create an image from text (custom sprite font)
Definition: Font.hpp:233
-
raylib::Font::Load
bool Load(const std::string &fileName, int fontSize, int *fontChars, int charCount)
Loads a font from a given file with generation parameters.
Definition: Font.hpp:167
+
raylib::LoadFontEx
static inline ::Font LoadFontEx(const std::string &fileName, int fontSize, int *fontChars, int charsCount)
Load font from file (filename must include file extension)
Definition: Functions.hpp:286
+
raylib::Font::ImageText
inline ::Image ImageText(const std::string &text, float fontSize, float spacing, ::Color tint) const
Create an image from text (custom sprite font)
Definition: Font.hpp:234
+
raylib::Font::Load
bool Load(const std::string &fileName, int fontSize, int *fontChars, int charCount)
Loads a font from a given file with generation parameters.
Definition: Font.hpp:168
raylib::Texture
Texture type.
Definition: Texture.hpp:16
-
raylib::Font::MeasureText
Vector2 MeasureText(const std::string &text, float fontSize, float spacing) const
Measure string size for Font.
Definition: Font.hpp:219
-
raylib::Font::Load
bool Load(const std::string &fileName)
Loads a font from a given file.
Definition: Font.hpp:152
+
raylib::Font::MeasureText
Vector2 MeasureText(const std::string &text, float fontSize, float spacing) const
Measure string size for Font.
Definition: Font.hpp:220
+
raylib::Font::Load
bool Load(const std::string &fileName)
Loads a font from a given file.
Definition: Font.hpp:153
raylib::RaylibException
Exception used for most raylib-related exceptions.
Definition: RaylibException.hpp:13
raylib::DrawTextEx
static void DrawTextEx(const Font &font, const std::string &text, Vector2 position, float fontSize, float spacing, ::Color tint)
Draw text using font and additional parameters.
Definition: Functions.hpp:263
diff --git a/docs/_functions_8hpp_source.html b/docs/_functions_8hpp_source.html index ef0979eb..49eb1fe4 100644 --- a/docs/_functions_8hpp_source.html +++ b/docs/_functions_8hpp_source.html @@ -242,87 +242,96 @@
273  ::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, tint);
274 }
275 
-
279 RLCPPAPI inline int MeasureText(const std::string& text, int fontSize) {
-
280  return ::MeasureText(text.c_str(), fontSize);
+
279 RLCPPAPI inline ::Font LoadFont(const std::string& fileName) {
+
280  return ::LoadFont(fileName.c_str());
281 }
282 
-
286 RLCPPAPI inline bool TextIsEqual(const std::string& text1, const std::string& text2) {
-
287  return ::TextIsEqual(text1.c_str(), text2.c_str());
+
286 RLCPPAPI inline ::Font LoadFontEx(const std::string& fileName, int fontSize, int *fontChars, int charsCount) {
+
287  return ::LoadFontEx(fileName.c_str(), fontSize, fontChars, charsCount);
288 }
289 
-
293 RLCPPAPI inline unsigned int TextLength(const std::string& text) {
-
294  return ::TextLength(text.c_str());
+
293 RLCPPAPI inline int MeasureText(const std::string& text, int fontSize) {
+
294  return ::MeasureText(text.c_str(), fontSize);
295 }
296 
-
300 RLAPI inline std::string TextSubtext(const std::string& text, int position, int length) {
-
301  return ::TextSubtext(text.c_str(), position, length);
+
300 RLCPPAPI inline bool TextIsEqual(const std::string& text1, const std::string& text2) {
+
301  return ::TextIsEqual(text1.c_str(), text2.c_str());
302 }
303 
-
307 RLAPI inline std::string TextReplace(const std::string& text, const std::string& replace, const std::string& by) {
-
308  const char* input = text.c_str();
-
309  char* output = ::TextReplace(const_cast<char*>(input), replace.c_str(), by.c_str());
-
310  if (output != NULL) {
-
311  std::string stringOutput(output);
-
312  free(output);
-
313  return stringOutput;
-
314  }
-
315  return "";
+
307 RLCPPAPI inline unsigned int TextLength(const std::string& text) {
+
308  return ::TextLength(text.c_str());
+
309 }
+
310 
+
314 RLAPI inline std::string TextSubtext(const std::string& text, int position, int length) {
+
315  return ::TextSubtext(text.c_str(), position, length);
316 }
317 
-
321 RLAPI inline std::string TextInsert(const std::string& text, const std::string& insert, int position) {
-
322  char* output = ::TextInsert(text.c_str(), insert.c_str(), position);
-
323  if (output != NULL) {
-
324  std::string stringOutput(output);
-
325  free(output);
-
326  return stringOutput;
-
327  }
-
328  return "";
-
329 }
-
330 
-
334 RLAPI inline int TextFindIndex(const std::string& text, const std::string& find) {
-
335  return ::TextFindIndex(text.c_str(), find.c_str());
-
336 }
-
337 
-
341 RLAPI inline std::string TextToUpper(const std::string& text) {
-
342  return ::TextToUpper(text.c_str());
+
321 RLAPI inline std::string TextReplace(const std::string& text, const std::string& replace, const std::string& by) {
+
322  const char* input = text.c_str();
+
323  char* output = ::TextReplace(const_cast<char*>(input), replace.c_str(), by.c_str());
+
324  if (output != NULL) {
+
325  std::string stringOutput(output);
+
326  free(output);
+
327  return stringOutput;
+
328  }
+
329  return "";
+
330 }
+
331 
+
335 RLAPI inline std::string TextInsert(const std::string& text, const std::string& insert, int position) {
+
336  char* output = ::TextInsert(text.c_str(), insert.c_str(), position);
+
337  if (output != NULL) {
+
338  std::string stringOutput(output);
+
339  free(output);
+
340  return stringOutput;
+
341  }
+
342  return "";
343 }
344 
-
348 RLAPI inline std::string TextToLower(const std::string& text) {
-
349  return ::TextToLower(text.c_str());
+
348 RLAPI inline int TextFindIndex(const std::string& text, const std::string& find) {
+
349  return ::TextFindIndex(text.c_str(), find.c_str());
350 }
351 
-
355 RLAPI inline std::string TextToPascal(const std::string& text) {
-
356  return ::TextToPascal(text.c_str());
+
355 RLAPI inline std::string TextToUpper(const std::string& text) {
+
356  return ::TextToUpper(text.c_str());
357 }
358 
-
362 RLAPI inline int TextToInteger(const std::string& text) {
-
363  return ::TextToInteger(text.c_str());
+
362 RLAPI inline std::string TextToLower(const std::string& text) {
+
363  return ::TextToLower(text.c_str());
364 }
365 
-
366 } // namespace raylib
-
367 
-
368 #endif // RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
+
369 RLAPI inline std::string TextToPascal(const std::string& text) {
+
370  return ::TextToPascal(text.c_str());
+
371 }
+
372 
+
376 RLAPI inline int TextToInteger(const std::string& text) {
+
377  return ::TextToInteger(text.c_str());
+
378 }
+
379 
+
380 } // namespace raylib
+
381 
+
382 #endif // RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
-
raylib::TextToPascal
RLAPI std::string TextToPascal(const std::string &text)
Get Pascal case notation version of provided string.
Definition: Functions.hpp:355
+
raylib::TextToPascal
RLAPI std::string TextToPascal(const std::string &text)
Get Pascal case notation version of provided string.
Definition: Functions.hpp:369
raylib
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
raylib::LoadImage
static inline ::Image LoadImage(const std::string &fileName)
Load an image.
Definition: Functions.hpp:210
raylib::GetFileName
static std::string GetFileName(const std::string &filePath)
Get pointer to filename for a path string.
Definition: Functions.hpp:119
raylib::UpdateCamera
static void UpdateCamera(const ::Camera &camera)
Update camera depending on selected mode.
Definition: Functions.hpp:202
-
raylib::TextFindIndex
RLAPI int TextFindIndex(const std::string &text, const std::string &find)
Find first text occurrence within a string.
Definition: Functions.hpp:334
+
raylib::TextFindIndex
RLAPI int TextFindIndex(const std::string &text, const std::string &find)
Find first text occurrence within a string.
Definition: Functions.hpp:348
raylib::LoadImageRaw
static inline ::Image LoadImageRaw(const std::string &fileName, int width, int height, int format, int headerSize)
Load an image from RAW file data.
Definition: Functions.hpp:217
raylib::GetPrevDirectoryPath
static std::string GetPrevDirectoryPath(const std::string &dirPath)
Get previous directory path for a given path.
Definition: Functions.hpp:140
-
raylib::TextIsEqual
static bool TextIsEqual(const std::string &text1, const std::string &text2)
Check if two text string are equal.
Definition: Functions.hpp:286
+
raylib::TextIsEqual
static bool TextIsEqual(const std::string &text1, const std::string &text2)
Check if two text string are equal.
Definition: Functions.hpp:300
raylib::LoadImageFromMemory
static inline ::Image LoadImageFromMemory(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load image from memory buffer, fileType refers to extension like "png".
Definition: Functions.hpp:233
raylib::SetWindowTitle
static void SetWindowTitle(const std::string &title)
Set title for window.
Definition: Functions.hpp:31
raylib::Image
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:16
raylib::GetMonitorName
static std::string GetMonitorName(int monitor=0)
Get the human-readable, UTF-8 encoded name of the primary monitor.
Definition: Functions.hpp:38
raylib::LoadImageAnim
static inline ::Image LoadImageAnim(const std::string &fileName, int *frames)
Load animated image data.
Definition: Functions.hpp:226
-
raylib::TextToUpper
RLAPI std::string TextToUpper(const std::string &text)
Get upper case version of provided string.
Definition: Functions.hpp:341
+
raylib::LoadFont
static inline ::Font LoadFont(const std::string &fileName)
Load font from file (filename must include file extension)
Definition: Functions.hpp:279
+
raylib::TextToUpper
RLAPI std::string TextToUpper(const std::string &text)
Get upper case version of provided string.
Definition: Functions.hpp:355
raylib::GetFileModTime
static long GetFileModTime(const std::string &fileName)
Get file modification time (last write time)
Definition: Functions.hpp:188
raylib::TakeScreenshot
static void TakeScreenshot(const std::string &fileName)
Takes a screenshot of current screen (saved a .png)
Definition: Functions.hpp:59
raylib::GetDroppedFiles
static std::vector< std::string > GetDroppedFiles()
Get dropped files names.
Definition: Functions.hpp:174
raylib::GetGamepadName
static std::string GetGamepadName(int gamepad)
Get gamepad internal name id.
Definition: Functions.hpp:66
-
raylib::TextSubtext
RLAPI std::string TextSubtext(const std::string &text, int position, int length)
Get text length, checks for '\0' ending.
Definition: Functions.hpp:300
+
raylib::TextSubtext
RLAPI std::string TextSubtext(const std::string &text, int position, int length)
Get text length, checks for '\0' ending.
Definition: Functions.hpp:314
raylib::InitWindow
static void InitWindow(int width, int height, const std::string &title="raylib")
Initialize window and OpenGL context.
Definition: Functions.hpp:24
raylib::ExportImageAsCode
static bool ExportImageAsCode(const Image &image, const std::string &fileName)
Export image as code file (.h) defining an array of bytes.
Definition: Functions.hpp:249
raylib::Camera3D
Camera type, defines a camera position/orientation in 3d space.
Definition: Camera3D.hpp:12
@@ -337,22 +346,23 @@
raylib::ExportImage
static bool ExportImage(const Image &image, const std::string &fileName)
Export image data to file.
Definition: Functions.hpp:242
raylib::ChangeDirectory
static bool ChangeDirectory(const std::string &dir)
Change working directory, return true on success.
Definition: Functions.hpp:166
raylib::Vector2
Vector2 type.
Definition: Vector2.hpp:16
-
raylib::MeasureText
static int MeasureText(const std::string &text, int fontSize)
Measure string width for default font.
Definition: Functions.hpp:279
-
raylib::TextReplace
RLAPI std::string TextReplace(const std::string &text, const std::string &replace, const std::string &by)
Replace text string.
Definition: Functions.hpp:307
+
raylib::MeasureText
static int MeasureText(const std::string &text, int fontSize)
Measure string width for default font.
Definition: Functions.hpp:293
+
raylib::TextReplace
RLAPI std::string TextReplace(const std::string &text, const std::string &replace, const std::string &by)
Replace text string.
Definition: Functions.hpp:321
raylib::SetClipboardText
static void SetClipboardText(const std::string &text)
Set clipboard text content.
Definition: Functions.hpp:45
raylib::Color
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
raylib::LoadFontEx
static inline ::Font LoadFontEx(const std::string &fileName, int fontSize, int *fontChars, int charsCount)
Load font from file (filename must include file extension)
Definition: Functions.hpp:286
raylib::GetFileExtension
static std::string GetFileExtension(const std::string &fileName)
Get pointer to extension for a filename string (including point: ".png")
Definition: Functions.hpp:112
raylib::SaveFileText
static bool SaveFileText(const std::string &fileName, const std::string &text)
Save text data to file (write)
Definition: Functions.hpp:84
-
raylib::TextToLower
RLAPI std::string TextToLower(const std::string &text)
Get lower case version of provided string.
Definition: Functions.hpp:348
+
raylib::TextToLower
RLAPI std::string TextToLower(const std::string &text)
Get lower case version of provided string.
Definition: Functions.hpp:362
raylib::DrawText
static void DrawText(const std::string &text, int posX, int posY, int fontSize, ::Color color)
Draw text (using default font)
Definition: Functions.hpp:256
raylib::LoadFileText
static std::string LoadFileText(const std::string &fileName)
Load text data from file (read)
Definition: Functions.hpp:74
raylib::OpenURL
static void OpenURL(const std::string &url)
Open URL with default system browser (if available)
Definition: Functions.hpp:195
-
raylib::TextLength
static unsigned int TextLength(const std::string &text)
Check if two text string are equal.
Definition: Functions.hpp:293
+
raylib::TextLength
static unsigned int TextLength(const std::string &text)
Check if two text string are equal.
Definition: Functions.hpp:307
raylib::DrawTextEx
static void DrawTextEx(const Font &font, const std::string &text, Vector2 position, float fontSize, float spacing, ::Color tint)
Draw text using font and additional parameters.
Definition: Functions.hpp:263
raylib::GetWorkingDirectory
static std::string GetWorkingDirectory()
Get current working directory.
Definition: Functions.hpp:147
-
raylib::TextInsert
RLAPI std::string TextInsert(const std::string &text, const std::string &insert, int position)
Insert text in a position.
Definition: Functions.hpp:321
+
raylib::TextInsert
RLAPI std::string TextInsert(const std::string &text, const std::string &insert, int position)
Insert text in a position.
Definition: Functions.hpp:335
raylib::GetClipboardText
static std::string GetClipboardText()
Get clipboard text content.
Definition: Functions.hpp:52
-
raylib::TextToInteger
RLAPI int TextToInteger(const std::string &text)
Get integer value from text (negative values not supported)
Definition: Functions.hpp:362
+
raylib::TextToInteger
RLAPI int TextToInteger(const std::string &text)
Get integer value from text (negative values not supported)
Definition: Functions.hpp:376