Lua API extentions
- andreobi
-
Topic Author
- Offline
- New Member
-
- Posts: 19
- Thank you received: 23
TPL_KUNENA_MESSAGE_CREATED Lua API extentions
26 Aug 2020 10:00
I'm publishing my wishes here, to find also other useres who might support my proposals:
1. Lua API to have read access to the timer values
i.e. system.getTimer(number)
Parameter: number= 1..10 to address the timer
Return value: timer value in seconds or nil if timer doesn't exist
2. Enable Trim Keys as YX input keys in a Lua form
i.e. to have a simpel direct input option to do something in a XY direction in a Lua app form.
The trim key function should be switchable between normal mode and Lua form:
- in normal operation mode the trim keys should have the standard functionality, as it is today
- if the Lua form is opened and the trim key assignment is requested, the trim keys should be available in the keyForm(key) as additional keys and the normal trim function is disabled as long as the Lua form is open.
I believe this enables much more simple user interfaces if any XY input is required.
i.e: this could be if you have a gps map and you would like to adjust it to your environment.
or you have a diagram and want to move a cursor or select something
or you want to to specify a xy coordinate (to specify a gps point on a map and get a hint when you passed that point)
How to steer the curor or something else is up to the Lua app and not part of the API.
The API just provide additional key definitions like: KEY_XLeft, KEY_XRight, KEY_YUp, KEY_YDown
and to prevent the normal behaviour i.e the form.preventDefault () or a new form.assignTrimkey() is needed.
Please leave a note, if you like my proposals to get a higher motivation on jeti to implement the proposals.
Kind regards
Andre
1. Lua API to have read access to the timer values
i.e. system.getTimer(number)
Parameter: number= 1..10 to address the timer
Return value: timer value in seconds or nil if timer doesn't exist
2. Enable Trim Keys as YX input keys in a Lua form
i.e. to have a simpel direct input option to do something in a XY direction in a Lua app form.
The trim key function should be switchable between normal mode and Lua form:
- in normal operation mode the trim keys should have the standard functionality, as it is today
- if the Lua form is opened and the trim key assignment is requested, the trim keys should be available in the keyForm(key) as additional keys and the normal trim function is disabled as long as the Lua form is open.
I believe this enables much more simple user interfaces if any XY input is required.
i.e: this could be if you have a gps map and you would like to adjust it to your environment.
or you have a diagram and want to move a cursor or select something
or you want to to specify a xy coordinate (to specify a gps point on a map and get a hint when you passed that point)
How to steer the curor or something else is up to the Lua app and not part of the API.
The API just provide additional key definitions like: KEY_XLeft, KEY_XRight, KEY_YUp, KEY_YDown
and to prevent the normal behaviour i.e the form.preventDefault () or a new form.assignTrimkey() is needed.
Please leave a note, if you like my proposals to get a higher motivation on jeti to implement the proposals.
Kind regards
Andre
The following user(s) said Thank You: Mario42
Please Log in or Create an account to join the conversation.
- rodrigo
-
- Offline
- Junior Member
-
- Posts: 31
- Thank you received: 24
TPL_KUNENA_MESSAGE_REPLIED_NEW Lua API extentions
26 Aug 2020 10:49 - 26 Aug 2020 10:50
Yes, please!
It would really be nice to have access to read the timer values.
Thank you for the proposal
Best regards
Rodrigo
It would really be nice to have access to read the timer values.
Thank you for the proposal
Best regards
Rodrigo
Last edit: 26 Aug 2020 10:50 by rodrigo.
Please Log in or Create an account to join the conversation.
- Mario42
-
- Offline
- New Member
-
- Posts: 1
- Thank you received: 0
TPL_KUNENA_MESSAGE_REPLIED_NEW Lua API extentions
27 Aug 2020 06:02
Both ideas sound reasonable!
Access to the timers would make it easier to use them in LUA Apps without having to implement a separate timer (and therefore having to change tow timers if one still uses the system timer for alarms etc.)
Using the trim keys as x and y controllers (like the digital pad on a game pad) would open a lot of new possibilities of interaction with LUA Apps, @andreobi already mentioned some of them!
I would be very happy to see these extensions in one of the next feature upgrades!
Access to the timers would make it easier to use them in LUA Apps without having to implement a separate timer (and therefore having to change tow timers if one still uses the system timer for alarms etc.)
Using the trim keys as x and y controllers (like the digital pad on a game pad) would open a lot of new possibilities of interaction with LUA Apps, @andreobi already mentioned some of them!
I would be very happy to see these extensions in one of the next feature upgrades!
Please Log in or Create an account to join the conversation.
Time to create page: 0.335 seconds