Rockbox

Tasklist

FS#10804 - Add touchscreen mode indication to status bar

Attached to Project: Rockbox
Opened by Rob Purchase (shotofadds) - Sunday, 22 November 2009, 20:23 GMT
Task Type Patches
Category User Interface
Status New
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

The attached patch adds an indication of the current touchscreen mode to the "classic_statusbar" skin. This is useful since some screens automatically change mode, and there's currently no indication the user when this happens. The patch does the following:

- Adds a new WPS tag (%Tm) to return the current touch mode (Absolute|Grid)
- Updates classic_statusbar.sbs to conditionally show the correct icon

The reason I've made this a Flyspray task rather than just committing it is because the additions to classic_statusbar.sbs will also apply to non-touchscreen targets (though nothing will appear on screen). While the impact on these targets is minimal, I'm not sure about committing it since it will at least cause the new touchmode.bmp to be loaded unneccesarily.

Also, feel free to design some better icons!
This task depends upon

Comment by Maurus Cuelenaere (mcuelenaere) - Sunday, 22 November 2009, 21:05 GMT
I just tried this on my Onda VX747 and it works great!

I like the idea, but a problem with plugins is that they don't (always) display the statusbar, so you can't see in what touchscreen mode you are..

Also, if you don't want to load touchmode.bmp I suppose you could split the classic statusbar into a normal and a touchscreen sbs? (btw, isn't there a fixed-size buffer atm for SBS/WPS data? If so, loading an extra bmp probably won't increase RAM size)
Comment by Jonathan Gordon (jdgordon) - Sunday, 22 November 2009, 21:54 GMT
+%?Tm<%xdTa|%xdTb|> is wrong... that last | should be removed... otherwsie looks good.. no reason to not commit... dont worry aout the extra bp loading.,.. its not a big deal
Comment by Rob Purchase (shotofadds) - Sunday, 22 November 2009, 22:07 GMT
That last '|' is the 'else' choice, it's needed to ensure nothing gets displayed on non-touchscreen targets.

@mcuelenaere, yes you're right - the fixed sized buffer means there's no extra overhead. As for a touch variant, I'd rather avoid that especially for a simple variation like this.
Comment by Jonathan Gordon (jdgordon) - Sunday, 22 November 2009, 22:24 GMT
ah yes, my bad..
Comment by Thomas Martitz (kugel.) - Tuesday, 24 November 2009, 10:04 GMT
Why not having a touchscreen-available tag (using the new feature check functions). All touchscreen related tags could be enclosed with that, and if there's no touchscreen support it would just skip the tag. No parsing, no bmp loading.
Comment by Rob Purchase (shotofadds) - Tuesday, 24 November 2009, 20:08 GMT
What do you mean by "new feature check functions"? I don't see anything in CustomWPS about feature checking...
Comment by Jonathan Gordon (jdgordon) - Tuesday, 24 November 2009, 20:10 GMT
its a new feature of the parser whcih was added recently.. I'm not sure its good to use it here though... especially since when I tried it, the parser failed to ignore %Xl lines..
Comment by Thomas Martitz (kugel.) - Tuesday, 24 November 2009, 21:55 GMT
You did it wrong then :) Did you protect the references (%xdX) too ?

shotofadds, have a look at how RTC support is handled (check_feature_tag() in skin_parser.c)
Comment by Rob Purchase (shotofadds) - Tuesday, 24 November 2009, 22:06 GMT
Ah, I see what you mean. The overhead of adding another new tag to the parser is probably much greater than loading the bitmap, though ;-)
Comment by Thomas Martitz (kugel.) - Tuesday, 24 November 2009, 22:07 GMT
I really really doubt that. How do you come to that idea?
Comment by Rob Purchase (shotofadds) - Wednesday, 02 December 2009, 23:33 GMT
I think I'm seeing something similar to JdGordon above.. "the parser failed to ignore %Xl lines".

I added a %Tp ("touchscreen present") tag, which works for certain things eg. %?Tp<%?Tm<%xdTa|%xdTb|>>
but if I try to protect the %xl or %V lines with this conditional it results in "ERR: Unclosed conditional" when loading the .sbs.

I think it's worth having this tag, but only if it can be used in all places....
Comment by Jonathan Gordon (jdgordon) - Wednesday, 02 December 2009, 23:46 GMT
any tas which run to the end of the line will break the %?Tp conditional, One thing I tried was putting the | and > on the next line... I dont remember if it worked or not though.. i.e
%Tp<%Xl|.....|
|other stuff>
Comment by Jonathan Gordon (jdgordon) - Tuesday, 15 June 2010, 06:53 GMT
resynced to svn. I want to commit this but really dont want to be fiddling with skins much right now...
I also want to get the new icon into the inbuilt bar because that isnt likely to be removed any time soon after all...

Loading...