Support and General Use > Theming and Appearance Customization
Consolidating common theme elements into the SBS Question/Discussion
(1/1)
ew:
Given the fact that a theme can currently consist of 3 significant files (sbs, wps & fms), it seems to make sense to have all common elements in the sbs (outside of the custom viewport area), leaving the wps and fms to draw only things that are inside the custom viewport area. Simple examples are battery, volume, date, repeat/playback and other simple indicators. Now I understand that some themes may not lend themselves to this type of treatment, however there are many that do.
See an example of sharing common areas in the theme (with screen shots) that I posted to the forum here http://forums.rockbox.org/index.php?topic=24894.0
In taking the consolidation approach, I have encountered one area that required more conditional statements than I would have liked (making my sbs quite complicated)
Let me use the theme linked above as an example. Between the bottom two lines, I display basic information about what the dap is doing. In the wps, the playlist name along with track times and counts is displayed. In the fms, station information is displayed. For other screens, it depends what the dap is doing. If music is being played, music information is displayed. If the radio is being played, station information shows. If the dap is stopped, neither shows.
In order to do all of that, I have had to use nested conditionals of the %cs (current screen) and %mp (playback mode) tags. For example, if the current screen is a menu screen, there are a bunch of differences in what is displayed that depend if a file or the radio is being played.
I hope I have expressed the question/dilemma clearly.
Any ideas on how things can be consolidated/simplified? I think the approach of consolidating common areas in the sbs is good, but if my understanding of themeing is correct, the result is not always streamlined (particularly in the case of combination of screen and playback mode data)
Any input would be appreciated.
JdGordon:
yes I agree with you, I havnt had much luck figuring out how a tag should work like this though.
%cs is generally a useless tag and %mp isnt really ideal either.
I'm open to any suggestions...
AsusFreak:
I got the same problem with my AF_Black theme. It's kind of irritating to control display output depending on which screen is selected at the moment. And with the .fms file you have one more source file to have in mind.
One possibility could be to generate sections in the sbs file to separate different screens. Taking a look at XML-structure:
<FMS>
all the code for FM Screen
</FMS>
<WPS>
all the code for WPS Screen
</WPS>
...
At the moment you'll have to take %?cs<|||> in every source line to separate the screens. And this is really uncomfortable.
atsakir:
We could add a set of optional screen and media status tags per viewport to affect viewport visibility like so:
%V(x,y,w,h,font) %Vf(fgcolour) %Vb(bgcolour) %Vs(screen1|screen2|...) %Vm(playbackstatus|..|..)
in addition to %cs and %mp tags
JdGordon:
I dont understand what that is supposed to be?
Navigation
[0] Message Index
Go to full version