Does STRLIST in m2tklib support Touchscreen?

I have m2tklib set up with a DOGL128 LCD (64x128, resistive touchscreen, uses u8glib). It's working fine with the touchscreen examples, so I know I have things wired up properly and the library set up and working.

I modified the Touchpanel example code to use a GRIDLIST instead of VLIST, and that worked fine.

I'm now trying to get dynamic menus working. The way the example code is written, the menu strings are all hard-coded. To get a dynamic string, it looks like I will need to use something like STRLIST.

Problem is, the STRLIST examples all use the button-based inputs. I'm trying to use the touchpad input and having limited success.

I modified the constructor call to use the touchpad event handler and event source handlers: m2_es_touch_screen and m2_eh_ts (also tried m2_eh_6bsts and m2_eh_4bsts). I'm seeing the cursor registering on the screen when I press, but the UI is nonfunctional.

Does SRTLIST not work with a touchscreen input? Or am I missing something critical with how to use the different input types? Thanks for any help!

EDIT TO ADD:

I made a little progress when I found the Touchscreen Tutorial here: Google Code Archive - Long-term storage for Google Code Project Hosting.
I still do not have it working, however. I'm thinking that perhaps the VSB element does not work well with a touchscreen, either, as there's only an increment and no decrement

Wow, good point. Thanks for reporting this.

Touch screen support has been added to m2tklib recently and it has not been tested so much. In fact, i never thought about STRLIST while implementing touch screen support. VSB on the other hand is a pure read only element. It does not receive any input.

As of now i suggest to use TSK elements to move the cursor up and down (as described in the touch screen tutorial).

I have created an issue for this...

Oliver

Thanks for the amazing fast response!

I was just coming back to update that I did exactly that - implemented touchscreen buttons for UP/DOWN/SELECT and got rid of the VSB. The only thing that is not intuitive is that the list itself cannot be tapped to select an item - you have to scroll to it and then press the select button. Thanks for the fast update!

I try to make STRLIST aware of the "t1" option for the next release. Still you need the TSK elements to scroll to elements, which are not visible on the screen. I mean, once implemented "t1" will only apply to the visible elements of STRLIST. I do not have a good idea how to solve this without TSK elements...

Oliver

olikraus:
I try to make STRLIST aware of the "t1" option for the next release. Still you need the TSK elements to scroll to elements, which are not visible on the screen. I mean, once implemented "t1" will only apply to the visible elements of STRLIST. I do not have a good idea how to solve this without TSK elements...

Makes sense. That seems like it would cover most use cases pretty well, and I think it would be pretty intuitive for a user that tries to tap on an item in a list. When the list is > 1 item long, anyway. If only 1 item is shown, somebody might think that tapping on it would be what allows them to change it, rather than selecting it.

What I have right now is a 4-line STRLIST with a PREV, NEXT, and SELECT button to the right. The PREV and NEXT buttons scroll one item at a time. Since this is the only way to select an item, this makes perfect sense. When STRLIST becomes t1-aware, it might make sense for the NEXT/PREV buttons to be able to do a page-up/page-down function, since you can already select any of the 4 visible elements by tapping. I'm not sure if this would be possible/easy at all, I'm just speaking from a UI standpoint. Maybe there's a way to link an element to a variable to increment/decrement the _first variable by the height of STRLIST?

Great work!

Maybe there's a way to link an element to a variable to increment/decrement the _first variable by the height of STRLIST?

This should also work.

Oliver