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:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Editing a theme - crashes when inserting "%Vp"
« previous next »
  • Print
Pages: [1]

Author Topic: Editing a theme - crashes when inserting "%Vp"  (Read 1316 times)

Offline thrdhes

  • Member
  • *
  • Posts: 6
Editing a theme - crashes when inserting "%Vp"
« on: April 30, 2011, 04:36:20 PM »
Hi. I use the theme "plans" on a 5G iPod http://themes.rockbox.org/index.php?themeid=51&target=ipodvideo
However, I modify it to suit my needs better. Particularly, I'd like to display informations about the next tracks to be played.
At this point, here's the code that works fine for me (file "plans.wps") :
Code: [Select]
%we
%X(bg.bmp)
%Cl(212,91,100,100)
%pb(9,194,310,16,pb.bmp)
%s%ac%?ia<%ia|%?d(2)<%d(2)|>>
%s%ac%?it<%it|%fn> %?in<%(%in%)|>
%s%ac%?id<%id|%?d(1)<%d(1)|>> %?iy<%(%iy%)|>

%ac%?ig<%ig - |> Codec : %fc %(%?fb<%fbkbps|>%)


%acPlaylist %(%pp/%pe%)
#%Vp(1, %pp %?ia<%ia:|%?d(2)<%d(2):|>>%?it<%it|%fn>)







%?C<%Vd(a)%Cd|%Vd(b)>

%al [ %pc %ac%pt %ar-%pr ]

But then I need a viewport to display the "%Vp" in. And at this point I can't find a proper way to code it, the theme always crashes. May someone with a better understanding than mine help me to find the proper way to code that ? Thanks.
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Editing a theme - crashes when inserting "%Vp"
« Reply #1 on: May 01, 2011, 12:54:31 AM »
I havnt had much rockbox time lately, but that definitly shouldnt be crashing.. file a bug
Logged


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

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Editing a theme - crashes when inserting "%Vp"
« Reply #2 on: May 02, 2011, 05:10:26 AM »
It probably should be crashing from my understanding...

Or, at the very least there should be horrible draw issues...crashing is probably due to inability to render these horrors ;)

If I read that correctly, and my understanding of the %Vp tag is sound...would this .wps not be trying to draw the playlistviewer fullscreen, in the fullscreen (default) viewport?

Or...am I incorrect in thinking that %Vp always needs to be defined in it's own viewport? As that was my understanding.


Also, thrdhes, is that the *complete* .wps?

If it is...you're calling two viewports conditionally (identifiers a and b) that don't actually have viewport definitions...this should surely fail.


[St.]
« Last Edit: May 02, 2011, 08:45:14 AM by [St.] »
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline thrdhes

  • Member
  • *
  • Posts: 6
Re: Editing a theme - crashes when inserting "%Vp"
« Reply #3 on: May 08, 2011, 06:31:33 AM »
Hi men, thanks for your help.

St. > yes, this is the complete wps file, however the "%Vp" tag is commented as indeed, as you say, that tag needs to be defined in its own viewport. But that's where the problem is : I CANNOT succeed in creating the viewport to contain this tag, and that's why I ask help, I need someone who knows how to correctly declare the viewport (and other viewports if needed in consequence of the declaration of one viewport).
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Editing a theme - crashes when inserting "%Vp"
« Reply #4 on: May 08, 2011, 07:08:17 AM »
That's not the only problem there...I'm going to assume you can't see it, so I'll explain further than I did last time.

the section:
Code: [Select]
%?C<%Vd(a)%Cd|%Vd(b)>

Is calling two viewports (for two different states (album art available/not)) that don't exist, Vd(a) and Vd(b), this will fail unless something changed fairly recently.

Regarding your question on defining viewports, the manual covers this, but I will briefly.

If the viewport isn't being displayed conditionally (ie. if it will always be displayed) we don't need to bother with an identifier so:
Code: [Select]
%V(X,Y,width,height,font)

X, Y is the X/Y coordinates of the screen in pixels, the top left corner of the screen is 0,0

width, height...pretty self explanitory, in pixels.

font, is either 0 for the system font, or 1 for the user selected font (it can also be 2~9 if another font is declared with the %Fl tag)


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

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Editing a theme - crashes when inserting "%Vp"
 

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

Page created in 0.074 seconds with 16 queries.