This image is the top of the content box. Unfortunately, there is no information-based reason for this div to be here. It's just here for design reasons. Sorry.
Go Back   MisticRiver :: For iriver Enthusiasts > All things Rockbox > ROCKbox Forums > ROCKbox for H3xx Series
Home Forums Register FAQ Search Today's Posts Mark Forums Read


Welcome to the misticriver forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old December 2nd, 2006, 10:28 AM
Hoping For A Cool Title
 
Join Date: Nov 2005
Posts: 84
Displaying text at X and Y coordinates

I really just want to know if this is possible. I could not find instructions to do this anywhere on the Rockbox web site, so I have resorted to using the spacebar and return key to place all the text. However, there is one place in my WPS that needs to be at an exact Y coordinate.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old December 2nd, 2006, 12:02 PM
Eager Mistic Beaver
 
Join Date: Apr 2005
Posts: 226
Yes, there is a way.

Goodness man, resorting to using the spacebar?!?!? Geez, what patience...

Anyway, I will give you an example from my "oranges WPS":
%e|104|12|100|4|000000 |%s%ac%?ia<%ia|%?d2<% d2|Artist Unknown>>

The example of WPS code above displays artist info.
Now, here is the breakdown on text placement (the bold part above):

%e|x-position|y-position|pixels or distance to be used after the x-position|font to be used|font color|

Concerning the first slot, or "x-position": Self-explanatory. X-coordinate starting point of text to be displayed. In our example, the "104" means text starts 104 pixels counting from the left of the screen (the screen is 220x176).

Example:
%e|104|12|100|4|000000|%s% ac%?ia<%ia|%?d2<%d2| Artist Unknown>>

Concerning the second slot, or "y-position": Self-explanatory. Y-coordinate position of text to be displayed. In our example, the "12" means text starts 12 pixels counting down the top of the screen (the screen is 220x176).

Example:
%e|104|12|100|4|000000|%s%ac% ?ia<%ia|%?d2<%d2|Art ist Unknown>>

Concerning the third slot, or the "pixels to be used after the x-postion": you can't write the direct x-coordinate where you want text to end, instead, you must tell the wps how much room to reserve past the starting x-position. In our example above, the text starts at x-position "104" with y-position "12." I wanted the text to end at x-position "204," so 204 minus 104 equals 100 pixels. Hence, the 3rd slot tells the WPS to use "100" pixels of distance after the starting point.

Example:
%e|104|12|100|4|000000|%s%ac%?ia< %ia|%?d2<%d2|Artist Unknown>>

THE FOLLOWING OPTION IS FOR MULTIFONT BUILDS ONLY! Such as Ashen's multi-font build, for example.
Concerning the fourth slot, or the "font to be used": This tells the WPS which font to use in that given line. In the example, we see the number "4" right? Well, that "4" is telling Rockbox to look up "userfont 4" in the corresponding "themes" file.

My themes file looks like this:
# Screaming Orange theme for Screaming Oranges Inskin
# Idea suggested by grantman54, design by alejandro
# Requires lots of patches!
#
backdrop: /.rockbox/backdrops/orange.bmp
#
wps: /.rockbox/wps/oranges.wps
#
#
font: /.rockbox/fonts/snap.fnt
userfont2: /.rockbox/fonts/nedore-9.fnt
userfont3: /.rockbox/fonts/nimbus-12.fnt
userfont4: /.rockbox/fonts/helvB12.fnt
userfont5: /.rockbox/fonts/helvR10.fnt
userfont6: /.rockbox/fonts/helvR8.fnt
menufont: /.rockbox/fonts/snap.fnt
browserfont: /.rockbox/fonts/snap.fnt
recordont: /.rockbox/fonts/snap.fnt
tunerfont: /.rockbox/fonts/snap.fnt
#
foreground color: 000000
background color: ff00ff

See where it says "userfont4: /.rockbox/fonts/helvB12.fnt"? That is what the WPS is pointing to in the fourth slot! Here is the example line of code so you can see what I mean:

Example
%e|104|12|100|4|000000|%s%ac%?ia<%i a|%?d2<%d2|Artist

Thus, if I were to change the above bold "4" to "2," I'd be using the nedore-9 font as opposed to the helvB12 font because my "WPS" file is reading the corresponding userfont in the "themes" file.

Concerning the fifth slot, or "font color": Finally, we have the fifth slot, which shows "000000" as you can see. This basically is the color of the font. In this case, "000000" means black. Thus, you can essentially use different colors for each line of text you display if you wish to do so.

Example:
%e|104|12|100|4|000000|%s%ac%?ia<%ia|%?d2< %d2|Artist Unknown>>

It took me a couple of days to figure all this out on my own, just like you are trying to do. I figured I'd save you the trouble.

Hope this clarifies everything.

Edit: seems that x-y positioning is not standard on all builds. =(

Last edited by alejandro : December 2nd, 2006 at 08:11 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old December 2nd, 2006, 12:23 PM
Eager Mistic Beaver
 
Join Date: Apr 2005
Posts: 272
just wanted to give props to alejandro. HE IS VERY NEW at rockbox, at making wpss, and he already understands it completely and is teaching others. This is why I love mistic river
__________________
H320: 18 movies | 24 music videos | 3400 songs | 400 pictures |RockBox Optimized, 1.29 K | Screaming Oranges Inskin | 60+ Gameboy games | EP630s earbuds | Altec Lansing portable speakers|
ALL THANX TO MISTICRIVER my only resouce!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old December 2nd, 2006, 01:32 PM
Hoping For A Cool Title
 
Join Date: Nov 2005
Posts: 84
Thank you, but it's not working for me... was it added to the CVS after Oct. 30? Or is it in a patch not included in the 10/30 norbu build (which is what I am using)?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old December 2nd, 2006, 02:04 PM
Denny's Avatar
mistic mad scientist
 
Join Date: Jan 2005
Location: UK - Newcastle
Posts: 1,134
The tutorial alejandro gave, while very good, is only for builds that support multifonts and x/y positioning. ie. those created for the jclix themes.

When making CVS compatible wps's the only way to place text is by lines and with the space bar at present .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old December 2nd, 2006, 08:07 PM
Eager Mistic Beaver
 
Join Date: Apr 2005
Posts: 226
Hmmm, I didn't know the x-y positioning was limited to certain builds only. I knew that multifont support was scarce, but I thought something as crucial as x-y coordinating was standard across builds.

I guess I got lucky when I based my 1st wps on Ashen's multifont build.

Oh well...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old December 3rd, 2006, 06:45 AM
Denny's Avatar
mistic mad scientist
 
Join Date: Jan 2005
Location: UK - Newcastle
Posts: 1,134
Yeah, its been something needed for a while and i think it was on the targets for the proposed November release (now void). Just hasn't been updated from using the small archos screens that only use a few lines.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old December 31st, 2006, 07:40 PM
Mistic Surveyor
 
Join Date: Nov 2005
Location: Karlsruhe, Germany
Posts: 139
Send a message via ICQ to da vinci
The devs are working on such feature which allows to position every element of a WPS. I think this is one (or even THE) of the reasons why we still don't have RB 3.0.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old January 1st, 2007, 07:03 AM
Mistical Abstract
 
Join Date: Aug 2006
Posts: 675
%e|104|12|100|4|000000| <- customline + multifont + userfonts patch
__________________
www.handmadematters. tk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 08:04 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
This image is the bottom of the content box. Unfortunately, there is no information-based reason for this div to be here. It's just here for design reasons. Sorry.