|
|
|
|
Rockbox currently has 2 different list implementations, the "classic" list (app/gui/bitmap/list.c) which is drawn directly using code, and skin list (apps/gui/bitmap/skinned-list.c) which uses the skin engine to draw everything.
The ultimate goal is to replace the classic implementation so only the skin engine one needs to exist. This cant happen until it can do everything the classic implementation can do:
Missing list features
Missing skin engine features
Making it happenChild viewportsA major problem with the current skinlist implementation is that it mangles the skin viewport and reimplements skin_render(), This is why the backdrop viewport doesnt work. To deal with this a potential fix is child viewports. Child viewports are simply an ID which can be resized and repositioned at runtime. (the actual implementation would get its own struct viewport so scrolling would work, but images would need to be drawn using the real viewport (I think!).) These child viewports need the following tags:
|[icon][spacing][text ][extra]|where icon, spacing, text and extra are child vp's all glued to each other. icon would be pinned to the outer left edge with a set width, spacing would be pinned to icon with a runtime configured width (I.e list indent width, maybe 0), text is left pinned to spacing and right pinned to extra (where extra is a set width perhaps)... Possible tags:
%V(0,0,100,100,1) # outer viewport %vc(icon) # create a child with id icon %vs(icon, width, 10) # size to 10 pixels, (FIX THIS PART!) %vp(-, left, 0) # the outer viewport should be pinned to the left edge at a distance of 0 %xd(icon,%xx()) # the thing actually in the child viewport %vc(spaceing)%vp(icon,left,0) %vs(spaceing, width, %Li) # set the width to the value of %Li %vc(text)%vp(spacing, left, 0) #new child, pinned to spacing child %vs(-, width, -10) # 10px less than the vp edge ....Obviously the vs and vp tags need more work to make sense and do everything it needs to. New repeater tagsNow, to make the above work we need a few tags to let the skin renderer know to redraw a viewport (real viewport) multiple times. (Tags to be decided)
Skin list tagsFinally new tags will be needed to get the info from the list (or adapted from the current tags)
OtherWill probably need to put this all in a new skin file (so not in the sbs) because it will get too complicated, this means it needs to be made to work in the UI viewport or not (like the wps) -- JonathanGordon - 18 Feb 2013r2 - 19 Feb 2013 - 09:19:46 - JonathanGordon
Copyright © by the contributing authors.
|