Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  WPS buttons show when touching the touchscreen (like Cowon D2 OF)
« previous next »
  • Print
Pages: [1]

Author Topic: WPS buttons show when touching the touchscreen (like Cowon D2 OF)  (Read 2105 times)

Offline punkt

  • Member
  • *
  • Posts: 13
WPS buttons show when touching the touchscreen (like Cowon D2 OF)
« on: February 08, 2010, 11:27:32 AM »
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
Logged
16GB D2

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: WPS buttons show when touching the touchscreen (like Cowon D2 OF)
« Reply #1 on: February 08, 2010, 11:34:25 AM »
You are better off taking this to the dev mailing list, or IRC.  Not too many developers read the forums.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline punkt

  • Member
  • *
  • Posts: 13
Re: WPS buttons show when touching the touchscreen (like Cowon D2 OF)
« Reply #2 on: February 08, 2010, 03:18:51 PM »
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
Logged
16GB D2

Offline Biont

  • Member
  • *
  • Posts: 49
Re: WPS buttons show when touching the touchscreen (like Cowon D2 OF)
« Reply #3 on: February 11, 2010, 09:44:27 AM »
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
Logged

Offline punkt

  • Member
  • *
  • Posts: 13
Re: WPS buttons show when touching the touchscreen (like Cowon D2 OF)
« Reply #4 on: February 11, 2010, 01:12:30 PM »
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?  ;)
Logged
16GB D2

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: WPS buttons show when touching the touchscreen (like Cowon D2 OF)
« Reply #5 on: February 11, 2010, 02:00:59 PM »
Quote from: punkt on February 11, 2010, 01:12:30 PM
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?  ;)

complaints comign from people who contribute *anything* are fine (when backed up with patches :D).

I wouldnt be too surprised if eventually lua can be used for the wps, but untill then, what extra logic is actually needed? same with variables? both just make the code shorter, they dont really add anything.

and yeah, it shuold be possible to move %Tl/k into a viewport. its just not had anyone do that yet.
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline Biont

  • Member
  • *
  • Posts: 49
Re: WPS buttons show when touching the touchscreen (like Cowon D2 OF)
« Reply #6 on: February 11, 2010, 02:45:53 PM »
Quote from: punkt on February 11, 2010, 01:12:30 PM
But until I'm contributing more, I haven't got the right to be complaining, have I?  ;)

Hehe, at least you can contribute :D
I can't code, so all I can do is trying to make a great theme that's up-to date with most WPS related changes.
But I'd gladly help you with making an OF-like theme when it's possible. I'm sure that would make some people happy (Also, it would be awesome^^)


...and wow, nice to hear you use my theme for testing :P
Logged

Offline punkt

  • Member
  • *
  • Posts: 13
Re: WPS buttons show when touching the touchscreen (like Cowon D2 OF)
« Reply #7 on: February 12, 2010, 09:21:13 AM »
Quote from: JdGordon on February 11, 2010, 02:00:59 PM
I wouldnt be too surprised if eventually lua can be used for the wps, but untill then, what extra logic is actually needed? same with variables? both just make the code shorter, they dont really add anything.

Just a crazy thought: I was thinking about lua themes last night, and this is what I came up with (see attached file). You can e.g. use variables as actions in touch areas (which are identical to viewports in this draft), and if-expressions. Overlapping viewports are supposed to be supported, so when drawing, all currently show()n viewports need to be drawn.

Don't know if this would really add any practical value, or if I'm just too used to imperative style programming. But I've always wanted to use lua in a project, so that's my hammer looking for a nail :)
* theme.lua.txt (1.21 kB - downloaded 139 times.)
Logged
16GB D2

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  WPS buttons show when touching the touchscreen (like Cowon D2 OF)
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.087 seconds with 15 queries.