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
| | |-+  Using Viewports with Alternating lines
« previous next »
  • Print
Pages: [1]

Author Topic: Using Viewports with Alternating lines  (Read 2121 times)

Offline robin0800

  • Member
  • *
  • Posts: 291
  • Freeman
Using Viewports with Alternating lines
« on: November 03, 2010, 05:53:46 PM »
%?C<%t(10)%Vd(a)%Vd(c)|%t(5)%Vd(b)%Vd(c)>;%t(10)%Vd(d)

This code snippet is from from the MaximumArt Theme for the C200.
It  does not now work, it appears the alternate line mechanism can't now parse viewports.
Is this  correct?


Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Using Viewports with Alternating lines
« Reply #1 on: November 03, 2010, 06:10:48 PM »
doesnt work how? it should work and was only a week or two ago.
Logged


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

Offline robin0800

  • Member
  • *
  • Posts: 291
  • Freeman
Re: Using Viewports with Alternating lines
« Reply #2 on: November 03, 2010, 06:18:00 PM »
It appears to parse the first term correctly but the second term is then put over the top and the alternating function then just stops so nothing gets updated.
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Using Viewports with Alternating lines
« Reply #3 on: November 03, 2010, 06:51:32 PM »
Upload the wheole zip
Logged


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

Offline robin0800

  • Member
  • *
  • Posts: 291
  • Freeman
Re: Using Viewports with Alternating lines
« Reply #4 on: November 03, 2010, 07:37:30 PM »
Rename txt to zip to use

This is also available on the themes Site

SOAP EDIT:  Removed attachment.
« Last Edit: November 07, 2010, 08:30:55 AM by soap »
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Using Viewports with Alternating lines
« Reply #5 on: November 03, 2010, 07:40:59 PM »
file is corrupt.. link to the theme site
Logged


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

Offline robin0800

  • Member
  • *
  • Posts: 291
  • Freeman
Re: Using Viewports with Alternating lines
« Reply #6 on: November 03, 2010, 07:52:39 PM »
http://themes.rockbox.org/index.php?themeid=240&target=sansac200

this should be ok
« Last Edit: November 03, 2010, 07:54:47 PM by robin0800 »
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Using Viewports with Alternating lines
« Reply #7 on: November 07, 2010, 02:34:29 AM »
Quote from: robin0800 on November 03, 2010, 05:53:46 PM
%?C<%t(10)%Vd(a)%Vd(c)|%t(5)%Vd(b)%Vd(c)>;%t(10)%Vd(d)

It's not going to magically fix it, but I just noticed that displaying viewport c for both the true and false conditions is less than pointless.

If it's going to be displayed all the time, it needn't be in any form of condition at all.



[St.]




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

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: Using Viewports with Alternating lines
« Reply #8 on: November 07, 2010, 08:30:09 AM »
Quote from: robin0800 on November 03, 2010, 07:37:30 PM
Rename txt to zip to use

This is also available on the themes Site
The reason .zip files (and others) are not accepted by the forum software is because they clog up the forum software.
Please do not attempt to bypass this by renaming files.
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline audio-i

  • Artist
  • Member
  • *
  • Posts: 266
Re: Using Viewports with Alternating lines
« Reply #9 on: November 07, 2010, 10:15:29 AM »
Quote from: [St.] on November 07, 2010, 02:34:29 AM
Quote from: robin0800 on November 03, 2010, 05:53:46 PM
%?C<%t(10)%Vd(a)%Vd(c)|%t(5)%Vd(b)%Vd(c)>;%t(10)%Vd(d)

It's not going to magically fix it, but I just noticed that displaying viewport c for both the true and false conditions is less than pointless.

If it's going to be displayed all the time, it needn't be in any form of condition at all.



[St.]





The last alternating subline doesn't display viewport c.

What's complicated about the way it's done (in order to write the wps code differently) is that the AA present and no AA present sequence times are different. And even with a work around for this problem, the theme seems to show other problems under the current parser, that do not break the theme but that makes it behave weird
« Last Edit: November 07, 2010, 11:09:05 AM by audio-i »
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Using Viewports with Alternating lines
« Reply #10 on: November 07, 2010, 05:58:41 PM »
There's different ways to do this though, I'm not sure why you can't see that viewport c is true all of the time and will be constantly displayed but just drawn over by whatever is in viewport d.

This can, and should be avoided to prevent update issues.

You should really have separate %?C<|> statements inside viewports a and b

I'll need to look at the code to make sure that's correct though.



[St.]
« Last Edit: November 07, 2010, 06:03:47 PM by [St.] »
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline audio-i

  • Artist
  • Member
  • *
  • Posts: 266
Re: Using Viewports with Alternating lines
« Reply #11 on: November 07, 2010, 06:15:40 PM »
Quote from: [St.] on November 07, 2010, 05:58:41 PM
I'm not sure why you can't see that viewport c is true all of the time and will be constantly displayed but just drawn over by whatever is in viewport d.

Quote
%?C<%t(10)%Vd(a)%Vd(c)|%t(5)%Vd(b)%Vd(c)>;%t(10)%Vd(d)

Viewport d is in an alternating subline sequence, preceded by ";" and "%t(10)". I think the theme author's intention is:

AA present: display 10 secs viewports a and c, display 10 secs viewport d

AA not present: display 5 secs viewports d and c, display 10 secs viewport d
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Using Viewports with Alternating lines
« Reply #12 on: November 07, 2010, 06:30:51 PM »
Quote from: audio-i on November 07, 2010, 06:15:40 PM
Viewport d is in an alternating subline sequence, preceded by ";" and "%t(10)". I think the theme author's intention is:

AA present: display 10 secs viewports a and c, display 10 secs viewport d

AA not present: display 5 secs viewports d and c, display 10 secs viewport d

I can see that, but what *really* happens is that viewport c is drawn 100% of the time, and viewport d I assume covers it up.

If none of those viewports a, b or d are supposed to cover up c either in part or in full, then there's no point in c being in a conditional statement at all...which is why I assume the intent is to cover the viewport from view instead of simply not displaying it in the time that it's not needed.

Probably written when viewports weren't cleared correctly.

I guess I'll need to look at the code if I want to show a way this can be done with conditional statements that work.


EDIT:

Argh! Right...the penny dropped with me, yes...it is on a conditional subline but I'm not sure it it will be being cleared properly or not?

I'll try map out the way I'd do it if I get a chance to later on.

I'm hoping it'll be easier to understand, and even work if I'm lucky, once I get to looking at the code finally.

[St.]
« Last Edit: November 07, 2010, 09:14:23 PM by [St.] »
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline robin0800

  • Member
  • *
  • Posts: 291
  • Freeman
Re: Using Viewports with Alternating lines
« Reply #13 on: November 07, 2010, 10:35:48 PM »
audio-i is correct this is what I wanted and used to work.

Note to St
viewport "a" draws album art viewport "b" draws no album art in the same viewport
Viewport "c" draws all the rest of the viewports for that screen.
Viewport "d" should draw different viewports on a new screen


Edit

Can someone confirm whether the alternate line problem is a bug? if so I will post it as such.
« Last Edit: November 15, 2010, 07:29:00 PM by robin0800 »
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Using Viewports with Alternating lines
 

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

Page created in 0.096 seconds with 14 queries.