BlueAmulet / picolove

Pico-8 Reimplementation in Love2D
zlib License
101 stars 12 forks source link

btn() and btnp() can't take emojis as arguments #28

Open tobiasvl opened 6 years ago

tobiasvl commented 6 years ago

In PICO-8, the following code:

  if (btn(⬅️)) print("left")
  if (btn(➡️)) print("right")
  if (btn(⬆️)) print("up")
  if (btn(⬇️)) print("down")
  if (btn(🅾️)) print("o")
  if (btn(❎)) print("x")

is equivalent to:

  if (btn(0)) print("left")
  if (btn(1)) print("right")
  if (btn(2)) print("up")
  if (btn(3)) print("down")
  if (btn(4)) print("o")
  if (btn(5)) print("x")

However, in picolove, the if tests in the first example will always evaluate to true.

See also #27.