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
| | |-+  %?pv<|.... volume bar not working...
« previous next »
  • Print
Pages: [1]

Author Topic: %?pv<|.... volume bar not working...  (Read 1499 times)

Offline Reece

  • Member
  • *
  • Posts: 101
  • AKA, ZallCaTor
%?pv<|.... volume bar not working...
« on: March 02, 2014, 02:40:55 AM »
Hello. I'm creating a new theme and would like to create a volume bar, but can't.
I am using the fallowing code to create a volume bar.
Note: Its not a slider, I am using a .bmp with 21 "nimages," not one solid bmp that slides around.

Code: [Select]
#volume
%V(167,118,27,54,-)
%?pv<|%xd(Va)|%xd(Vb)|%xd(Vc)|%xd(Vd)>|%xd(Ve)>|%xd(Vf)|%xd(Vg)|%xd(Vh)|%xd(Vi)|%xd(Vj)|%xd(Vk)|%xd(Vl)|%xd(Vm)|%xd(Vn)|%xd(Vo)|%xd(Vp)|%xd(Vq)|%xd(Vr)|%xd(Vs)|%xd(Vt)|%xd(Vu)>

I've scoured the manual and tried to find every little mistake, but turned up empty. Can someone help me?

EDIT: forgot to mention that the bar appears, but it is stuck on the highest setting, as if the volume is turned all the way up. Either that or its stuck all the way down, it all depends on weather or not I made the bmp in the correct order. Just thought that was important.
« Last Edit: March 02, 2014, 02:47:50 AM by Reece »
Logged
Reece, AKA; ZallCaTor
Devices: |Clip+|Fuze V2|

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: %?pv<|.... volume bar not working...
« Reply #1 on: March 02, 2014, 04:20:30 PM »
The syntax looks fine. I may need to see the entire theme before I pass judgement upon it.

Two things, though.

I'm wondering if you're aware of how %pv works regarding the last few slots. I can't see your bitmap, obviously, but I'll just mention that the last few items in %pv are reserved for "...all steps less than 0dB...|0dB exactly|everything greater than 0dB>", so if you have nice linear steps in your bitmap, its going to look weird.

Usually people will double up on the 0dB case bitmap, so isn't an obvious step. But this is at best a workaround and can't compete with a "proper" bar tag in accuracy.

Another thing, have you considered modernizing your syntax?

The old style is quite hard to read at a glance, the newer "%?xx<%xd(identifier, 1)|%xd(identifier, 2)|...>" style is a bit long winded, but it allows the author to make use of descriptive identifiers that actually mean something, removes the need to think about A == 1, B == 2, C == 3, etc., and removes the arbitrary limit on identifier and bitmap counts.

Post your whole theme and we'll have a look.


[Saint]
« Last Edit: March 02, 2014, 04:22:34 PM by [Saint] »
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline Reece

  • Member
  • *
  • Posts: 101
  • AKA, ZallCaTor
Re: %?pv<|.... volume bar not working...
« Reply #2 on: March 02, 2014, 06:01:38 PM »
Ok, note its not complete, here are the files.
 



* Nexus2.sbs (1 kB - downloaded 107 times.)
* Nexus2.wps (0.08 kB - downloaded 109 times.)
Logged
Reece, AKA; ZallCaTor
Devices: |Clip+|Fuze V2|

Offline Reece

  • Member
  • *
  • Posts: 101
  • AKA, ZallCaTor
Re: %?pv<|.... volume bar not working...
« Reply #3 on: March 03, 2014, 03:06:28 AM »
Hay, this happens far too often. But I stumbled on the problem.
There was a ">" in the middle of my syntax line. I removed it and everything is working as it should.
Sorry for the trouble.
Logged
Reece, AKA; ZallCaTor
Devices: |Clip+|Fuze V2|

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: %?pv<|.... volume bar not working...
« Reply #4 on: March 04, 2014, 11:40:08 PM »
d'Oh!

Hahaha...yeah, I missed it too.
I chose to blame this on that impossible to read ancient syntax, not because I'm blind, nope, not at all.

Regarding said syntax, the manual portion for themes is in a state of neglect. Between both the wiki and the manual combined neither actually offers a full/current set of tags.

Ideally this never would have happened, but it did, and while I have every intention of rectifying this finding the time to do so has been a challenge for many years.

My apologies.


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

Offline Reece

  • Member
  • *
  • Posts: 101
  • AKA, ZallCaTor
Re: %?pv<|.... volume bar not working...
« Reply #5 on: March 05, 2014, 03:04:20 AM »
Alright, thanks for the info.
Logged
Reece, AKA; ZallCaTor
Devices: |Clip+|Fuze V2|

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  %?pv<|.... volume bar not working...
 

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

Page created in 0.064 seconds with 14 queries.