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
| | |-+  Cover art questions
« previous next »
  • Print
Pages: [1]

Author Topic: Cover art questions  (Read 1320 times)

Offline Elaphe

  • Member
  • *
  • Posts: 23
Cover art questions
« on: July 27, 2014, 01:46:10 PM »
Is there a way to display full art hiding the top status bar? I have this feature from a theme I've downloaded, and it works when you pause the music, but the bar is visible (battery, clock, volume...).

Related to this: any way to display a generic image from a specific location, in case the album art is not found? I could put the generic .jpg in every folder that lacks art, but I'd prefer to create a condition so that the program selects the no-art image automatically. I'm using Sansa Zip Clip.

This is the code:

Code: [Select]
###### Conditional: full screen album art while paused
%?C<
    %?if(%mp,=,3)<
    %Vd(a)|
%Vd(b)>|
%Vd(b)>

#########################################
###### Full screen album art while paused
#########################################

%Vl(a,0,6,96,90,-)
%Cl(4,4,88,88,c,c)
%Cd
« Last Edit: July 27, 2014, 02:03:04 PM by Elaphe »
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Cover art questions
« Reply #1 on: July 27, 2014, 07:42:04 PM »
Oh man I hate that formatting so, so, so much...
As if the syntax wasn't already virtually impossible to read, we decided to add whitespace and indentation and the ability to split statements. Fun.
But I digress...

Anyway, yes. This is possible.

You could even make it respect the user's wishes, if you liked. With something like:

Code: [Select]
# Conditional Elements
# /* Check the current state of the status bar setting to see what the
#  * user wants to do. */
%?St(statusbar)<%we%Vd(STATUS_BAR_ENABLED)|%wd%Vd(STATUS_BAR_DISABLED)>

...using the STATUS_BAR_* viewport (or, whatever you'd like to call them) identifiers later in the theme to govern which viewport(s) are displayed in either case.
Remember that viewports can share identifiers, so you can use one identifier to call any arbitrary amount of viewports.


As for displaying a placeholder image for the album art in the event that no art is available, yes. This is also possible.
Something like:

Code: [Select]
# /* Preload image(s) for use later */
%xl(ALBUM_ART_FALLBACK,0,0)

# /* Album art */
%Vl(ALBUM_ART,0,0,100,100,-)
%Cl(0,0,100,100,c,c)
%?Cd<%Cd|%xd(ALBUM_ART_FALLBACK)>

If I haven't covered either point in enough detail for you, or have been too vague, or you would like to pick my brains on another topic, feel free to do so.
I am perhaps more easily available to consult with on our IRC channel where I am known by the same username. My locale is +12GMT.


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

Offline Elaphe

  • Member
  • *
  • Posts: 23
Re: Cover art questions
« Reply #2 on: July 30, 2014, 02:02:29 AM »
Nice. Thanx a lot.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Cover art questions
« Reply #3 on: July 30, 2014, 02:09:50 AM »
Off topic, but I always wondered why the WPS syntax is so sparse?  Does it really save that much memory to use (random example) %xl() instead of something like %preLoadImage() ?
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Cover art questions
 

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

Page created in 0.073 seconds with 15 queries.