diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2009-10-19 15:28:15 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2009-10-19 15:28:15 +0000 |
| commit | 1016ee4e809776619fa9e4e773ceb1523bd7bc66 (patch) | |
| tree | 585cd873c118bee7c2459205e6eb54ff3e76a21b /wps | |
| parent | 00695baac0b797cbe46e7bc2999a83f73b36aae8 (diff) | |
| download | rockbox-1016ee4e809776619fa9e4e773ceb1523bd7bc66.zip rockbox-1016ee4e809776619fa9e4e773ceb1523bd7bc66.tar.gz rockbox-1016ee4e809776619fa9e4e773ceb1523bd7bc66.tar.bz2 rockbox-1016ee4e809776619fa9e4e773ceb1523bd7bc66.tar.xz | |
Initial custom statusbar commit.
The custom statusbar can be used as a WPS for the main UI, using .(r)sbs files. It's using the skin engine and knows all tags the WPS also knows.
The default folder for .sbs is the wps folder to reuse images used in the WPS.
As it can be shown in the WPS also, it's useful to move shared parts to the custom statusbar in order to save skin buffer space.
There are a few restrictions/TODOs:
*) Peak meter doesn't redraw nicely(not frequent enough), as very frequent updates would slow the UI down as hell (some targets fight with it in the WPS already: FS#10686)
*) No touchregion support as the statusbar doesn't have any action handling (it won't fail to parse though).
*) Drawing stuff into the default VP is forbidden (loading images in it is not). You *need* to use viewports for the displaying stuff (parsing fails if no viewport is used).
*) Themes that don't use a custom ui viewport can be fixed up using the new %Vi tag to avoid nasty redraw effectts (you must not draw into it as well, it's used to fix up the ui viewport). %Vi describes the viewport that the lists can use without getting in the way of the statusbar.
Otherwise, it behaves like the classic statusbar, it can be configured in the theme settings, and can be turned off in the wps using %wd.
Note to translaters: When translating LANG_STATUSBAR_CUSTOM, please consider using the same translation as for LANG_CHANNEL_CUSTOM if it's compatible. They could be combined later then.
Flyspray: FS#10566
Author: myself
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23258 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'wps')
| -rw-r--r-- | wps/WPSLIST | 21 | ||||
| -rwxr-xr-x | wps/wpsbuild.pl | 87 |
2 files changed, 93 insertions, 15 deletions
diff --git a/wps/WPSLIST b/wps/WPSLIST index 662fb82..9b52416 100644 --- a/wps/WPSLIST +++ b/wps/WPSLIST @@ -44,6 +44,8 @@ selector type: bar (inverse) <wps> Name: rockbox_default.wps RWPS: rockbox_default.rwps +SBS: +RSBS: Author: Rockbox team Font: 08-Schumacher-Clean.fnt Font.11x2x1: @@ -59,6 +61,8 @@ selector type: bar (inverse) <wps> Name: boxes.wps rwps: boxes.rwps +SBS: +RSBS: Author: Christi Scarborough (after Magnus Westerlund) Font: 08-Schumacher-Clean.fnt Statusbar: top @@ -76,6 +80,8 @@ remote ui viewport: - <wps> Name: engineeer2.wps RWPS: engineeer2.rwps +SBS: +RSBS: Author: Magnus Westerlund Font: 08-Nedore.fnt Statusbar: top @@ -90,6 +96,8 @@ remote ui viewport: - <wps> Name: iAmp.wps RWPS: iAmp.rwps +SBS: +RSBS: Author: Raymond Hoh Font: 12-Nimbus.fnt backdrop: @@ -104,6 +112,8 @@ remote ui viewport: - <wps> Name: zezayer.wps RWPS: zezayer.rwps +SBS: +RSBS: Author: Jake Owen Font: 08-Nedore.fnt Statusbar: top @@ -153,6 +163,8 @@ Statusbar: top <wps> Name: DancePuffDuo.wps RWPS: DancePuffDuo.rwps +SBS: +RSBS: Author: Chris Oxtoby Font: 13-Nimbus.fnt Statusbar: top @@ -176,6 +188,8 @@ Statusbar: top <wps> Name: iCatcher.wps RWPS: iCatcher.rwps +SBS: +RSBS: Author: Ioannis Koutoulakis Font.112x64x1: 08-Rockfont.fnt Font.128x64x1: 08-Rockfont.fnt @@ -212,6 +226,8 @@ Statusbar: top <wps> Name: UniCatcher.wps RWPS: UniCatcher.rwps +SBS: +RSBS: Author: Ioannis Koutoulakis Font: 16-GNU-Unifont.fnt Foreground Color: 000000 @@ -235,6 +251,8 @@ Statusbar: top <wps> Name: Rockboxed.wps RWPS: rockbox_default.rwps +SBS: +RSBS: Author: Roan Horning Font.112x64x1: 08-Schumacher-Clean.fnt Font.128x64x1: 08-Schumacher-Clean.fnt @@ -268,6 +286,8 @@ Author: Jens Arnold <wps> Name: cabbiev2.wps RWPS: cabbiev2.rwps +SBS: +RSBS: # Real name of the creator of the WPS Author: Johannes Voggenthaler, Apoo Maha, Marc Guay, Alex Vanderpol, Jerry Lange, Keith Perri, Mark Fawcus, and Marianne Arnold with support from Rockbox developers and forums. Based on Cabbie by Yohann Misquitta. @@ -349,6 +369,7 @@ viewers iconset.240x400x16: /.rockbox/icons/tango_small_viewers.bmp # Whether the WPS is designed to have the statusbar on or off Statusbar: top +remote statusbar: top # list & remote ui viewports ui viewport: - diff --git a/wps/wpsbuild.pl b/wps/wpsbuild.pl index e9e5c29..7378f30 100755 --- a/wps/wpsbuild.pl +++ b/wps/wpsbuild.pl @@ -32,9 +32,18 @@ my $cppdef = $target; my @depthlist = ( 16, 8, 4, 2, 1 ); # These parameters are filled in as we parse wpslist +my $req_size; +my $req_g_wps; +my $req_t; +my $req_t_wps; my $wps; my $wps_prefix; +my $sbs_prefix; my $rwps; +my $sbs; +my $sbs_w_size; +my $rsbs; +my $rsbs_w_size; my $width; my $height; my $font; @@ -42,9 +51,6 @@ my $fgcolor; my $bgcolor; my $statusbar; my $author; -my $req_g; -my $req_g_wps; -my $req_t_wps; my $backdrop; my $lineselectstart; my $lineselectend; @@ -191,12 +197,26 @@ sub copywps my $dir; my @filelist; my $file; + my $__sb; if($wpslist =~ /(.*)WPSLIST/) { $dir = $1; -# system("cp $dir/$wps .rockbox/wps/"); - #print "$req_t_wps $req_g_wps\n"; + $__sb = $sbs_prefix . "." . $req_size . ".sbs"; + #print "$req_t_wps $req_g_wps $sbs_prefix\n"; + #print "$dir/$__sb\n"; +# system("cp $dir/$wps .rockbox/wps/"); + # check for <name>.WIDTHxHEIGHTxDEPTH.sbs + if (-e "$dir/$__sb") { + system("cp $dir/$__sb $rbdir/wps/$sbs"); + } + # check for <name>.WIDTHxHEIGHTxDEPTH.<model>.sbs and overwrite the + # previous sb if needed + $__sb = $sbs_prefix . "." . $req_size . "." . $modelname . ".sbs"; + if (-e "$dir/$__sb") { + system("cp $dir/$__sb $rbdir/wps/$sbs"); + } + if (-e "$dir/$req_t_wps" ) { system("cp $dir/$req_t_wps $rbdir/wps/$wps"); @@ -210,9 +230,9 @@ sub copywps close(WPSFILE); if ($#filelist >= 0) { - if (-e "$dir/$wps_prefix/$req_g") { + if (-e "$dir/$wps_prefix/$req_size") { foreach $file (@filelist) { - system("cp $dir/$wps_prefix/$req_g/$file $rbdir/wps/$wps_prefix/"); + system("cp $dir/$wps_prefix/$req_size/$file $rbdir/wps/$wps_prefix/"); } } elsif (-e "$dir/$wps_prefix") { @@ -235,7 +255,7 @@ sub copywps sub buildcfg { my $cfg = $wps; - my @out; + my @out; $cfg =~ s/\.(r|)wps/.cfg/; @@ -247,6 +267,20 @@ sub buildcfg { wps: /$rbdir/wps/$wps MOO ; + if(defined($sbs)) { + if ($sbs eq '') { + push @out, "sbs: -\n"; + } else { + push @out, "sbs: /$rbdir/wps/$sbs\n"; + } + } + if(defined($sbs) && $has_remote) { + if ($rsbs eq '') { + push @out, "rsbs: -\n"; + } else { + push @out, "rsbs: /$rbdir/wps/$rsbs\n"; + } + } if($font) { push @out, "font: /$rbdir/fonts/$font\n"; } @@ -264,7 +298,7 @@ MOO } if(defined($backdrop)) { if ($backdrop eq '') { - push @out, "backdrop:\n"; + push @out, "backdrop: -\n"; } else { # clip resolution from filename $backdrop =~ s/(\.[0-9]*x[0-9]*x[0-9]*)//; @@ -338,6 +372,8 @@ while(<WPS>) { undef $wps; undef $wps_prefix; undef $rwps; + undef $sbs; + undef $rsbs; undef $width; undef $height; undef $font; @@ -386,23 +422,24 @@ while(<WPS>) { foreach my $d (@depthlist) { next if ($d > $rdepth); - $req_g = $rwidth . "x" . $rheight . "x" . $d; + $req_size = $rwidth . "x" . $rheight . "x" . $d; # check for model specific wps - $req_g_wps = $wps_prefix . "." . $req_g . "." . $modelname . ".wps"; + $req_g_wps = $wps_prefix . "." . $req_size . "." . $modelname . ".wps"; last if (-e "$wpsdir/$req_g_wps"); - $req_g_wps = $wps_prefix . "." . $req_g . ".wps"; + # check for normal wps (with WIDTHxHEIGHTxDEPTH) + $req_g_wps = $wps_prefix . "." . $req_size . ".wps"; last if (-e "$wpsdir/$req_g_wps"); if ($isrwps) { - $req_g = $req_g . "." . $main_width . "x" . $main_height . "x" . "$main_depth"; + $req_size = $req_size . "." . $main_width . "x" . $main_height . "x" . "$main_depth"; - $req_g_wps = $wps_prefix . "." . $req_g . ".wps"; + $req_g_wps = $wps_prefix . "." . $req_size . ".wps"; last if (-e "$wpsdir/$req_g_wps"); } } - $req_t_wps = $wps_prefix . ".txt" . ".wps"; + $req_t_wps = $wps_prefix . $req_t . ".wps"; #print "LCD: $wps wants $width x $height\n"; #print "LCD: is $rwidth x $rheight\n"; @@ -454,6 +491,20 @@ while(<WPS>) { elsif($l =~ /^RWPS\.${main_width}x${main_height}x$main_depth: *(.*)/i) { $rwps = $1; } + elsif($l =~ /^SBS: *(.*)/i) { + $sbs = $sbs_prefix = $1; + $sbs_prefix =~ s/\.(r|)sbs//; + } + elsif($l =~ /^SBS\.${main_width}x${main_height}x$main_depth: *(.*)/i) { + $sbs = $sbs_prefix = $1; + $sbs_prefix =~ s/\.(r|)sbs//; + } + elsif($l =~ /^RSBS: *(.*)/i) { + $rsbs = $1; + } + elsif($l =~ /^RSBS\.${main_width}x${main_height}x$main_depth: *(.*)/i) { + $rsbs = $1; + } elsif($l =~ /^Author: *(.*)/i) { $author = $1; } @@ -526,9 +577,15 @@ while(<WPS>) { elsif($l =~ /^ui viewport: *(.*)/i) { $listviewport = $1; } + elsif($l =~ /^ui viewport\.${main_width}x${main_height}x$main_depth: *(.*)/i) { + $listviewport = $1; + } elsif($l =~ /^remote ui viewport: *(.*)/i) { $remotelistviewport = $1; } + elsif($l =~ /^remote ui viewport\.${main_width}x${main_height}x$main_depth: *(.*)/i) { + $remotelistviewport = $1; + } else{ #print "Unknown line: $l!\n"; } |