Rockbox Development > Feature Ideas
WPS buttons show when touching the touchscreen (like Cowon D2 OF)
punkt:
Hi guys,
I recently switched to rockbox as the default firmware on my D2. So now it's time for scratching itches... I'm new to rockbox development, but I've been a professional software developer for ten years.
I'd like to implement a WPS similar to the original firmware of the D2:
* By default, the WPS shows only song infos, no touch buttons.
* When pressing the touchscreen (on the press, not release), touch buttons for play/pause, skip, volume etc. are shown (with a timeout).
* Pressing and releasing the touchscreen again will activate the touch button at that position.
* After pressing a button, or the timeout elapses, the button screen disappears.
My first attempt at implementing this was using %Tl to show a viewport whenever the touchscreen was pressed anywhere. Unfortunately, if I touched at a position where a touch button is shown, this button was immediately activated.
I then hacked the source to have %Tl turn to true on the touch release, not press. This way, I have to touch once to show the viewport containing the buttons, and once again to activate a touch button, as intended. This would be ok for me, even though the original firmware shows the buttons on the first touchscreen press, not release.
I'll clean up my patch and instead of changing the behaviour of %Tl, I could introduce a new variable (e.g. %Tk) which turns true on the touchscreen release. Would a patch like this be accepted to the main trunk? Or do you have a better idea of implementing the wanted behaviour?
Greetings,
punkt
AlexP:
You are better off taking this to the dev mailing list, or IRC. Not too many developers read the forums.
punkt:
As recommended, the discussion now happens on rockbox-dev. For anyone interested in this feature, I submitted a patch introducing a new WPS tag %Tk that turns true on touchscreen release: http://www.rockbox.org/tracker/task/10982
Biont:
I always wished this tag could be used inside of conditional viewports -and/or could be constrained to a portion of the screen- so that it only turns true if a specific portion of the screen is touched. (please correct me if I'm wrong and it's already possible)
I'd really like to use this tag in my Fidelity theme, but having it turn true if you touch the screen *anywhere* kind of kills it for me.
But it's still nice to see where getting closer to a WPS that looks and works like the D2's OF. I was also planning on making one myself one day :D
punkt:
Yeah, I saw a thread about that (http://forums.rockbox.org/index.php?topic=23083.msg157834#msg157834). That'd be a nice feature.
Though I still need to fully understand the way the wps works. I use a modified version of your Fidelity theme (which is great btw) with my %Tk patch, and it's kind of buggy and I couldn't get the volume popup to work right. Or rather I couldn't get it to disappear, so I disabled it for now.
Also I feel like the wps format could do with some boolean logic, proper conditionals and variables and a more functional style. Reminds me of the nsis format the way it is now. I wish I could use lua to write a theme. But until I'm contributing more, I haven't got the right to be complaining, have I? ;)
Navigation
[0] Message Index
[#] Next page
Go to full version