This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12124 - draw lists using skin engine
Attached to Project:
Rockbox
Opened by Jonathan Gordon (jdgordon) - Sunday, 22 May 2011, 13:43 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Tuesday, 06 September 2011, 16:14 GMT+2
Opened by Jonathan Gordon (jdgordon) - Sunday, 22 May 2011, 13:43 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Tuesday, 06 September 2011, 16:14 GMT+2
|
DetailsThis patch allows themers to draw the list items using the skin engine. This first version is proof-of-concept and not entirely usable just yet.
Added tags to make it work: %Lb(viewport label, x, y, width, height) - specify the viewport label to draw for each item in the list. x,y,width,height is the box to draw it in. x,y is offset from the UI viewport %LT - the text for the list item to be displayed in the viewport %Lc - "is this item the selected item?" - use as a conditional Every viewport with the given label will be drawn in the viewport box specified in the %Lb() tag, this should allow you to do pixel accurate item placement (for the items icon/text/etc). The UI viewport is used and as many items as fit will be drawn. example sbs.... =======%======== %Lb(a,0,0,100,20) %Vi(-,0,0,-,-35,1) %Vl(a,5,5,-,12,1) %?Lc<%>%>%>>%ac%LT =======%======== Next steps: * Add support tags to make this more usable: need a tag for the scrollbar, colour/gradient filling for viewports, etc * Add option to tile the viewports instead of displaying them in the traditional list (for touch themes!) * Add a second viewport config to display a different viewport for the selected item (which would allow scrolling in that one viewport) * ? ------- I havnt tested this yet but *I THINK* the skin engine will allow this to show different styled lists using the usual conditional system (i.e putting more than one %Lb() tag in conditionals using *different* viewport labels, as long as only one is displayed at any one time). someone test this! |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Tuesday, 06 September 2011, 16:14 GMT+2
Reason for closing: Accepted
Additional comments about closing: in r30461
Tuesday, 06 September 2011, 16:14 GMT+2
Reason for closing: Accepted
Additional comments about closing: in r30461
Also changes %Lb() to only need the viewport label and width/height, x,y arent needed (so %Lb(a,100,100))
edit: attaching my test .sbs also
edit2: updated diff to not crash if you try putting %Lb in a conditional (which works)
Add %LI to get the items icon
just about ready to commit this i think. Ideally I'd like to make the scrollbar work also but I tihnk that isnt a showstopper