Quantcast Distance meter - EQ2Interface
EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 09-15-2014, 07:04 AM
twistedkilla twistedkilla is offline
A Young Mystail Rat
 
Join Date: Sep 2014
Server: Unkown
Posts: 4
Default 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
Reply With Quote
  #2  
Unread 09-15-2014, 10:17 AM
Darqwood's Avatar
Darqwood Darqwood is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Aug 2005
Server: Antonia Bayle
Posts: 297
Default

Quote:
Originally Posted by twistedkilla View Post
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.



.
Reply With Quote
  #3  
Unread 09-15-2014, 10:55 AM
twistedkilla twistedkilla is offline
A Young Mystail Rat
 
Join Date: Sep 2014
Server: Unkown
Posts: 4
Default

Quote:
Originally Posted by Darqwood View Post
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
Reply With Quote
  #4  
Unread 09-16-2014, 08:07 PM
Darqwood's Avatar
Darqwood Darqwood is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Aug 2005
Server: Antonia Bayle
Posts: 297
Default

Quote:
Originally Posted by twistedkilla View Post

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" />
Reply With Quote
  #5  
Unread 09-17-2014, 09:09 AM
twistedkilla twistedkilla is offline
A Young Mystail Rat
 
Join Date: Sep 2014
Server: Unkown
Posts: 4
Thumbs Up

Quote:
Originally Posted by Darqwood View Post
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
Reply With Quote
  #6  
Unread 09-17-2014, 12:00 PM
twistedkilla twistedkilla is offline
A Young Mystail Rat
 
Join Date: Sep 2014
Server: Unkown
Posts: 4
Default

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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:36 PM.


Our Network
EQInterface | EQ2Interface | War.MMOUI | WoWInterface | VGInterface | LoTROInterface | MMOInterface