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
| | |-+  Progress Bar with no bmp
« previous next »
  • Print
Pages: [1]

Author Topic: Progress Bar with no bmp  (Read 2126 times)

Offline PaulF

  • Member
  • *
  • Posts: 49
Progress Bar with no bmp
« on: November 30, 2016, 02:30:44 AM »
I have been scaling a theme for different size SDL screens To save scaling a  bmp, I have been trying to follow the example WPS guide where they use a dash instead of bmp name..

The bar is on a black background and it has white frame that is filled in with white as the playing time increases. It works fine, but I don't know where the frame is coming from. I like the frame except the frame has three sides and the bottom line is missing. I tried a lot of different widths for the view and the bar. I have feeling I am doing something stupid.
   __________
  |                   |

Code: [Select]
# Conditional viewports - volume change
%?mv(2)<%Vd(vpVolume)|%Vd(vpNowPlaying)%Vd(vpTime)>
#
# Volume bar
%Vl(vpVolume,98,225,283,10,-)
%pv(-,-,-,6,-)
#
# Progress bar
%Vl(vpNowPlaying,98,225,283,10,-)
%pb(-,-,-,6,-)
#
# Time playing
%Vl(vpTime,0,256,87,15,2)
%ac%pc
#
# Time remaining
%Vl(vpTime,392,256,87,15,2)
%ac%pr
#
# Volume
%Vl(vpVolume,98,228,283,27,1)
%ac%pv dB
Logged

Offline Frankenpod

  • Member
  • *
  • Posts: 415
Re: Progress Bar with no bmp
« Reply #1 on: November 30, 2016, 07:02:41 AM »
Why is the pb viewport 10 units thick when the pb is only 6 thick?
Do you want the pb in the middle of the view port?
Depending on where you want the pb relative to the viewport, it should work if you change pb(-,-...) to pb(0,0,...).  Or pb(0,2,...) depending on where you want the progress bar.  Or just change the pb viewport to be the same thickness as the pb (and also change the -,- to 0,0).
« Last Edit: November 30, 2016, 08:14:58 AM by Frankenpod »
Logged

Offline PaulF

  • Member
  • *
  • Posts: 49
Re: Progress Bar with no bmp
« Reply #2 on: December 01, 2016, 12:46:02 AM »
Frankenpod, we think alike. I am pretty sure I tried your method. I resized the bar and moved it up and down in the view port several different ways. I'll give more info this time.
from autoconfig.h
/* lcd dimensions for application builds from configure */
#define LCD_WIDTH 480
#define LCD_HEIGHT 272

Full wps:
Code: [Select]
# THIN Mod Theme
# by Michael Huth
#
# Based on code and artwork originally created by Drew Vosburg:
# http://themes.rockbox.org/index.php?themeid=1180
#
%wd
#
# 2nd font
%Fl(2,10-Artwiz-Snap.fnt)
#
# Conditional viewports - Album art
%?C<%Vd(vpArt)|%Vd(vpNoArt)>
#
# Playback actions
%V(21,15,26,17,-)
%xl(A,actions.bmp,0,0,5)
%?mp<|%xd(Ac)|%xd(Ab)|%xd(Ad)|%xd(Ae)>
#
# Shuffle
%V(21,61,26,17,-)
%xl(S,shuffle.bmp,0,0)
%?ps<%xd(S)>
#
# Repeat
%V(0,108,69,17,2)
%ac%?mm<|All|One|Rnd|A-B>
#
# Time
%V(401,15,-,15,2)
%?cf<%cH|%cI>:%cM
#
# Battery bar
%V(414,61,43,10,-)
%xl(B,battery.bmp,0,0,17)
%?bl<%xd(Bq)|%xd(Bp)|%xd(Bo)|%xd(Bn)|%xd(Bm)|%xd(Bl)|%xd(Bk)|%xd(Bj)|%xd(Bi)|%xd(Bh)|%xd(Bg)|%xd(Bf)|%xd(Be)|%xd(Bd)|%xd(Bc)|%xd(Bb)|%xd(Ba)>
#
# Battery %
%V(414,77,-,15,2)
%bl%%
#
# Playlist position
%V(397,108,82,46,2)
%ac%pp
%ac%Sx(of)
%ac%pe
#
# Conditional viewports - volume change
%?mv(2)<%Vd(vpVolume)|%Vd(vpNowPlaying)%Vd(vpTime)>
#
# Volume bar
%Vl(vpVolume,98,256,283,10,-)
%xl(V,barbg.bmp)
%pv(0,0,-,-)
#
# Progress bar
%Vl(vpNowPlaying,98,256,283,10,-)
%pb(0,0,-,-)
#
# Time playing
%Vl(vpTime,0,256,87,15,2)
%ac%pc
#
# Time remaining
%Vl(vpTime,392,256,87,15,2)
%ac%pr
#
# Volume
%Vl(vpVolume,98,228,283,27,1)
%ac%pv dB
#
# Art - Now Playing
%Vl(vpNowPlaying,17,228,445,27,1)
%?C<%s%ac%?ia<%ia: >%?it<%it|%fn>>
#
# No Art - Now Playing
%Vl(vpNoArt,87,77,305,139,1)
%s%ac%?it<%it|%fn>
%s%ac%ia
%s%ac%id
%s%ac%iy
#
# Speaker icon
%Vl(vpVolume,414,241,43,30,-)
%x(I,speaker.bmp,0,0)
#
# Album art
%Vl(vpArt,137,7,216,216,-)
%Cl(0,0,216,216,c,c)
%Cd

* pb.JPG (29.24 kB, 486x300 - viewed 218 times.)
Logged

Offline Frankenpod

  • Member
  • *
  • Posts: 415
Re: Progress Bar with no bmp
« Reply #3 on: December 01, 2016, 10:43:25 AM »
Well it works for me when I use

# Progress bar
%Vl(vpNowPlaying,98,256,283,10,-)
%pb(0,0,-,10)
#

Not sure what the '- ' in place of the '10' is intended to do, but it doesn't give the result you want (perhaps a rockbox theme engine glitch?), so just put the '10' in there.

...or

# Progress bar
%Vl(vpNowPlaying,98,256,283,6,-)
%pb(0,0,-,6)
#

...or

# Progress bar
%Vl(vpNowPlaying,98,256,283,6,-)
%pb(0,2,-,6)
#

...depending on which you want.
« Last Edit: December 01, 2016, 10:56:51 AM by Frankenpod »
Logged

Offline PaulF

  • Member
  • *
  • Posts: 49
Re: Progress Bar with no bmp
« Reply #4 on: December 01, 2016, 02:37:40 PM »
Frankenpod, your first example worked! :-) Thank you.

* success.jpg (29.68 kB, 486x300 - viewed 211 times.)
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Progress Bar with no bmp
 

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

Page created in 0.066 seconds with 15 queries.