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
| | |-+  Artwork Tag in WPS - More than one tag in code doesnt work?
« previous next »
  • Print
Pages: [1]

Author Topic: Artwork Tag in WPS - More than one tag in code doesnt work?  (Read 2241 times)

Offline bpg

  • Member
  • *
  • Posts: 2
Artwork Tag in WPS - More than one tag in code doesnt work?
« on: June 08, 2014, 06:52:23 AM »
Hello world! :)

The tags %Cl and %Cd can't appear more than once in the code?

If I want to have the cover appear with different size/position depending on some condition, like hold switch on, I would make something like this:

Code: [Select]
# Hold?
%?mh<%Vd(a)|%Vd(b)>
%Vl(a,1,1,50,50,1)
%Cl(0,0,50,50,c,c)%Cd
%Vl(b,50,50,100,100,1)
%Cl(0,0,100,100,c,c)%Cd
or
Code: [Select]
# Hold?
%?mh<%Vd(a)|%Vd(b)>
%?mh<%Cl(0,0,50,50,c,c)|%Cl(0,0,100,100,c,c)>
%Vl(a,1,1,50,50,1)
%Cd
%Vl(b,50,50,100,100,1)
%Cd

but the %Cl tag that comes last is the one who defines the art no matter the conditionals.
I'm guessing the answer is no? Thanks for any help guys.

Tested on Fuze v1, Rockbox 3.13
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Artwork Tag in WPS - More than one tag in code doesnt work?
« Reply #1 on: June 08, 2014, 02:52:55 PM »
You are absolutely right, and, this is expected behaviour.

There's some work in progress in this area, but personally I haven't had much time for Rockbox lately barring occasionally handling support on the forum, so I haven't had much of a chance to torture test the code or speak of my views of preferred syntax should it indeed be included, which may never actually happen.

There was some speculation a while ago that we're going to try squeeze out a release either before, or during, DevCon. If this is the case, it definitely won't be happening before then (feature freeze).


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

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Artwork Tag in WPS - More than one tag in code doesnt work?
« Reply #2 on: June 09, 2014, 09:56:25 PM »
Hi, As [Saint] said I actually put up a patch to do just what you want last week! (and in fact your little snippet is almost exactly how I tested it :p )

http://gerrit.rockbox.org/r/#/c/839/ is the link (you need to compile it yourself) or you can use this (which I've just built for you) http://melb.jdgordon.info/rockbox/rockbox-multiaa.zip

Use this snippet to display it!

Code: [Select]
# Hold?
%?mh<%Vd(a)|%Vd(b)>
%Vl(a,1,1,50,50,1)
%Cx(0,0,50,50,c,c)
%Vl(b,50,50,100,100,1)
%Cx(0,0,100,100,c,c)

I'm eager to get feedback so this can be finished up and committed so let me know how it goes and how/if you think it should be changed.

My main issue is that I think it should be possible to check the next tracks AA image and have it displayed, and if that is possible how it should work.

Logged


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

Offline bpg

  • Member
  • *
  • Posts: 2
Re: Artwork Tag in WPS - More than one tag in code doesnt work?
« Reply #3 on: June 11, 2014, 08:03:45 AM »
Great! I didn't exactly stress tested it but it seems to work just fine for conditional viewports, using the build you provided. On the other hand, I don't know if it's just me but with this build my battery seems to be draining a bit; I should benchmark it to see. Also, I tried to use multiple %Cx as alternating sublines out of curiosity, but it doesn't seem to work well though.

Anyway, with what you implemented there are much more possibilities with AA in WPS, like toggling between a big AA and other infos. It would be nice to have this committed.

Thanks a lot JdGordon and [Saint] also.
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Artwork Tag in WPS - More than one tag in code doesnt work?
« Reply #4 on: June 11, 2014, 07:50:18 PM »
The only reservation I have about this is the syntax.

Ideally, here's how I would like it to go:

Code: [Select]
# Basic example theme to show syntax usage
%Cl(big_art,x,y,w,h,x-align,y-align)
%Cl(bigger_art,x,y,w,h,x-align,y-align)
%Cl(really_big_art,x,y,w,h,x-align,y-align)
%Cl(small_art,x,y,w,h,x-align,y-align)
#
%V(x,y,w,h,-)
%Cd(big_art)
#
%V(x,y,w,h,-)
%Cd(bigger_art)
#
%V(x,y,w,h,-)
%Cd(really_big_art)
#
%V(x,y,w,h,-)
%Cd(small_art)

And so on.

This, in my opinion, has a few advantages over the proposed submission.
The most obvious one in my mind is consistency. This makes %Cl behave exactly the same (at least in regard to syntax) as any other preloaded theme element, images, viewports, fonts, etc.

The element is preloaded once, and can then be called upon as many times as desired after the fact using the element's identifier.
Exactly similar to how images and viewports are handled.

I think it is important to at least attempt to have a consistent syntax and flow, especially between similar elements.
In theory at least, album art is identical to any other image displayed in the theme and should be handled as such.

Ideally, I would like to change the %Cl tag to %cl as well, in order to make the case more consistent with other tags that perform similar functions, but that would be a skin breaking change (however, we could run a find and replace script across the theme server to minimize disruption as we have done in the past).

I would also like to change the %Cd tag to %cd, again for consistency, and the thought just occurred to me that one could use %cD as the "next album art" tag, which is consistent with the metadata display tag syntax for displaying the next item.


[Saint]
« Last Edit: June 11, 2014, 07:51:57 PM by [Saint] »
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Artwork Tag in WPS - More than one tag in code doesnt work?
« Reply #5 on: June 11, 2014, 09:00:21 PM »
I can't see any benefit to your example honestly. Can you come up with a real-worldish example where the labels make it easyier?

I agree that consistancy is better, but (like I said in IRC) positioning the images with the load tag instead of the display tag is just wrong. Im trying to get a hold of the theme site archive so I can actually see if the same image is *ever* displayed more than once in a theme. My guess is it isnt.

Before I do too much more for this I want to see if we can get the next tracks image. If we can then I tihnk we might retire %C* and move the art images to %iA or something.. suggestions?
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
| | |-+  Artwork Tag in WPS - More than one tag in code doesnt work?
 

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

Page created in 0.073 seconds with 14 queries.