Skip to content

Commit fe74513

Browse files
authored
Update documentation
1 parent 50eb189 commit fe74513

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ texture.Draw(50, 50, WHITE);
8686
8787
### Optional Parameters
8888
89-
Many methods have optional parameters with the same defaults.
89+
Many methods have optional parameters with sane defaults.
9090
9191
``` cpp
9292
// raylib
@@ -145,13 +145,13 @@ DrawPixelV(position, color); // Extra V in method name.
145145
raylib::Color color = raylib::Color::Gray();
146146
color.DrawPixel(50, 50);
147147
Vector2 position(50.0f, 50.0f);
148-
color.DrawPixel(position); // No more V in method name.
148+
color.DrawPixel(position); // No V in method name.
149149
position.DrawPixel(color); // Alternatively
150150
```
151151
152152
### Method Chaining
153153
154-
When there's a method that doesn't return anything, it'll instead return the object itself, allowing [method chaining](https://en.wikipedia.org/wiki/Method_chaining).
154+
When there's a method that doesn't return anything, in most cases it'll return the object itself, allowing [method chaining](https://en.wikipedia.org/wiki/Method_chaining).
155155
156156
``` cpp
157157
// raylib
@@ -191,12 +191,12 @@ When there is a function that would return a pointer-array, there is a wrapper t
191191
``` cpp
192192
// raylib
193193
int count;
194-
char** files = GetDirectoryFiles(".", &count);
195-
printf("Count: %i\n", count);
194+
FilePathList files = LoadDirectoryFiles(".");
195+
printf("Count: %i\n", files.count);
196196
for (int i = 0; i < count; i++) {
197-
printf("File: %s\n", files[i]);
197+
printf("File: %s\n", files.paths[i]);
198198
}
199-
ClearDirectoryFiles();
199+
UnloadDirectoryFiles(files);
200200
201201
// raylib-cpp
202202
std::vector<std::string> files = raylib::GetDirectoryFiles(".");
@@ -236,7 +236,7 @@ try {
236236
raylib::Texture texture("FileNotFound.png");
237237
}
238238
catch (raylib::RaylibException& error) {
239-
error.TraceLog(LOG_ERROR);
239+
TraceLog(LOG_ERROR, "Texture failed to load!");
240240
}
241241
```
242242

0 commit comments

Comments
 (0)