Shoutbox

[help me] multi val not working - 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: [help me] multi val not working (/showthread.php?tid=83990)

[help me] multi val not working by zogo on 05-28-2008 at 04:17 PM

hi i need help with a multi val that switches between a image to replace 637

the two image names are "637.png" and "637b.png" i followed the docs as well as i could but it never worked...

anyone help with the code????

thx :)


RE: [help me] multi val not working by vaccination on 05-28-2008 at 05:49 PM

I'm not sure what you mean, if you want an option to be able to have '637.png' OR '637b.png', then this is what you do:

code:
SkinInfo.xml -
    <Options>
      <Skin>
        <Properties>

              <BoolVal Name="637Option">
                <DispLabel> _text that appears in options panel_ </DispLabel>
                <DispHelp> _hover-over text_ </DispHelp>
                <Default> _default value; either 'true' or 'false'_</Default>
              </BoolVal>

        </Properties>
      </Skin>
    </Options>

^^ This creates an options panel for the skin, and creates a BoolVal(true or false) option.
---

<New>
          <Pictures>

            <Picture Id="59001">
              <File>images/637.png</File>
            </Picture>

            <Picture Id="59002">
              <File>images/637b.png</File>
            </Picture>

          </Pictures>
</New>

^^ This adds the images you've made as new resources


Then, where the 637 image is being replace(style or definition file) you need something like this:
code:
background=rcimg<*PlusSkin Conditions(637Option = false) *> (59001) </*PlusSkin*> <*PlusSkin Conditions(637Option = true) *> (59002) </*PlusSkin*> />

^^ And this changes the value of 'rcimg=' to either '(59001)' or '(59002)' depending on whether the option you set earlier is true or false.


For more information on options and how to use <*PlusSkin*> options, I suggest reading "User Modifiable Options section of the skinning documentation(under Specialized Subjects).
RE: [help me] multi val not working by Willz on 05-29-2008 at 12:43 AM

I think what he is after is being able to change one image depending on what the multi val says. Here is a small example

Multival code for options section:

code:


<MultiVal Name="Button">
                <DispLabel>Pick A button style</DispLabel>
                <DispHelp>My awesomely helpful comment!</DispHelp>
                <Values>
                    <Value DispLabel="Pick Button 1">Button1</Value>
                    <Value DispLabel="Pick Button 1">Button2</Value>
                   
                </Values>
                <Default>Button1</Default>
            </MultiVal>
           




Then what you have to do is create a ResGroup for every single option that is possible to pick for the MultiVal. In this case there is only two.

code:

<ResGroup>
           <Restrictions>
               <MsgVersions>
                   <Version Major="8" Minor="5"/>
               </MsgVersions>
               <SkinOptions>
                   <OptionSet>
                    <Conditions>Button= "Button1" </Conditions>                 
                </OptionSet>
            </SkinOptions>
           </Restrictions>
           <Resources>
               <New>
               <Pictures>
                              <Picture Id="59001">
                                   <File>images/59001_button1.png</File>
                              </Picture>
                        </Pictures>
               </New>
           </Resources>
       </ResGroup>
<ResGroup>
           <Restrictions>
               <MsgVersions>
                   <Version Major="8" Minor="5"/>
               </MsgVersions>
               <SkinOptions>
                   <OptionSet>
                    <Conditions>Button= "Button2" </Conditions>                 
                </OptionSet>
            </SkinOptions>
           </Restrictions>
           <Resources>
               <New>
               <Pictures>
                              <Picture Id="59001">
                                   <File>images/59001_button2.png</File>
                              </Picture>
                        </Pictures>
               </New>
           </Resources>
       </ResGroup>



So as you can see all this does is add resource 59001 depending on what value you have selected in the multival.

If you have a proper options panel then you have to add in a new control that has an Id that matches the MultiVal, also each option has to match the value of each option in the multival.
RE: [help me] multi val not working by zogo on 05-31-2008 at 09:28 PM

willz is right i followed the documentation to the letter but only one image worked...


RE: [help me] multi val not working by Nagamasa on 05-31-2008 at 09:49 PM

Give us more details. (i.e., copy and paste the code here) :P


RE: [help me] multi val not working by blessedguy on 05-31-2008 at 11:05 PM

Some images won't accept that way, sometimes.
Just to know... wich images are failing?


RE: RE: [help me] multi val not working by Willz on 06-01-2008 at 12:57 AM

quote:
Originally posted by blessedguy
Some images won't accept that way, sometimes.
Just to know... wich images are failing?

I have never had any problems with multival and alternate resgroups, in fact thats how the core of my Windows Aero Messenger skin works. So its something that hes doing wrong (and others too if they say not all images work).
RE: [help me] multi val not working by blessedguy on 06-01-2008 at 03:12 PM

I said that sometimes it doesn't work, sort of random bug.
stuartbennet and me, for example, just can't use multivals with minmaxclose buttons or our messengers just won't start up
[and yeah, I know windows aero core is that way... I read your SkinInfo... like I've done with all the others, it's good to see how have people done something, because if he/she used a better method, you can just try to do something like that (not copying, though).]

But if he said all images didn't work, of course there is a problem, but:

quote:
Originally posted by zogo
willz is right i followed the documentation to the letter but only one image worked...


RE: [help me] multi val not working by zogo on 06-05-2008 at 08:49 PM

here is the code for my vista x skin i am updating to enable the title bar bg to be changed i've followed willz coding but it returns to the default banner

code:
<SkinInfo>
    <Information>
        <Name>VISTA X</Name>
        <Description>new to 2 - background chooser, high quality images, new shaded title and much much more!!!</Description>
        <AboutUrl>http://www.pyramid.co.uk.tp</AboutUrl>
        <Version>2.10</Version>
    <Compatibility>
    <MsgVersion Major="8" Minor="5" />
    </Compatibility>
        <Screenshot>
            <File>vista x.png</File>
        </Screenshot>
    </Information>

    <Options><Skin>
        <Properties>
            <BoolVal Name="ChangeBkg">
                <DispLabel>use the vista x background</DispLabel>
                <Default>true</Default>
            </BoolVal>
            <BoolVal Name="titletext">
                <DispLabel>use the vista x 2.0 title</DispLabel>
                <Default>true</Default>
            </BoolVal>


        <MultiVal Name="tbc">
                <DispLabel>title bar colour</DispLabel>
                <DispHelp>just choose a colour</DispHelp>
                <Values>
                    <Value DispLabel="white">white</Value>
                    <Value DispLabel="black">black</Value>
                </Values>
                <Default>black</Default>
            </MultiVal>
        </Properties>
    </Skin></Options>


    <MessengerSkin>
        <ResGroup>
            <Restrictions>
                <MsgVersions>
                    <Version Major="8" Minor="5"/>
                </MsgVersions>
                <SkinOptions>
                  <OptionSet>
                    <BoolVal Name="ChangeBkg">true</BoolVal>
                  </OptionSet>
                </SkinOptions>
            </Restrictions>

            <Resources><Replace>
                <Graphics><Pictures>
                    <Picture Id="20061">
                        <File>20061.jpg</File>
                    </Picture>
                    <Picture Id="59022">
                        <File>20061.jpg</File>
                    </Picture>
                </Pictures></Graphics>
            </Replace></Resources>
        </ResGroup>
        <ResGroup>
            <Restrictions>
                <MsgVersions>
                    <Version Major="8" Minor="5"/>
                </MsgVersions>
                <SkinOptions>
                  <OptionSet>
                    <BoolVal Name="titletext">true</BoolVal>
                  </OptionSet>
                </SkinOptions>
            </Restrictions>

            <Resources><Replace>
                <Graphics><Pictures>
                        <Picture Id="700">
                            <File>700.png</File>
                        </Picture>
                        <Picture Id="701">
                            <File>700.png</File>
                        </Picture>
                        <Picture Id="90">
                            <File>90.png</File>
                        </Picture>
                        <Picture Id="91">
                            <File>90.png</File>
                        </Picture>
                </Pictures></Graphics>
                    <Strings>
                        <String Id="20176">Vista X 2.0</String>
                        <String Id="61143">Vista X 2.0</String>
                    </Strings>
            </Replace></Resources>
        </ResGroup>










<ResGroup>
           <Restrictions>
               <MsgVersions>
                   <Version Major="8" Minor="5"/>
               </MsgVersions>
           </Restrictions>
               <SkinOptions>
                   <OptionSet>
                    <Conditions>tbc= "white" </Conditions>                 
                </OptionSet>
            </SkinOptions>
           <Resources>
               <New>
           <Graphics>
                        <Pictures>
                              <Picture Id="637">
                                   <File>637b.png</File>
                              </Picture>
                        </Pictures>
           </Graphics>
               </New>
           </Resources>
       </ResGroup>
<ResGroup>
           <Restrictions>
               <MsgVersions>
                   <Version Major="8" Minor="5"/>
               </MsgVersions>
           </Restrictions>
               <SkinOptions>
                   <OptionSet>
                    <Conditions>tbc= "black" </Conditions>                 
                </OptionSet>
            </SkinOptions>
           <Resources>
               <New>
           <Graphics>
                       <Pictures>
                              <Picture Id="637">
                                   <File>637.png</File>
                              </Picture>
                        </Pictures>
           </Graphics>
               </New>
           </Resources>
       </ResGroup>












        <ResGroup>
            <Restrictions>
                <MsgVersions>
                        <Version Major="8" Minor="5"/>
        </MsgVersions>
            </Restrictions>
            <Resources>
                <Replace>
                    <Graphics><Pictures>
                        <Picture Id="640">
                            <File>640.png</File>
                        </Picture>
                        <Picture Id="636">
                            <File>636.png</File>
                        </Picture>
                        <Picture Id="1652">
                            <File>1652.png</File>
                        </Picture>
                        <Picture Id="652">
                            <File>652.png</File>
                        </Picture>
                        <Picture Id="1653">
                            <File>652.png</File>
                        </Picture>
                        <Picture Id="20062">
                            <File>652.png</File>
                        </Picture>
                    </Pictures></Graphics>
                </Replace>
            </Resources>

        </ResGroup>
    </MessengerSkin>
</SkinInfo>




i have also a attachment of what it looks like with this code

RE: [help me] multi val not working by Nagamasa on 06-05-2008 at 11:26 PM

<SkinOptions> is located inside <Restrictions>. (the tbc=white one)


RE: [help me] multi val not working by zogo on 06-06-2008 at 07:12 PM

just tryed it - still doesnt work...


RE: [help me] multi val not working by Willz on 06-07-2008 at 12:47 AM

yeah the reason your code is not working is for two reasons.

1: the reason nagamasa kindly pointed out

2: You are using the <New> resource declaration for images that need to be replaced. You are only meant to use <New> for images with id's from 59000-59999. All of WLM's images that you want to replace must use the <Replace> method.

You need to take a bit more care before running to help to us all the time. ;)