kitao / pyxel

A retro game engine for Python
MIT License
15.31k stars 847 forks source link

Error with three arguments in pyxel.btnp() v2.1.10 #562

Closed shiromofufactory closed 2 months ago

shiromofufactory commented 3 months ago

In pyxel 2.1.10, specifying three arguments to pyxel.btnp() as follows causes an error that did not occur before.

pyxel.btnp(px.KEY_UP, 8, 2)

btnp() takes 1 positional arguments but 3 were given

Can you please make this backwards compatible and error-free if possible?

DiddiLeija commented 3 months ago

In the meantime, you can use pyxel.btnp as follows:

pyxel.btnp(pyxel.KEY_UP, hold=8, repeat=2)

As the last 2 arguments are no longer positional.

Anyway a backwards-compatible fix or a warning would be nice as well :)

kitao commented 3 months ago

Due to updating Python-related library version, Pyxel's original argument setting (explicit keyword argument) is forced now. I'll take care of backward-compatibility in the next version.

kitao commented 2 months ago

Fixed in 2.2.0