Ill try to explain it simpler and in different language (maybe something was lost in translation, and 2 references can get you through). Pixels are read from left to right, top to bottom. Pixel 0 is the first pixel. the first row of pixels isnt displayed at all (if the color for the first 2 pixels is R=65, G=78, B=77, and R=66, G=84, B=78 ) It is there to store data... since you can't reliably attach text to an image file
The 3rd pixel contains 2 bits of information; - the number of rows to exclude from the image (if for some strange reason you need more than 1 row, which is unlikely, since most buttons should be at least 20 pixels wide... - the number of frames the image has (in the case of the tutorial it is 12) This means that the color of the 3rd pixel should be R=1 G=(Doesn't matter?/0) B=12
*It should be noted here that the images height minus the Red value in the 3rd pixel; should be divisible by the Blue value of the 3rd pixel.. So in the case of the tutorial, a height of 1201 is good because (1201-1)/12 is a whole number... which leaves 12 frames 100 pixels tall
the 4th pixel tells classic shell how many frames are in the normal state (when the buttons sitting there all on its own) So if its color was R=0, G=0, B=3 The first 3 frames would be reserved for the 'normal' animation (However, in the current version of classic shell, the normal state won't be animated, and I assume just the first frame will show? This is because it would take constant CPU usage to animate it all the time. Also It would likely be distracting.)
The 5th pixel defines the frames played when the mouse hovers over the icon. the animation is played from top frame to bottom, and in the tutorials case it will play frames 2-11 freezing on the 11th frame In the example it would read: R=0, G=0, B=2
The 6th pixel defines the frames that represent the pressed state (after the button is clicked) In the example it would be as follows:R=0, G=0, B=12
This would tell classic shell that the pressed state starts with the 12th frame, and goes to the last frame in the image where it freezes (which in the example is also the 12th frame) (Classic shell does not support animation of the pressed state, for some reason I can't understand, because the menu could still pop up right away, without waiting on the animation to finish, so the responsiveness excuse is void in my opinion)
Transitions define the animation itself..
The 7th pixel tells Classic shell 3 pieces of data (from left to right) for the first transition (normal to hover); Blend: The Red value for the 7th pixel should either be 0 or 1 (1 is the recommended default) Range: This is the green value of the 7th pixel and can allow for more complicated animations to be defined... (Its probably best to leave this at G=1 for now) Duration: the TOTAL time the animation will last (which will be divided among the frames that play, as defined by the next pixel(s)
The 8th pixel in the example, reads: R=10, G=(Doesn't matter/0), B=0 This says that the animation starts on the first frame (B=0), and ends on the 10th(R=10) If you were to write: R=0, G=(Doesn't matter/0), B=10 Then it would start on the 10th frame, and run backwards to the 0 frame.
Hopefully that helped...
|