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:

Thank You for your continued support and contributions!

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

Author Topic: Conditional Position?  (Read 3154 times)

Offline jtrodriguez

  • Member
  • *
  • Posts: 38
Conditional Position?
« on: April 12, 2010, 03:30:36 PM »
Is it possible to have a viewport displayed in a position based on a conditional... or is it possible to have two viewports for album art... I am trying to get the album art to display in two places conditionally based on hold and play status.
Logged

Offline Ste-

  • Member
  • *
  • Posts: 76
Re: Conditional Position?
« Reply #1 on: April 12, 2010, 04:00:19 PM »
http://www.rockbox.org/wiki/CustomWPS#Conditional_Viewports

Should have the info you need.
Logged
Current Rocbox Devices: iAudio X5 240GB, Toshiba Gigabeat S240, iPod Classic 160GB, iPod Mini 2nd Gen 64GB, iRiver H360, Toshiba Gigabeat F40, iPod Video 30GB, Sansa e280v2, Sansa Fuzev2 8GB, Sansa Clip+ 8GB, Sansa Clip Zip 8GB, Sansa Fuze+ 4GB

Offline jtrodriguez

  • Member
  • *
  • Posts: 38
Re: Conditional Position?
« Reply #2 on: April 12, 2010, 04:21:41 PM »
Quote from: Ste- on April 12, 2010, 04:00:19 PM
http://www.rockbox.org/wiki/CustomWPS#Conditional_Viewports

Should have the info you need.

That is just information on conditional viewports not conditional position... not everything is listed in the wiki is why I am asking and maybe someone knows some trick to get the viewport to shift positions conditionally.

P.S.
It is not possible to have 2 viewports with %C in them only the last one will load that is why I need a way to move that 1 on a condition.
Logged

Offline Ste-

  • Member
  • *
  • Posts: 76
Re: Conditional Position?
« Reply #3 on: April 12, 2010, 04:36:16 PM »
Just define different positions for your conditional Viewports.
Make sure %Cl and %C is in both Conditonal Viewports.
Logged
Current Rocbox Devices: iAudio X5 240GB, Toshiba Gigabeat S240, iPod Classic 160GB, iPod Mini 2nd Gen 64GB, iRiver H360, Toshiba Gigabeat F40, iPod Video 30GB, Sansa e280v2, Sansa Fuzev2 8GB, Sansa Clip+ 8GB, Sansa Clip Zip 8GB, Sansa Fuze+ 4GB

Offline jtrodriguez

  • Member
  • *
  • Posts: 38
Re: Conditional Position?
« Reply #4 on: April 12, 2010, 04:46:19 PM »
Quote from: Ste- on April 12, 2010, 04:36:16 PM
Just define different positions for your conditional Viewports.
Make sure %Cl and %C is in both Conditonal Viewports.

I still only have one of them loading the other is blank :\
Logged

Offline Ste-

  • Member
  • *
  • Posts: 76
Re: Conditional Position?
« Reply #5 on: April 12, 2010, 04:48:54 PM »
Can you post your .wps just copy and put the text in the code box
Code: [Select]
[/ code]
Will have a look then.
Logged
Current Rocbox Devices: iAudio X5 240GB, Toshiba Gigabeat S240, iPod Classic 160GB, iPod Mini 2nd Gen 64GB, iRiver H360, Toshiba Gigabeat F40, iPod Video 30GB, Sansa e280v2, Sansa Fuzev2 8GB, Sansa Clip+ 8GB, Sansa Clip Zip 8GB, Sansa Fuze+ 4GB

Offline jtrodriguez

  • Member
  • *
  • Posts: 38
Re: Conditional Position?
« Reply #6 on: April 12, 2010, 04:56:44 PM »
Code: [Select]
#Platform: iPod Video - Standard Build
#Version 3.0
#Created By: Jeffrey Rodriguez

%wd
%Xd
%xl|a|hdd.bmp|0|0|
%xl|b|hold.bmp|0|0|
%xl|c|battery.bmp|0|0|6|
%xl|d|pbborder.bmp|0|0|
%xl|e|section.bmp|0|0|
%xl|f|option.bmp|0|0|4|
%xl|h|status.bmp|0|0|5|
%xl|i|aa.bmp|0|0|
%xl|j|volume.bmp|0|0|26|



##########Fonts##########

%Fl|2|10-Nimbus.fnt|
%Fl|3|11-Nimbus.fnt|
%Fl|4|12-Nimbus.fnt|
%Fl|5|13-Nimbus.fnt|
%Fl|6|14-Nimbus.fnt|



####Play Status Screen Toggle###

###If you want the playlist removed or shown on hold instead of pause uncomment the proper line and comment out the others.

#%?mh<%?mp<%Vdb%Vdc|%Vdb%Vdc|%Vdb%Vdd|%Vdb%Vdc|%Vdb%Vdc|>|%Vda> ###Playlist On Hold
%?mp<%Vda|%Vda|%?mh<%Vdb%Vdd|%Vdb%Vdc>|%Vda|%Vda|> ###Playlist On Pause
#%?mp<%Vda|%Vda|%Vda|%Vda|%Vda|> ###Playlist Removed

################################



##########Main Viewports##########

###Background###
%Vl|a|0|0|320|240|1|b59e7b|b59e7b|
%Vl|a|0|0|320|20|1|9b886f|9b886f|
%Vl|a|0|195|320|45|1|9b886f|9b886f|

#####Battery######
%Vl|a|272|2|19|15|3|f1f1f1|9b886f|
%?bp<%?bc<%xdcf|%xdcf>|%?bl<|%xdca|%xdcb|%xdcc|%xdcd|%xdce>>
%Vl|a|290|4|30|12|3|f1f1f1|9b886f|
%al%bl%%
##################

#####Time#####
%Vl|a|5|4|60|12|3|f1f1f1|9b886f|
%al%cl:%cM %cp
##############

#####Hard Disk Activity#####
%Vl|a|236|4|12|12|1|f1f1f1|9b886f|
%?lh<%xda|>
############################

#####Hold Switch On/Off#####
%Vl|a|252|4|9|10|1|f1f1f1|9b886f|
%?mh<%xdb|>
############################

#####Album Art#####
%Vl|a|25|55|100|100|1|ffffff|3e352f|
%Vl|a|35|45|100|100|1|ffffff|000000|
%Cl|0|0|l100|b100|
%?C<%C|%xdi>


###################

#####Track Title#####
%Vl|a|145|45|173|14|4|3e352f|b59e7b|
%s%al%?it<%it|%fn>
#####################

#####Artist/Album#####
%Vl|a|145|62|173|25|4|ffffff|b59e7b|
%s%al%?ia<%ia|%d2>
%s%al%?id<%id|%d1>
######################

#####Track Info#####
%Vl|a|145|90|173|20|3|e4e4e4|b59e7b|
%al%sTrack %pp/%pe%?pn< in "%pn">
%al%s%fc %fb kbits/s
####################

####Section Bar#####
%Vl|a|146|121|136|4|1|f1f1f1|b59e7b|
%xde
####################

#####Next Track#####
%Vl|a|145|134|173|30|4|3e352f|b59e7b|
%s%al%?Ia<%Ia|%d2>
%s%al%?It<%It|%d1>
####################

#####Track Time#####
%Vl|a|31|175|36|15|3|ffffff|b59e7b|
%ar%pc
%Vl|a|253|175|36|15|3|ffffff|b59e7b|
%al%pt
####################

#######Play Bar#######
%Vl|a|73|178|174|4|1|f1f1f1|b59e7b|
%pb|pb.bmp|0|0|174|4|

%Vl|a|71|177|178|6|1|f1f1f1|b59e7b|
%xdd
######################

#####Shuffle On/Off#####
%Vl|a|50|210|20|20|1|f1f1f1|9b886f|
%?ps<%xdfb|%xdfa>
########################

#####Repeat Mode#####
%Vl|a|20|208|20|20|1|f1f1f1|9b886f|
%?mm<%xdfc|%xdfd|%xdfd|%xdfd|%xdfd>
#####################

#####Play Status#####
%Vl|a|96|203|129|32|1|f1f1f1|9b886f|
%?mp<%xdha|%xdhb|%xdhc|%xdhd|%xdhe>
#####################

#####Volume#####
%Vl|a|248|213|62|10|1|f1f1f1|9b886f|
%?pv<%xdja|%xdja|%xdjb|%xdjc|%xdjd|%xdje|%xdjf|%xdjg|%xdjh|%xdji|%xdjj|%xdjk|%xdjl|%xdjm|%xdjn|%xdjo|%xdjp|%xdjq|%xdjr|%xdjs|%xdjt|%xdju|%xdjv|%xdjw|%xdjx|%xdjy|%xdjz>
#################

####Volume Label####
%Vl|a|261|225|40|12|2|f1f1f1|9b886f|
Volume
####################



####################################



##########Playlist Viewports##########

###Background###
%Vl|b|0|0|320|240|1|b59e7b|b59e7b|
%Vl|b|0|10|320|90|1|9b886f|9b886f|
%Vl|b|0|220|320|20|1|9b886f|9b886f|

####Playlist Viewer####
%Vl|b|5|120|310|100|4|f1f1f1|b59e7b|
%Vp|1|%pp - %ia - %it|%pp - %fn|
#######################

#####Album Art#####
%Vl|b|5|15|100|100|1|ffffff|3e352f|
%Vl|b|15|5|100|100|1|ffffff|000000|
%Cl|0|0|l100|b100|
%?C<%C|%xdi>

#%?C<%C|%xdi>
###################


###Labels###
%Vl|c|125|20|44|75|4|4e433b|9b886f|
Title
Artist
Album
Year
Genre
Rating
%Vl|c|169|20|8|75|4|4e433b|9b886f|
:
:
:
:
:
:
###########

###Info####
%Vl|c|177|20|138|75|4|f1f1f1|9b886f|
%s%al%it
%s%al%ia
%s%al%id
%s%al%iy
%s%al%ig
%s%al%?rr<Not Rated|1|2|3|4|5|6|7|8|9|10>
##########


###Labels###
%Vl|d|125|20|73|75|4|4e433b|9b886f|
Codec
Bitrate
Frequency
Size
Length
Play Count
%Vl|d|197|20|8|75|4|4e433b|9b886f|
:
:
:
:
:
:
###########

###Info####
%Vl|d|205|20|110|75|4|f1f1f1|9b886f|
%s%al%fc
%s%al%fb kbits/s
%s%al%ff Hz
%s%al%fs kB
%s%al%pt
%s%al%rp
##########


###Bottom Bar###
%Vl|b|5|224|43|12|3|4e433b|9b886f|
%alShuffle
%Vl|b|47|224|3|12|3|4e433b|9b886f|
:
%Vl|b|53|224|18|12|3|f1f1f1|9b886f|
%?ps<On|Off>

%Vl|b|85|224|35|12|3|4e433b|9b886f|
%alRepeat
%Vl|b|123|224|3|12|3|4e433b|9b886f|
:
%Vl|b|129|224|40|12|3|f1f1f1|9b886f|
%?mm<Off|All|One|Shuffle|A-B>

%Vl|b|222|224|66|12|3|4e433b|9b886f|
%alTotal Tracks
%Vl|b|291|224|3|12|3|4e433b|9b886f|
:
%Vl|b|297|224|17|12|3|f1f1f1|9b886f|
%pe
###############


Logged

Offline Ste-

  • Member
  • *
  • Posts: 76
Re: Conditional Position?
« Reply #7 on: April 12, 2010, 05:18:13 PM »
Try firstly taking out the l and b in the %Cl tags you have.
Logged
Current Rocbox Devices: iAudio X5 240GB, Toshiba Gigabeat S240, iPod Classic 160GB, iPod Mini 2nd Gen 64GB, iRiver H360, Toshiba Gigabeat F40, iPod Video 30GB, Sansa e280v2, Sansa Fuzev2 8GB, Sansa Clip+ 8GB, Sansa Clip Zip 8GB, Sansa Fuze+ 4GB

Offline jtrodriguez

  • Member
  • *
  • Posts: 38
Re: Conditional Position?
« Reply #8 on: April 12, 2010, 05:25:42 PM »
Quote from: Ste- on April 12, 2010, 05:18:13 PM
Try firstly taking out the l and b in the %Cl tags you have.


those keep the AA pushed into the bottom corner if it is not square... don't think removing them will change anything

Edit: Tried it and still nothing



Edit: If anyone knows a workaround please tell me this is driving me nuts... don't want to have to rework the layout :\
« Last Edit: April 12, 2010, 08:24:27 PM by jtrodriguez »
Logged

Offline pixelma

  • Rockbox Expert
  • Member
  • *
  • Posts: 645
Re: Conditional Position?
« Reply #9 on: April 13, 2010, 02:02:28 AM »
From what I see after a short look, there are quite a few overlapping viewports that you defined as being displayed at the same time. This is not possible and usually means that these parts of the screen are not updated. E.g.:

Code: [Select]
%Vl|a|0|0|320|240|1|b59e7b|b59e7b|
%Vl|a|0|0|320|20|1|9b886f|9b886f|

The first is taking the complete screen, so every viewport with an "a" identifier will overlap this one. There are probably other examples. What do you want to achieve with this?

Code: [Select]
%Vl|a|25|55|100|100|1|ffffff|3e352f|
%Vl|a|35|45|100|100|1|ffffff|000000|
%Cl|0|0|l100|b100|
%?C<%C|%xdi>

Again these two are overlapping.

One thing about Ste-'s post with the disclaimer that I haven't tried myself with album art just with usual images. Since you use the album art the same in both viewports (same size and position inside it), it shouldn't be necessary to put the %Cl inside each - only the %C needs to be in both, the %Cl above it. The viewport position defines the actual position of the album art on the screen. (works this way with %xl and %xd for me).

Another thing:
Code: [Select]
%Xd
What tag is this?

All in all, this WPS looks very complicated and especially the viewport definitions look like you lost overview at some point in time. I would start with a test WPS that only tries to do what you want to with different album art positions (through conditional viewports) and when you get this working start making the rest of it one by one.
« Last Edit: April 13, 2010, 02:04:26 AM by pixelma »
Logged

Offline jtrodriguez

  • Member
  • *
  • Posts: 38
Re: Conditional Position?
« Reply #10 on: April 13, 2010, 02:22:31 AM »
Quote from: pixelma on April 13, 2010, 02:02:28 AM
From what I see after a short look, there are quite a few overlapping viewports that you defined as being displayed at the same time. This is not possible and usually means that these parts of the screen are not updated. E.g.:

Code: [Select]
%Vl|a|0|0|320|240|1|b59e7b|b59e7b|
%Vl|a|0|0|320|20|1|9b886f|9b886f|
This is intentional... it clears the screen of the B viewports when its switched back to A

Quote from: pixelma on April 13, 2010, 02:02:28 AM
The first is taking the complete screen, so every viewport with an "a" identifier will overlap this one. There are probably other examples. What do you want to achieve with this?

Code: [Select]
%Vl|a|25|55|100|100|1|ffffff|3e352f|
%Vl|a|35|45|100|100|1|ffffff|000000|
%Cl|0|0|l100|b100|
%?C<%C|%xdi>

Again these two are overlapping.

One is a drop shadow effect for the album art the other is the album art

Quote from: pixelma on April 13, 2010, 02:02:28 AM
One thing about Ste-'s post with the disclaimer that I haven't tried myself with album art just with usual images. Since you use the album art the same in both viewports (same size and position inside it), it shouldn't be necessary to put the %Cl inside each - only the %C needs to be in both, the %Cl above it. The viewport position defines the actual position of the album art on the screen. (works this way with %xl and %xd for me).

I have tried both inside out... Have tried them just by themselves and 2 viewports with %C doesnt seem to work the last one in the code displays and the first one is blanked out.

Quote from: pixelma on April 13, 2010, 02:02:28 AM
Another thing:
Code: [Select]
%Xd
What tag is this?

This sets no background image

Quote from: pixelma on April 13, 2010, 02:02:28 AM
All in all, this WPS looks very complicated and especially the viewport definitions look like you lost overview at some point in time. I would start with a test WPS that only tries to do what you want to with different album art positions (through conditional viewports) and when you get this working start making the rest of it one by one.

Everything works exactly as I intend it to just not the album art... I ended up reworking it without the secondary position and it doesn't look nearly as good as with but I will change it if it becomes possible.



Try this and see if it works for you... only the b viewport shows the AA for me :\

Code: [Select]
%Xd
%Cl|0|0|100|100|

%?mh<%Vda|%Vdb> ##Hold Conditional

%Vl|a|0|0|100|100|1|-|-|
%C
%Vl|b|150|0|100|100|1|-|-|
%C
« Last Edit: April 13, 2010, 03:32:53 AM by jtrodriguez »
Logged

Offline Ste-

  • Member
  • *
  • Posts: 76
Re: Conditional Position?
« Reply #11 on: April 13, 2010, 11:39:41 AM »
I was trying similar code today and it seems to be a problem with displaying information using hold as a conditional. As opposed to this users code. Even not using album art it poses a problem.
Logged
Current Rocbox Devices: iAudio X5 240GB, Toshiba Gigabeat S240, iPod Classic 160GB, iPod Mini 2nd Gen 64GB, iRiver H360, Toshiba Gigabeat F40, iPod Video 30GB, Sansa e280v2, Sansa Fuzev2 8GB, Sansa Clip+ 8GB, Sansa Clip Zip 8GB, Sansa Fuze+ 4GB

Offline jtrodriguez

  • Member
  • *
  • Posts: 38
Re: Conditional Position?
« Reply #12 on: April 13, 2010, 12:25:41 PM »
Quote from: Ste- on April 13, 2010, 11:39:41 AM
I was trying similar code today and it seems to be a problem with displaying information using hold as a conditional. As opposed to this users code. Even not using album art it poses a problem.


Was using hold as an example... it doesnt work in any conditional I have tried and it doesn't even work with no conditional... only displaying the last aa in the code.. I am using the current build havnt rolled back my iPod to try it cause the theme also makes use of multi-font.

Edit: just tried the stable build and doesn't work on that for me either

Edit: Here are some screenshots of the theme


The playlist on pause can be switched to hold or removed completely with a couple of #comment/uncommenting edits.. I find it useful on pause becuase I can pause then use the FF and RW buttons to cycle through and look at the details of each song.



Here is the screenshot of the playlist screen with the posted code... it has the basic information listed and the detailed information is shown instead if you switch hold on... it would probably look better if I switched up the colors a bit.



http://themes.rockbox.org/index.php?themeid=715&target=ipodvideo here is the theme download page... if it becomes possible to do so I will update it to the aa on playlist screen look
« Last Edit: April 13, 2010, 10:34:52 PM by jtrodriguez »
Logged

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

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

Page created in 0.079 seconds with 15 queries.