Changes on Controls table
MicroLua brings Lua on the Nintendo DS for easy programming
Brought to you by:
reylak
We should modify the structure of the Controls
table into:
Controls.<button|"Stylus">[.state]
With button
being "A", "B", "R, "etc.
state
is either "press" (replacement for "newPress"), "released" (it has a new meaning, see hereunder) and "held". If not given, state
is "held".
The new "released" is a kind of opposite of "press" as it is given by:
oldHeld = Controls[button] Controls[button] = isHeld(button) -- fictional function Controls[button].released = oldHeld and not Controls[button]
It is true only on the releasing of the button, just like "press" is true only on first loop where the key is held.
Original idea and discussion from Lolman.
Anonymous
released
actually has this new meaning (that is to say, the behavior given by µLibrary): it only equalstrue
on releasing the key.This is true since at least [046709].
Related
Commit: [046709]
Last edit: Reylak 2013-12-25