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
| | |-+  Image based progress and volume bars
« previous next »
  • Print
Pages: [1]

Author Topic: Image based progress and volume bars  (Read 1688 times)

Offline Carson Dyle

  • Member
  • *
  • Posts: 80
Image based progress and volume bars
« on: December 20, 2010, 05:45:40 PM »
Is it possible to implement image based progress and volume bars with both the foreground and background images in bitmaps?  The only way that I've seen these implemented is with the background image in the backdrop.

What I'm doing is using conditional viewports to have the progress and volume bars share the same screen area.  Normally progress is displayed, but when volume is adjusted the volume bar appears.  I can easily do this with non-bitmap bars.  But since I want the progress bar and volume bars to have different lengths and different appearances, I can't overlay them on a single background in the backdrop.
Logged

Offline Progweed

  • Member
  • *
  • Posts: 67
Re: Image based progress and volume bars
« Reply #1 on: December 21, 2010, 05:28:46 AM »
You can achieve this by putting the progress bar and its background into the same viewport; and I think both bitmaps need to be partially transparent. You might want to have a look at my theme KISSv2:

http://themes.rockbox.org/index.php?themeid=1119&target=sansafuzev2

Code: [Select]
%Vl(a,126,116,90,8,-)
%x(a,kissv2_pb_small_bg.bmp,0,0) // Background
%pb(0,0,90,8,kissv2_pb_small.bmp) // Progress bar
Logged

Offline DrewVosburg

  • Member
  • *
  • Posts: 42
  • Designer
Re: Image based progress and volume bars
« Reply #2 on: January 12, 2011, 01:07:41 PM »
NICE!!  that's a sweet technique!
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Image based progress and volume bars
« Reply #3 on: January 15, 2011, 12:32:47 AM »
There's no need for transparency here...

The only relevant thing is the position in which the images are loaded.

Code: [Select]
%V(X,X,X,X,-)
%x(X,<FILE_NAME>.bmp,X,X)  <--- Background
%pb(X,X,X,X,<FILE_NAME>.bmp)  <--- Progress bar

will work, but:

Code: [Select]
%V(X,X,X,X,-)
%pb(X,X,X,X,<FILE_NAME>.bmp)  <--- Progress bar
%x(X,<FILE_NAME>.bmp,X,X)  <--- Background

Will not.

This is because the draw order is respected, and we want the progressbar to be drawn over top of it's background.



[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
| | |-+  Image based progress and volume bars
 

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

Page created in 0.082 seconds with 15 queries.