Skip to content

Commit 0703645

Browse files
drop files example comments
1 parent 08cafd5 commit 0703645

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/core/core_drop_files.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
if pyray.is_file_dropped():
3535
droppedFiles_pointer = pyray.get_dropped_files(count_pointer)
3636
count = count_pointer[0]
37+
# This isn't actually necessary unless you want a Python array:
3738
droppedFiles = pyray.ffi.unpack(droppedFiles_pointer, count)
3839

3940
pyray.begin_drawing()
@@ -51,6 +52,8 @@
5152
else:
5253
pyray.draw_rectangle(0, 85 + 40*i, screenWidth, 40, pyray.fade(LIGHTGRAY, 0.3))
5354
filename = pyray.ffi.string(droppedFiles[i]).decode('utf-8')
55+
# This alternative works too if you don't have a Python array:
56+
# filename = pyray.ffi.string(droppedFiles_pointer[i]).decode('utf-8')
5457
pyray.draw_text(filename, 120, 100 + 40*i, 10, GRAY)
5558

5659
pyray.draw_text("Drop new files...", 100, 110 + 40*count, 20, DARKGRAY);

0 commit comments

Comments
 (0)