Support and General Use > Theming and Appearance Customization

SKIN BEHAVIOUR CHANGE: draw images when the tag is hit instead of at the end

(1/1)

JdGordon:
Hi all,
I've started a quick patch which changes the draw order of images in the skins and I need help testing.

http://www.rockbox.org/tracker/task/11133

What this does is instead of drawing all images in each viewport at the end of that viewport, each are now drawn when the %xd tag is hit. This should allow you to have text overlap the images, and maybe other fun stuff.

The important thing is that the behaviour changes so some themes might need fixing, I'm curious to know which and how things break.

My goal is to follow the skin file order 100% to give themers complete control how things are drawn.

Yotto:
I created a new simulator using today's build (r24504-100321), and this failed to patch because of a one-space difference between the source and patch. Here's the rej file:

--- Code: ---***************
*** 471,478 ****
          case WPS_TOKEN_ALBUMART_DISPLAY:
              if (!data->albumart)
                  return NULL;
-             if (!data->albumart->draw)
-                 data->albumart->draw = true;
              return NULL;
  #endif
 
--- 471,478 ----
          case WPS_TOKEN_ALBUMART_DISPLAY:
              if (!data->albumart)
                  return NULL;
+             draw_album_art(gwps, playback_current_aa_hid(data->playback_aa_slot),
+                            false);
              return NULL;
  #endif

--- End code ---

I was able to patch manually with no problems.

In trying to test this, I'm having some issues. Using the following code:

--- Code: ---This text should be behind all bitmaps
%x|a|test1.bmp|10|10|
Here's text after the first bitmap
It should be on top of it.
But behind the second bitmap.
Here comes another test bitmap...
%x|b|test2.bmp|50|10|
And this should be on top of everything!

--- End code ---
The following screen is shown on the UNPATCHED daily build:

(Note: This is what you'd expect because the images are loading last)

The following, however, is displayed using your patch (Ignore the status bar, that's not the problem):

(This is not what I'd expect)

Because images are loading in other WPSs (They all look normal), I compared my code to other WPSs. %x, by itself, is never used. So, I preloaded the bitmaps like so:

--- Code: ---This text should be behind all bitmaps
%xl|a|test1.bmp|10|10|
%xda
Here's text after the first bitmap
It should be on top of it.
But behind the second bitmap.
Here comes another test bitmap...
%xl|b|test2.bmp|50|10|
%xdb
And this should be on top of everything!

--- End code ---

And while it worked, it added line breaks that I don't think I can get rid of:

karashata:
I would try moving the image preload tags both to the top of the WPS file and see if that removes the line breaks, if that doesn't do it the next thing would be to move the image display tags to the end of the previous line or the beginning of the next line...

JdGordon:
yeah,which version did you use? %x seems to still have issues. It shold work though  :/

Navigation

[0] Message Index

Go to full version