[?] RcClr in a Gradient? - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Skinning (/forumdisplay.php?fid=41)
+----- Thread: [?] RcClr in a Gradient? (/showthread.php?tid=80221)
[?] RcClr in a Gradient? by Matti on 12-19-2007 at 01:55 PM
Hey,
I'm currently trying to make some sort of port of Wave11 MSN 7.5 to 8.5 using Plus! Live's brand new skinning system. Now, I haven't skinned for ages and thus I'm still discovering the possibilities of all the new stuff since 7.5. I already managed to do some cool stuff, like porting the minmaxclose buttons and the window title. But now, I stumbled on the gradients used for Wave11 MSN's backgrounds.
As you can see in this screenshot of Wave11 MSN, the contact list MeArea background isn't an image but a gradient. I managed to extract the UIFILEs of Wave11 MSN 7.5 and found those gradients. I then placed them in the right positions of the new UIFILE, removed the references to the images and hurray, I have a beautiful gradient on my contact list just like in Wave11 MSN!
One of the problems with Wave11 MSN was that colorizing wasn't possible. I now want to break this and make use of rcclr() to let Messenger create colors based on the user's selected color and use these in my gradients. I added some new colors using Plus!' Color elements and use the Intensity value for the right color. But it seems like the gradient() thing doesn't accept rcclr()!
code: Snippet from my 923 definition UIFILE
This thing is the title bar's gradient. When I use the normal rgb() colors from Wave11 MSN, this works perfectly. However, when I try to use rcclr()s, it fails.
...
<Element id=atom(vapor)/>
<Element Layout=filllayout()>
<element layoutpos=top layout=gridlayout(1,7) height=30>
<element Background=rcclr(59900)/> //This is line 31
<element Background=Gradient(rcclr(59900), rcclr(59901), 0)/> //This is line 32
<element Background=Gradient(rcclr(59901), rcclr(59902), 0)/>
<element Background=rcclr(59902)/>
<element Background=Gradient(rcclr(59902), rcclr(59901), 0)/>
<element Background=Gradient(rcclr(59901), rcclr(59900), 0)/>
<element Background=rcclr(59900)/>
</element>
<Element layout=borderlayout()>
<Element layoutpos=top Layout=borderlayout() id=atom(MWWindowBar)>
...
When I try to start the skin with this and open the contact list, Skin Trace outputs this:
code: 07/12/19 14:36:15| **** The trace has started ****
07/12/19 14:36:15| Skin: Wave11 WLM 0.1
07/12/19 14:36:15| Messenger version: 8.5.1302.1018 (nl-nl)
07/12/19 14:36:15| Messenger Plus! version: 4.50.312
07/12/19 14:36:15| Last definition file loaded: 923
07/12/19 14:36:15| DUIParserFailure: parse error 'rcclr' 32
What do you think? Is this a limitation and will I have to simply use themes in the Skin Options, or would it be possible to actually use "colorized colors" for gradients?
Note: I'm currently just experimenting with the skinning system and am not yet planning to release a Wave11 WLM. If I'd want to release this, I'll first ask permission to the creators (theunknown and Fizical) if they're OK with this. So don't blame me from stealing skins, because this is only for private use at the moment!
RE: [?] RcClr in a Gradient? by davidpolitis on 12-19-2007 at 10:37 PM
The colors you're trying to use with rcclr do not exist in msgres_colors.txt... correct me if I'm wrong.
EDIT: Sorry, you did create new ones. This may help. Also, maybe you can try using the colors in msgres_colors.txt just to test that it's not your UIFile code that's faulty.
RE: [?] RcClr in a Gradient? by freak544 on 12-19-2007 at 10:46 PM
You are correct the highest value in the msgres_colors.txt file is 46604=rgb(152,151,139)
mattike you areusing numers like 59900 unless the numers are coming from somewhere else?
RE: [?] RcClr in a Gradient? by TheSteve on 12-20-2007 at 12:39 AM
In theory, the highest number usable is 65535 as this is the limit for the microsoft resource format.
Unfortunately, it appears that the gradient function does not support embedded rcclr calls. Because of this, you can't make a colorizable gradient. If you can add or replace a current color, (which last I heard wasn't supported), the binary format for such a gradient would be as follows:
(each <> part is one byte)
HC<rr><gg><bb><aa>C<rr><gg><bb><aa>
The H stands for horizontal gradient, (you'd use V if you wanted a vertical gradient)
C is a colorizable color. (as opposed to D for a normal color)
then the rr, gg, bb and aa parts are the desired colors and alpha in the gradient parts. (you'll want the alpha to be 255 (0xFF) most of the time)
RE: [?] RcClr in a Gradient? by Matti on 12-20-2007 at 09:24 AM
Hmm... so I understand that rcclr()s in a gradient() are a no-go, right?
Okay then, now I have two choices then:
- Use skin options to have multiple themes (like in the original Wave11 MSN and like Ev0 3 does now)
- Make an image from the gradient (with dimensions somewhere at 1000x1) and use that instead, so that the gradient image can be colorized after all.
What would be your choice?
RE: [?] RcClr in a Gradient? by TheSteve on 12-20-2007 at 09:44 AM
I'd pick option number 3
- Wait until Patchou adds in color replacement
RE: [?] RcClr in a Gradient? by Matti on 12-20-2007 at 10:05 AM
quote: Originally posted by TheSteve
I'd pick option number 3
- Wait until Patchou adds in color replacement
Heh... well yes, that could be another method indeed. I think I'll go for method 1 at the moment, that'll give me the opportunity to work with Skin Options too!
RE: [?] RcClr in a Gradient? by Willz on 12-20-2007 at 10:39 AM
but there already is color replacement
I'm not sure if it can replace gradients
but there definitely is just color replacements
code: <Replace>
<Colors>
<Color Id="#">
<R>0</R>
<G>0</G>
<B>0</B>
<A>255</A>
</Color>
</Colors>
</Replace>
or for colorized colors
code: <Replace>
<Colors>
<Color Id="#">
<I>100</I>
<A>255</A>
</Color>
</Colors>
</Replace>
RE: [?] RcClr in a Gradient? by Patchou on 12-20-2007 at 05:48 PM
59000+ resource IDs are the ones reserved for Plus! new colors (as Willz just pointed out). Unfotunately, if rcclr() aren't accepted for the Gradient calls, they probably won't be of any use in this case.
Secondary colorization is on the lost of ideas for the next update, it will probably be done if it has some use such as this.
RE: RE: [?] RcClr in a Gradient? by TheSteve on 12-21-2007 at 12:49 AM
quote: Originally posted by Willz
but there already is color replacement
I'm not sure if it can replace gradients
I meant replacement for the actual color resources or the addition of colorized gradients to the XML. I am not 100% sure about WLM 9.0, but WLM 8.5 does support colorized gradients when the previously mentioned resource format is used. It appears that 9 is using a more complicated system which may still support this format but I have not yet tested it.
|