Closed sDos280 closed 2 years ago
ok, I think I understand why this is happening, that is just the way the library work. in any case thanks 🙃
it's because we are using .pyi files to get PyCharm to do autocomplete, but the Colors were not listed in them.
ok, so why did this run with no problem? how did the interpreter know what WHITE
/VIOLET
means?
also, I have this problem too (that isn't really an issue more like a question)
I know that the KEY_RIGHT
is defied in the .pyi file but it is in the KeyboardKey
class, so how does python know to pick/use that?
I think pyray.KEY_RIGHT is provided by CFFI. Then we later generated proper Python Enums from what CFFI provided, so we added pyray.KeyboardKey.KEY_RIGHT. But we allowed pyray. KEY_RIGHT to remain for backwards compatibility.
That makes sense, thanks.
while trying to use the Quickstart example in pycharm I Noticed that the IDE says that there is an error "unresolved reference 'WHITE'" and the error "unresolved reference 'VIOLET'". but when I tried to run the example it work perfectly. Is there a reason for this error?
example:
error image: