EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   UI Developer Discussion (https://www.eq2interface.com/forums/forumdisplay.php?f=3)
-   -   Distance meter (https://www.eq2interface.com/forums/showthread.php?t=17890)

twistedkilla 09-15-2014 07:04 AM

Distance meter
 
Ok so what I'm trying to do it take the distance from target meter and turn it into a colored progress bar.. Like the health bar when it changes colors... IV tryed all kinda stuff but XML coding is not my thing ... So if someone could tell me how to do this I would greatly appreciate it....ty

Darqwood 09-15-2014 10:17 AM

Quote:

Originally Posted by twistedkilla (Post 105416)
Ok so what I'm trying to do it take the distance from target meter and turn it into a colored progress bar.. Like the health bar when it changes colors... IV tryed all kinda stuff but XML coding is not my thing ... So if someone could tell me how to do this I would greatly appreciate it....ty


Progress bars have a maximum value (maximum health for example) which allows them to display percentages off of that maximum. In the case of distance to your target which is not absolute, you're not going to be able to give it a maximum that makes sense.



.

twistedkilla 09-15-2014 10:55 AM

Quote:

Originally Posted by Darqwood (Post 105417)
Progress bars have a maximum value (maximum health for example) which allows them to display percentages off of that maximum. In the case of distance to your target which is not absolute, you're not going to be able to give it a maximum that makes sense.



.

.



Ok lets say I want to set my max to 50 how would I do it

Darqwood 09-16-2014 08:07 PM

Quote:

Originally Posted by twistedkilla (Post 105418)

Ok lets say I want to set my max to 50 how would I do it



Try this:

Code:

        <Progressbar Location="10,10" Name="DistBar" ScrollExtent="120,12" Size="120,12" Style="/SpecialElements.GreyscaleVitalBar.data.bar.bar_style" />
        <Text DynamicData="/GameData.Target.Distance" Name="Dist_" OnTextChanged="Left=Text" OnMove="
                        Parent.DistBar.Progress=(Left / 50)
                        COND=(Left &gt; 0)&#xD;&#xA; Parent.DistBar.Color=COND ? #FF0000 : Parent.DistBar.Color
                        COND=(Left &gt; 10)&#xD;&#xA;Parent.DistBar.Color=COND ? #FF5500 : Parent.DistBar.Color
                        COND=(Left &gt; 20)&#xD;&#xA;Parent.DistBar.Color=COND ? #FFAA00 : Parent.DistBar.Color
                        COND=(Left &gt; 30)&#xD;&#xA;Parent.DistBar.Color=COND ? #FFFF00 : Parent.DistBar.Color
                        COND=(Left &gt; 40)&#xD;&#xA;Parent.DistBar.Color=COND ? #00FF44 : Parent.DistBar.Color" />


twistedkilla 09-17-2014 09:09 AM

Quote:

Originally Posted by Darqwood (Post 105428)
Try this:

Code:

        <Progressbar Location="10,10" Name="DistBar" ScrollExtent="120,12" Size="120,12" Style="/SpecialElements.GreyscaleVitalBar.data.bar.bar_style" />
        <Text DynamicData="/GameData.Target.Distance" Name="Dist_" OnTextChanged="Left=Text" OnMove="
                        Parent.DistBar.Progress=(Left / 50)
                        COND=(Left &gt; 0)
 Parent.DistBar.Color=COND ? #FF0000 : Parent.DistBar.Color
                        COND=(Left &gt; 10)
Parent.DistBar.Color=COND ? #FF5500 : Parent.DistBar.Color
                        COND=(Left &gt; 20)
Parent.DistBar.Color=COND ? #FFAA00 : Parent.DistBar.Color
                        COND=(Left &gt; 30)
Parent.DistBar.Color=COND ? #FFFF00 : Parent.DistBar.Color
                        COND=(Left &gt; 40)
Parent.DistBar.Color=COND ? #00FF44 : Parent.DistBar.Color" />





DUDE YOUR AWESOME THIS IS WHAT I WAS LOOKING FOR. TY SO MUCH

twistedkilla 09-17-2014 12:00 PM

So This Is The Code When I Was Done

Code:

      <Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#FFFFFF" Location="34,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="1,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#FFFFFF" Location="58,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="1,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#FFFFFF" Location="82,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="1,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#FFFFFF" Location="106,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="1,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
        <Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#000000" Location="33,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="3,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#000000" Location="57,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="3,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#000000" Location="81,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="3,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#000000" Location="105,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="3,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Progressbar Location="10,1" Name="DistBar" ScrollExtent="120,12" Size="120,12" Style="/SpecialElements.GreyscaleVitalBar.data.bar.bar_style" />
        <Text DynamicData="/GameData.Target.Distance" Name="Dist_" OnTextChanged="Left=Text + 1" OnMove="
                        Parent.DistBar.Progress=(Left / 50)
                        COND=(Left &gt; 0)&#xD;&#xA;Parent.DistBar.Color=COND ? #00ff00 : Parent.DistBar.Color
                        COND=(Left &gt; 10)&#xD;&#xA;Parent.DistBar.Color=COND ? #39c700 : Parent.DistBar.Color
                        COND=(Left &gt; 20)&#xD;&#xA;Parent.DistBar.Color=COND ? #728e00 : Parent.DistBar.Color
                        COND=(Left &gt; 30)&#xD;&#xA;Parent.DistBar.Color=COND ? #ab5500 : Parent.DistBar.Color
                        COND=(Left &gt; 40)&#xD;&#xA;Parent.DistBar.Color=COND ? #e41c00 : Parent.DistBar.Color" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#000000" Location="10,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="120,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />


This Is What Looks Like



All times are GMT -5. The time now is 05:03 AM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI