Support and General Use > Theming and Appearance Customization

%cs conditional usage?

(1/1)

jtrodriguez:
Trying to figure out why %cs is working this way... maybe I am just missing something simple but I just don't see it :\

I first wrote this out and it works perfectly fine... but I don't understand why %cs requires ? to display even when not a conditional and why the %?cs conditional is reversed it shows %?cs<false|true> ... I am probably just sleep deprived but if someone can confirm I would appreciate it...


%xl|a|line.bmp|0|0|


###Menu Title###
%V|120|115|80|15|1|55ff00|000000|
%?Lt<%Vdc|%?cs<%xda|%?cs<||%acRecording|%acFM Radio|>>>

%Vl|c|125|115|70|15|1|55ff00|000000|
%?Lt<%s%ac%Lt|>



Here is the same thing cut up into multiple viewports so its easier to read

%xl|a|line.bmp|0|0|

###Menu Title###
%V|120|115|80|15|1|55ff00|000000|
%?Lt<%Vdc|%Vdd>

%Vl|c|125|115|70|15|1|55ff00|000000|
%?Lt<%s%ac%Lt|>

%Vl|d|120|115|80|15|1|55ff00|000000|
%?cs<%xda|%Vde>  ##############<false|true>  ???

%Vl|e|125|115|70|15|1|55ff00|000000|
%?cs<||%acRecording|%acFM Radio|>


The code shows the menu title %Lt in a certain area and if there is no %Lt but a %cs then it displays that and if they are both empty it displays %xda an image.

Edit: This is for the iPod Video

JdGordon:
%cs is for the current screen... it is a list of 4 or 5 options, where are you getting the idea of true/false from?

jtrodriguez:

--- Quote from: JdGordon on April 06, 2010, 06:50:29 AM ---%cs is for the current screen... it is a list of 4 or 5 options, where are you getting the idea of true/false from?

--- End quote ---

I figured it out... what was confusing was %cs requiring a ? %?cs I thought this line was being used as a conditional

%?cs<%xda|%Vde>  ##############<false|true>

but it is just being used as another %cs and listing %xda as the default if nothing else exists for the title that is what was throwing me off.. it works as I wanted it to work just in a way that confused me at first.


So to recap the code:

Calls forth %Lt from %Vdc (Main menu title) if it exists or %?cs from %Vdd if it doesnt
%V|120|115|80|15|1|55ff00|000000|
%?Lt<%Vdc|%Vdd>

Main Menu Title %s Scrolling %ac Centered at 70 pixels wide
%Vl|c|125|115|70|15|1|55ff00|000000|
%?Lt<%s%ac%Lt|>

Calls %xda at 80 pixels wide for anything not unique and passes it to %Vde for the two unique entries under %cs
%Vl|d|120|115|80|15|1|55ff00|000000|
%?cs<%xda|%Vde>  ##############<false|true> ???

Lists the two unique entries Recording/FM Radio at 70 pixels wide
%Vl|e|125|115|70|15|1|55ff00|000000|
%?cs<||%acRecording|%acFM Radio|>


Here is the theme that its for you can see what I am using the %xda for... it closes the line gap if nothing exists
http://forums.rockbox.org/index.php?topic=24413.0

Navigation

[0] Message Index

Go to full version