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
| | |-+  How to simplify? This works in the Simulator but not on my Clip+.
« previous next »
  • Print
Pages: [1]

Author Topic: How to simplify? This works in the Simulator but not on my Clip+.  (Read 2063 times)

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
How to simplify? This works in the Simulator but not on my Clip+.
« on: October 09, 2011, 06:47:50 AM »
Code: [Select]
%ax%Vl(q,53,20,65,10,6)

This is what I want to achieve. This works in the Simulator (haven't tried the Theme Editor), but not on the Clip itself:

Code: [Select]
%?bp<%?bc<%t(2)%acCHARGING;%t(2)%ac%%%bl|%t(2)%acCHARGED;%t(2)%ac%%100>|%?if(%bl,<=,5)<%t(2.0)%acCHARGE;%t(0.5)%acBATTERY;%t(0.5)%acLOW|%t(3.0)%ac%?cu<Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday>;%t(3.0)%ac%ce;%ac%t(3.0)%ac%?cm<January|February|March|April|May|June|July|August|September|October|November|December>>>

This DOES work on the Clip (and of course the Simulator), so it seems that the first is just a tad too much for the Clip itself:

Code: [Select]
%?bp<%?bc<%acCHARGING|%acCHARGED>|%?if(%bl,<=,5)<%t(2.0)%acCHARGE;%t(0.5)%acBATTERY;%t(0.5)%acLOW|%t(3.0)%ac%?cu<Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday>;%t(3.0)%ac%ce;%ac%t(3.0)%ac%?cm<January|February|March|April|May|June|July|August|September|October|November|December>>>

Do you have any suggestions as to how to code this better (the first bit of code)?

I have another challenge:

In the above code, I'm flashing the Day %ce. I'd like to add 'st' as in 1st, 'nd', 'rd or 'th' to this, depending on the number. What would be the easiest way to code this please?

Numbers ending in 'st' 1,21,31
Numbers ending in 'nd' 2 & 22
Numbers ending in 'rd' 3 & 23
Numbers ending in 'th' 4-20 & 24-30   (I think that's right)


PS: Is there a way to get the Forum Screen to fit within my Laptop Screen size, without having to scroll for miles to the right?

Thanks.
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #1 on: October 09, 2011, 08:56:46 AM »
I'm not sure about the first blob but the number ending could be done with some horrible use of %?if..

%?if(%ce, = 1)<st|%?if(%ce, = 21)<st|%?if(%ce, = 31)<st|%?if(%ce, = 2)<nd|%?if(%ce, = 22)<nd|%?if(%ce, = 3)<rd|%?if(%ce, = 23)<rd|th>>>>>>>

although if this is something which would be useful it could be added to the language.

The other thing that I wanted to say was: how do oyu like this sort of tag:
%ll(days, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday)  <- setup a list of strings...
... then use it like this:
%ld(days, %cu) <- i.e display the value of days[%cu]
Logged


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

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #2 on: October 09, 2011, 02:56:20 PM »
Quote from: JdGordon on October 09, 2011, 08:56:46 AM
I'm not sure about the first blob but the number ending could be done with some horrible use of %?if..

%?if(%ce, = 1)<st|%?if(%ce, = 21)<st|%?if(%ce, = 31)<st|%?if(%ce, = 2)<nd|%?if(%ce, = 22)<nd|%?if(%ce, = 3)<rd|%?if(%ce, = 23)<rd|th>>>>>>>

although if this is something which would be useful it could be added to the language.

The other thing that I wanted to say was: how do oyu like this sort of tag:
%ll(days, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday)  <- setup a list of strings...
... then use it like this:
%ld(days, %cu) <- i.e display the value of days[%cu]

That'd be brilliant. So, I gather with something like that, I could do:

%ll(days,1st,2nd,3rd,4th,5th....31st)
%ld(days,%cd)

Would there be any way to be able to make use of Bitmaps with this?
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #3 on: October 09, 2011, 06:32:20 PM »
you can already do that with bitmaps. load a bitmap strip and then do %xd(label, %cd)
Logged


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

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #4 on: November 14, 2011, 06:13:15 AM »
Quote from: JdGordon on October 09, 2011, 08:56:46 AM
I'm not sure about the first blob but the number ending could be done with some horrible use of %?if..

%?if(%ce, = 1)<st|%?if(%ce, = 21)<st|%?if(%ce, = 31)<st|%?if(%ce, = 2)<nd|%?if(%ce, = 22)<nd|%?if(%ce, = 3)<rd|%?if(%ce, = 23)<rd|th>>>>>>>

although if this is something which would be useful it could be added to the language.

The other thing that I wanted to say was: how do oyu like this sort of tag:
%ll(days, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday)  <- setup a list of strings...
... then use it like this:
%ld(days, %cu) <- i.e display the value of days[%cu]

I'm quite happy to add this tag once the major rework patch goes in, just ned to be reminded... maye the weelend
Logged


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

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #5 on: November 14, 2011, 01:49:42 PM »
Great. I'll set a reminder for my Saturday morning.
Logged

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #6 on: November 29, 2011, 06:45:37 PM »
I forgot to remind you.

Do you know if the %ll & %ld will make it into 3.10?
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #7 on: November 29, 2011, 06:49:25 PM »
for sure it wont be in 3.10 as that branch is only for bug fixes now. And it hasnt been done yet so dunno when it will happen :)
Logged


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

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #8 on: November 29, 2011, 08:08:01 PM »
OK. Thanks. And those Skin theme changes? Will they be in the 3.10 build?
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #9 on: November 29, 2011, 08:14:40 PM »
"those" which?
Logged


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

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #10 on: November 30, 2011, 02:49:55 AM »
This:

http://forums.rockbox.org/index.php/topic,29242.15.html

Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #11 on: November 30, 2011, 03:13:08 AM »
nope
Logged


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

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #12 on: November 30, 2011, 03:50:57 AM »
OK. At least I can still play around with the release I have. What are the chances of it being released in the next version?
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #13 on: November 30, 2011, 04:16:50 AM »
releases are "stable" checkpoints we do every couple of months and have no real meaning for users that want the latest stuff. Just use the current build which is rebuilt every checkin and forget about the release
Logged


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

Offline KiwiCam

  • Artist
  • Member
  • *
  • Posts: 92
Re: How to simplify? This works in the Simulator but not on my Clip+.
« Reply #14 on: November 30, 2011, 04:40:59 AM »
Gotcha. I was thinking about posting any themes and that it states that it works with 3.x or whatever. That site figures that out for me anyway, so I realise now that I don't need to worry about that.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  How to simplify? This works in the Simulator but not on my Clip+.
 

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

Page created in 0.068 seconds with 14 queries.