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
| | |-+  Drawing Lists Using A Skin Examples?
« previous next »
  • Print
Pages: [1]

Author Topic: Drawing Lists Using A Skin Examples?  (Read 1868 times)

Offline OzzieJacks

  • Member
  • *
  • Posts: 3
Drawing Lists Using A Skin Examples?
« on: February 18, 2012, 04:47:20 AM »
I am trying to write a theme that uses the skin engine to draw its lists (%Lb tags etc) but so far I am not having any luck.  The only documentation I could find on it was here http://www.rockbox.org/wiki/Main/CustomWPS#Drawing_the_lists_using_a_skin and here http://www.rockbox.org/mail/archive/rockbox-dev-archive-2011-07/0020.shtml.  Are there any themes or examples out there that have used this functionality?

If I use the following example from the Custom WPS wiki page I get a segmentation fault.
Code: [Select]
%?cs<%Lb(a,100,20)|> 
%V(0,0,10,-,1)%Vf(aabbcc)
%?LB<%LB(0,0,10,185, invert)>
%Vi(-,10,0,-,-35,1)
%Vl(a,5,5,160,12,1)
%s%?Lc<%Vg(00ffaa, ff0000, 000000)%Vs(gradient)%>%>%>%ac>zzzzzzz %LT zzzzz%s%?Lc<%ar%<%<%<>
%V(0,185,-,-,1)
%s%LT

If I take the %Lb tag out of the conditional the segmentation fault disappears but the code has no effect.

I am using a current Linux SDL build and I have also tried it on a few UISimulators.  I will try to do a 3.10 release build of the SDL tommorow just in case something was broken since the last release.

 
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Drawing Lists Using A Skin Examples?
« Reply #1 on: February 19, 2012, 02:14:34 PM »
I get a segfault too these days with my "demo" skinned list theme. I'm trying to find the bug.

I also want to upload that theme soonish. I finally found a matching font that I can redistribute...
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Drawing Lists Using A Skin Examples?
« Reply #2 on: February 19, 2012, 03:19:51 PM »
OK, the segfaults are gone, but things still don't seem to be working right :(
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Drawing Lists Using A Skin Examples?
« Reply #3 on: February 20, 2012, 12:05:49 AM »
bugger, sorry.
If i don't pass out tonight i'll try to remember to go over skin lists and see what the issue is.

OzzieJacks: If you are interested in skinning jump on IRC and talk to me and [saint]. we need more users playing with skins to find more issues, and especially if oyu want to play with skinned lists
Logged


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

Offline OzzieJacks

  • Member
  • *
  • Posts: 3
Re: Drawing Lists Using A Skin Examples?
« Reply #4 on: February 20, 2012, 11:45:55 AM »
gevaerts, JdGordon: Thanks for looking into the problems with skinned lists.  As you stated they do not segfault with the latest commits but don't seem to display either  :(

Once skinned lists are working will the following code work?
Code: [Select]
# 1024x768 screen
# minimal skinned list with no line selections
%wd
#
%?cs<%Lb(a,800,40)|> #make each list item on the menu screen 800 wide by 40 tall
#
%Vi(-,0,0,-,-,1) #use the full screen for a UI viewport
%Vl(a,0,0,-,-,1) #use the full area of the list item box 800x40
%s%LT            #just display the list item text for each line

I will be happy to join you on IRC and help with testing.
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Drawing Lists Using A Skin Examples?
« Reply #5 on: February 21, 2012, 09:06:59 AM »
I think I've found the remaining bugs.  If you apply http://gerrit.rockbox.org/112 and http://gerrit.rockbox.org/113 things should work fine again. I haven't pushed those to the official tree yet because this is code I'm not too familiar with and I want JdGordon to review them first.

If all goes well, those fixes should be in by sometime tomorrow. When that's done I'll upload some of my skinlist-using themes for the world to look at.
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Drawing Lists Using A Skin Examples?
« Reply #6 on: February 29, 2012, 04:46:07 AM »
OK, I've now uploaded two themes that use skinned lists:

http://themes.rockbox.org/index.php?themeid=1535&target=gigabeatfx
http://themes.rockbox.org/index.php?themeid=1543&target=gigabeatfx

I'm not sure if -,- as width,height will work in list item viewports, it's possible you have to specify the actual size. Apart from that, your code should work I think.
« Last Edit: March 01, 2012, 06:12:11 PM by gevaerts »
Logged

Offline audio-i

  • Artist
  • Member
  • *
  • Posts: 266
Re: Drawing Lists Using A Skin Examples?
« Reply #7 on: March 01, 2012, 12:21:12 PM »
Quote from: gevaerts on February 29, 2012, 04:46:07 AM
OK, I've now uploaded two themes that use skinned lists:

http://themes.rockbox.org/index.php?themeid=1535&target=gigabeatfx
http://themes.rockbox.org/index.php?themeid=1543&target=gigabeatfx
Really cool
« Last Edit: March 01, 2012, 06:12:33 PM by gevaerts »
Logged

Offline OzzieJacks

  • Member
  • *
  • Posts: 3
Re: Drawing Lists Using A Skin Examples?
« Reply #8 on: March 02, 2012, 12:43:58 AM »
Quote from: gevaerts on February 29, 2012, 04:46:07 AM
OK, I've now uploaded two themes that use skinned lists:

http://themes.rockbox.org/index.php?themeid=1535&target=gigabeatfx
http://themes.rockbox.org/index.php?themeid=1543&target=gigabeatfx

I'm not sure if -,- as width,height will work in list item viewports, it's possible you have to specify the actual size. Apart from that, your code should work I think.

Nice themes  :o.  Thanks for the examples and fixes.  It's amazing what can be done with this. 

I just tried a few skinned lists I am working on and it all seems to work except for one Floating point exception I got but I haven't been able to reproduce it.  -,- also seems to work for width, height.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Drawing Lists Using A Skin Examples?
 

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

Page created in 0.08 seconds with 14 queries.