Has anyone played around with Lua on an EOSM?
Specifically detecting touch events, ie in different areas of the screen and double tap etc, and if they have, could they share their scripting with me, ie to help me kick-start my EOSM touch scripting ;)
Cheers
Garry
In the lua_touch (https://bitbucket.org/hudson/magic-lantern/branch/lua_touch) branch:
touch.lua (https://bitbucket.org/hudson/magic-lantern/src/ed63e9296a0b7daaa63df450bd058c9e6a56c529/scripts/touch.lua?fileviewer=file-view-default)
keyboard.lua (https://bitbucket.org/hudson/magic-lantern/src/ed63e9296a0b7daaa63df450bd058c9e6a56c529/scripts/lib/keyboard.lua?at=lua_touch&fileviewer=file-view-default)
@David
Thanks for the links: I'll read through and start the education process ;)
Cheers
Garry
@David
BTW I noted that you use integer division, ie //. Do you use that for speed, or for some other reason?
Cheers
Garry
I just don't see a reason to use floating points if you don't need them. Yes it is faster, IDK if you would notice a difference unless it was some calculation that was repeated a lot.
@David
Thanks and I look at 'exploiting' integer math as I tweak/write my scripts.
As you imply, in this case, the answer will only be integer, ie pixel x-y coordinates ;)
Cheers
Garry