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:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Trying to create theme for FM Screen
« previous next »
  • Print
Pages: [1]

Author Topic: Trying to create theme for FM Screen  (Read 2017 times)

Offline jim234567

  • Member
  • *
  • Posts: 21
Trying to create theme for FM Screen
« on: June 07, 2011, 07:46:11 PM »
First-time newbie here working with themes, so please go easy on me lol.

I did manage to get a theme working for the While Playing Screen, but for some reason the FM Screen on my player is giving me a bunch of grief, though everything works wonderfully on the UI Simulator I downloaded here:
http://rasher.dk/rockbox/simulator-3.8/sansaclipplus-sim-w32.zip  ???

I can get one or two viewports to take, but once I start adding any stuff to them it goes kaput (reverts to the default RB screen).

Can anyone see if there's an issue with the following code and tell me where I might be going wrong?

(I have RB 3.8.1 on a Sansa Clip+)

Code: [Select]
#Enable the status bar
%we

#fonts
%Fl(2,27-Adobe-Helvetica.fnt)

#signal meter, tuning & stereo indicator
%V(0,8,-,8,-)
%xl(a,signal.bmp,1,0)
%xl(b,stereo.bmp,99,0)
%tt%xd(a)
%ts%xd(b)
%tr(30,0,66,6,sstrength.bmp)
%x(c,ssbackground.bmp,30,0)

# Station Frequency
%V(0,20,-,29,2)
%ac%tf MHz

#preset name
%V(0,50,-,14,1)
%s%ac%Tn





Logged

Offline sockbox

  • Member
  • *
  • Posts: 111
Re: Trying to create theme for FM Screen
« Reply #1 on: June 08, 2011, 01:14:23 AM »
Its difficult to debug without the images. But by commenting out all the lines which references images I was able to use the fms.

I would limit the glyphs used for the font. You may be using too much memory for the wps & fms skin.

%Fl(2,27-Adobe-Helvetica.fnt, 12)

Or, just guessing here, you're running an older build of Rockbox on your clip. Upgrade to the latest build. The %tr tag only works in v3.8+.
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Trying to create theme for FM Screen
« Reply #2 on: June 08, 2011, 03:12:30 AM »
You should be able to use

System/Rockbox Info/Skin RAM Usage:

Either in the simulator or on target and see how close you are to overflowing the skin buffer.
A full .wps/.sbs/.fms/ theme that's image heavy and loads additional fonts is almost certainly capable of doing so on this target.


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

Offline jim234567

  • Member
  • *
  • Posts: 21
Re: Trying to create theme for FM Screen
« Reply #3 on: June 08, 2011, 07:07:17 PM »
As above, I have RB 3.8.1, which I do believe is still current release (I only DL'ed it 3 days ago).

Skin RAM usage says 19.8K (what's the limit on it?)
Edit: N/M, I see it says 49K (scrolls) so seems I should be good there...


The images are as follows:

All are 1-bit BMP files

signal.bmp is 26x7 px (90B)
stereo.bmp is 30x7 (90B)
sstrength & ssbackground both are 66x6 (134B).

On my wps I have a pb.bmp and pbbackground.bmp, also 66x6 (134B) files

Code I'm using on the wps (which works fine):

Code: [Select]
# enable the status bar
%we

# fonts
%Fl(2,08-Rockfont.fnt,20)
%Fl(3,12-Nimbus.fnt)
%Fl(4,07-Fixed.fnt,130)

# Progress bar, song elapsed & remaining time
%V(0,8,-,8,2)
%al%pc%ar%pt
%x(a,pbbackground.bmp,32,0)
%pb(32,0,66,6,pb.bmp)

# track title
%V(0,16,-,25,3)
%ac%s%?it<%it|%fn>

# artist or parent directory
%V(0,28,-,25,3)
%ac%s%?ia<%ia|%?d(2)<%d(2)|%(root%)>>

# album (year) or current directory
%V(0,39,-,25,3)
%ac%s%?id<%id|%?d(1)<%d(1)|%(root%)>> %?iy<%(%iy%)|>

# playlist position/total
%V(0,54,45,-,2)
%al%pp/%pe

# playlist name
%V(47,56,-,-,4)
%ac%s%?pn<%pn|playlist>

I have not created a .SBS file, that part of it actually suits me pretty well as is (just using 09-Nedore as the "system font" I guess it is).


Can someone briefly explain "glyphs"? I couldn't really find much info about what exactly they are and what they do in the wiki... As you can see, I had been trying some numbers I saw on some examples I had downloaded from the Themes page, but never any success with getting the fms to work (I hadn't tried a number as low as 12 though).



« Last Edit: June 08, 2011, 07:11:35 PM by jim234567 »
Logged

Offline jim234567

  • Member
  • *
  • Posts: 21
Re: Trying to create theme for FM Screen
« Reply #4 on: June 10, 2011, 09:12:07 PM »
Well, chalk it up to user error lol. I had put 27-Adobe-Helvetica.fnt on the FMS config file, meanwhile the player had 27-Adobe-Helvetica-Bold on it, which I guess breaks the whole entire thing (though I could've sworn I had tried it without the font at least once already)



Put the correct font in, and now it's finally working 8) (well aside from the tuned & stereo indicators don't seem to change status at all, hopefully that ends up being something simple too.

Thanks guys for looking into it for me, it was appreciated.

(this board needs a "beer" emoticon thingy lol)
« Last Edit: June 10, 2011, 09:18:43 PM by jim234567 »
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Trying to create theme for FM Screen
« Reply #5 on: June 10, 2011, 10:42:47 PM »
The mixup with the tuner and stereo indicators is a pretty simple one.

Code: [Select]
%tt%xd(a)
%ts%xd(b)

should be,

Code: [Select]
%?tt<%xd(a)>
%?ts<%xd(b)>

You can check out the section explaining conditional elements in the manual for your player.


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

Offline jim234567

  • Member
  • *
  • Posts: 21
Re: Trying to create theme for FM Screen
« Reply #6 on: June 11, 2011, 06:30:55 PM »
Yeah, I got it figured out. Thank you 8)

FWIW, the "tuned" (%tt) function worked erratically on my Clip+, so I got rid of that and just put it to show "SIG" for the meter (I suspect this was a hardware issue in the tuner, and nothing to do with RB or the coding).

Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Trying to create theme for FM Screen
 

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

Page created in 0.076 seconds with 15 queries.