Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: Biont on November 11, 2009, 12:27:09 PM

Title: Need help with my WPS :/
Post by: Biont on November 11, 2009, 12:27:09 PM
Hello everyone.

I've been working on my (touch enabled) theme for my Cowon D2 for 2 weeks now and it's getting better and better.

Sadly, I've encountered a weird glitch that clips off about 15px of the album art when playback is paused (which causes an options menu to pop up)

After spending the whole afternoon looking for what causes this, I give up and ask you. I know this one is more complicated than most standard themes, but I can't solve this without help :-\ ???


Here are some instructions about how to use the theme:
http://img134.imageshack.us/img134/9197/fidelity.jpg

and here is the theme itself:
http://www.mediafire.com/download.php?m1l03x2jijk


Any help would be greatly appreciated.  :D


EDIT: This won't work with the D2 simulator found at the extras page since it's outdated. Also the touchscreen mode had to be set to absolute point, of course
Title: Re: Need help with my WPS :/
Post by: moonscapex on November 15, 2009, 07:57:47 PM
Wow, impressive WPS.  Im guessing that when paused, a viewpoint or image is shown that is overlapping with the album art.  Thats all I would think.
Title: Re: Need help with my WPS :/
Post by: Biont on November 16, 2009, 03:32:26 PM
Thank you for your answer, I'm glad you you like the WPS :D.


But If the problem really is an overlapping viewport/image, I haven't been able to find it for a pretty long time now :-\ (Though I admit I haven't looked at the WPS for some days since the screen buffer is full and I can't do anything substantial anymore)

That doesn't neccessarily mean it's not the actual problem, I'm probably just "blind" from looking at my own code for so long.
But I already spend hours looking for that damn overlapping viewport and it's just not there^^

Also, the glitch pretty randomly appears at the top of the screen. I once made a small change to the WPS and then it appeared a few pixels below the options screen, which didn't make any sense at all. From what I learned, it shouldn't behave like that if overlapping viewports are the problem

I'm really out of ideas here.....


Title: Re: Need help with my WPS :/
Post by: Chronon on November 16, 2009, 06:21:34 PM
Can you post a screenshot of the problem?
Title: Re: Need help with my WPS :/
Post by: Biont on November 17, 2009, 09:59:59 AM
Sure.

I also attached a screen of the WPS is playing mode so you can see the exact difference
Title: Re: Need help with my WPS :/
Post by: gevaerts on November 17, 2009, 12:24:57 PM
The album art is shown in viewport c. The options pop-up is shown in viewport d.
Both are shown by %?mp<-|%Vdc|%Vdd|-|-|-|-|-|->, which means that c should be shown while playing, and d while paused. They are not shown anywhere else in the wps.

This means that I think there is indeed a bug, but the result of that bug is not that the AA is clipped while paused, it's that parts of the AA are shown at all.
Title: Re: Need help with my WPS :/
Post by: perfectdrug on November 17, 2009, 01:32:32 PM
a current build simulator shows this behaviour also while seeking.
Title: Re: Need help with my WPS :/
Post by: gevaerts on November 17, 2009, 01:43:14 PM
a current build simulator shows this behaviour also while seeking.

Not surprising. The %?mp line doesn't specify anything for statuses other than play and pause. That means that the same redraw bug occurs (i.e., AA does not get cleared)
Title: Re: Need help with my WPS :/
Post by: JdGordon on November 17, 2009, 02:19:52 PM
I cant see anything obvious in the skins... if I get a chance I'll look at it in the sim tonight... I'm wondering if its a wierd interaction between the wps and sbs though
Title: Re: Need help with my WPS :/
Post by: Biont on November 17, 2009, 02:30:53 PM
This means that I think there is indeed a bug, but the result of that bug is not that the AA is clipped while paused, it's that parts of the AA are shown at all.

Sadly, that's the only way to make the WPS work as intended. I tried to put the AA in the background several times, but then the AA just wouldn't show up at all. Also the touch areas need to be in conditional viewports.

@JdGordon: I also thought this might be the problem, but there are no overlapping viewports there, either. I played around with the UI viewport setting, but it didn't help.
It'd be great if you had a look at it, anyway :)



....I know I'm asking the WPS to do things it's not designed for. I just hope it still can be solved with the WPS code I'm familiar with. If it's a problem with the skin enige itself, I can't do anything (which is very annoying to me)
Title: Re: Need help with my WPS :/
Post by: JdGordon on November 17, 2009, 02:34:32 PM
....I know I'm asking the WPS to do things it's not designed for. I just hope it still can be solved with the WPS code I'm familiar with. If it's a problem with the skin enige itself, I can't do anything (which is very annoying to me)

screw that... this theme is damn impressive and definitely should be working :)  (/me needs to get his touchscreen targets going again)
Title: Re: Need help with my WPS :/
Post by: Biont on November 17, 2009, 02:35:48 PM
Hehe....thanks for the heads up :D
Title: Re: Need help with my WPS :/
Post by: gevaerts on November 17, 2009, 02:43:47 PM
OK, I found the cleared line issue.

The %mp line is wrong. It needs to be
%?mp<|%Vdc|%Vdd||||||>
(these are not "set parameter to default" bits).

That gets rid of the '-' character shown at the beginning of the cleared line.
The cleared line itself is caused by the line ending at the end of the %mp line. One solution for that would be to move the entire %mp line out of any active viewport, e.g. by putting it right at the beginning of the file (I tried just before the %V|8...). I believe you should also be able to do it by placing comment markers at the end of the line to eat the newline character, but I couldn't get that to work.

The AA area is still cleared every time there's a full redraw (after e.g. context menu, quickscreen, backlight off,...) while not in "playing" state. I can't think of a way to fix that right now.
Title: Re: Need help with my WPS :/
Post by: perfectdrug on November 17, 2009, 03:02:27 PM
Cool, can you post an updated version, when it is finished?
I would like to port it to portrait mode for e.g. the mini2440. If I may.
Title: Re: Need help with my WPS :/
Post by: Biont on November 18, 2009, 02:48:04 PM
Thank you so much ;D

Okay now it is fixed

Here is the most recent version (with "custom font" and custom iconset):
http://www.mediafire.com/?zymzymeygmn

I hope there will be a theme site for the D2 soon :)



Also, can I please draw your attention to this thread that was moved to the feature ideas forum that noone reads:
http://forums.rockbox.org/index.php?topic=23083.0

My theme could be so incredibly much more awesome if there were some more tokens to work with


@perfectdrug: Sure! Just mention me somewhere ;)
Title: Re: Need help with my WPS :/
Post by: Domonoky on November 18, 2009, 04:37:08 PM
Quote
I hope there will be a theme site for the D2 soon Smiley

I just added D2 to the theme site. :-)
Title: Re: Need help with my WPS :/
Post by: perfectdrug on November 18, 2009, 09:05:20 PM
@perfectdrug: Sure! Just mention me somewhere ;)
i did it 8)

http://forums.rockbox.org/index.php?topic=6751.msg158326#msg158326

Quote
I hope there will be a theme site for the D2 soon Smiley

I just added D2 to the theme site. :-)


Biont: make sure to read the guidelines first (http://www.rockbox.org/wiki/ThemeGuidelines) you renamed e.g. the font with a fidelity prefix (but I haven't fixed this in my ported version neither) i guess there could be some more issues (I think you also have no filename fallback if the filetags aren't present)

anyway thanks for the cool theme  :)
Title: Re: Need help with my WPS :/
Post by: Biont on November 19, 2009, 08:18:58 AM
@perfectdrug: Sure! Just mention me somewhere
i did it 8)

Wow, good work!


Quote

Biont: make sure to read the guidelines first (http://www.rockbox.org/wiki/ThemeGuidelines) you renamed e.g. the font with a fidelity prefix (but I haven't fixed this in my ported version neither) i guess there could be some more issues (I think you also have no filename fallback if the filetags aren't present)
I read them yesterday evening. Yeah, there's still stuff to do. But I wanted to wait a bit anyway because I'm still working on parts of the theme and don't want to bother the admins with updated versions every 2 days.
For example, I'm thinking of making my very own iconset, not just copied&pasted icons from somewhere else

But what's wrong with the font filename?

Quote
anyway thanks for the cool theme  :)

You're welcome :D Again, I'm glad you (and many others) like it



@gevaerts: Looks like I got my hopes up too soon. Putting the %?mp<|%Vdc|%Vdd||||||> at the top of the theme causes the AA to disappear when changing the volume. I think the 15px clip was the lesser evil.

I'll play around with it some more. Maybe I'll find a solution myself


EDIT: I think it works now. I needed to put in yet another conditional viewport and another mp conditional:

Code: [Select]
%?mp<|%Vdh|%Vdd||||||>

######      Volume change pop up
#
%Vl|h|158|70|60|51|-|-|-|
%?mv1.5<%Vde%Vdf|%Vdg>
%Vl|e|100|60|120|67|-|-|-|
%xdI
%Vl|f|158|70|60|51|-|-|-|
Volume
%ac%pv

%Vl|g|46|0|228|200|-|-|-|

%?mp<|%Vdc|%Vdd||||||>
Title: Re: Need help with my WPS :/
Post by: Biont on November 30, 2009, 03:35:54 PM
I uploaded the theme to the D2 site today, thanks again for your help.

Now I noticed it also shows up for the iPod Video since both have a 320x240 screen.
I don't want to stop iPod users from using my theme (it should work, right?), but I'd say it wouldn't make much sense to use a touchscreen theme on a non-touchscreen device. Maybe someone can do something about it (at least edit the description text) as this is sure to cause some confusion among iPod users
Title: Re: Need help with my WPS :/
Post by: Biont on December 09, 2009, 02:44:36 PM
(@JdGordon)There were some changes in r23904.

Now the theme behaves strange when switching to the main menu and back. The prev/next and volume buttons don't disappear any more when going to the main menu and the song info doesn't appear when going back, as it seems. I guess this is due to those redraw thingies fixed.

Now before I start fixing the WPS code: Is this commit final? Or do you still work on that? I just want to ask because maybe that's unwanted behaviour and I'd be wasting my time trying to fix it.
Title: Re: Need help with my WPS :/
Post by: kugel. on December 09, 2009, 02:52:47 PM
.

Now before I start fixing the WPS code: Is this commit final? Or do you still work on that? I just want to ask because maybe that's unwanted behaviour and I'd be wasting my time trying to fix it.

I wouldn't count on that. You better wait a week or 2 to let things settle a bit.
Title: Re: Need help with my WPS :/
Post by: Biont on December 09, 2009, 03:31:19 PM
Okay...


I was just unsure since I don't know what exactly changed. Maybe this new behaviour is perfectly normal after the changes and I need to adapt to it.
Title: Re: Need help with my WPS :/
Post by: JdGordon on December 09, 2009, 03:33:15 PM
(@JdGordon)There were some changes in r23904.

Now the theme behaves strange when switching to the main menu and back. The prev/next and volume buttons don't disappear any more when going to the main menu and the song info doesn't appear when going back, as it seems. I guess this is due to those redraw thingies fixed.

Now before I start fixing the WPS code: Is this commit final? Or do you still work on that? I just want to ask because maybe that's unwanted behaviour and I'd be wasting my time trying to fix it.

does your theme use the %we or %wd token? (which if yes)
Title: Re: Need help with my WPS :/
Post by: Biont on December 09, 2009, 04:00:34 PM
I use the %we token
Title: Re: Need help with my WPS :/
Post by: JdGordon on December 09, 2009, 04:05:25 PM
yeah, OK, I know whats happening... need do force clear the WPS on exit...
Title: Re: Need help with my WPS :/
Post by: Biont on December 09, 2009, 04:07:08 PM
Okay cool. :)

So there's nothing to change on my side?
Title: Re: Need help with my WPS :/
Post by: JdGordon on December 09, 2009, 04:07:37 PM
nope