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:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  %cs conditional usage?
« previous next »
  • Print
Pages: [1]

Author Topic: %cs conditional usage?  (Read 1243 times)

Offline jtrodriguez

  • Member
  • *
  • Posts: 38
%cs conditional usage?
« on: April 05, 2010, 03:41:44 PM »
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
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: %cs conditional usage?
« Reply #1 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?
Logged


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

Offline jtrodriguez

  • Member
  • *
  • Posts: 38
Re: %cs conditional usage?
« Reply #2 on: April 06, 2010, 08:50:55 AM »
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?

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
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  %cs conditional usage?
 

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

Page created in 0.063 seconds with 15 queries.