Ok - no not a modification of a default window, so no need to rename.
The Text object is a sibling of the progress bar (sorry, my indentations were not
correct)
Here is the full code for the xml file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Page eq2usescomwndcontrols="true" MaximumSize="1000,40" MinimumSize="85,40" Name="VSHealth" PackLocation="right,bottom" ScrollExtent="210,40" Size="210,40" UserMovable="true" UserResizable="true" version="1.1">
<ProgressbarStyle Bar.Background="progressFill" Name="ProgressBar" />
<ImageStyle Name="ProgressFill">
<ImageFrame Name="progress_fill" Source="/images/window_elements_hr.dds" SourceRect="136,351,350,364" />
</ImageStyle>
<Text AbsorbsInput="false" Color="#FFFFFF" DynamicDataFilter="FBFB" DynamicData="/GameData.Self.Health" Font="/TextStyles.VeryLarge.VeryLargeStyle" Location="9,8" Name="Health" ScrollExtent="42,24" ShadowStyle="/ShadowStylesNew.Outline.style" Size="42,24" TextAlignment="Center" TextAlignmentVertical="Center" Visible="true">100</Text>
<Page DynamicData="/GameData.Self.Health" DynamicDataFilter="0001" Location="5,5" Name="HealthBar" PackSize="absolute,fixed" ScrollExtent="200,30" Size="200,30" Visible="true">
<Image AbsorbsInput="false" Name="Bkg" ScrollExtent="50,30" Size="50,30" SourceRect="317,275,366,296" SourceResource="/images/window_elements_hr.dds" />
<Image AbsorbsInput="false" Location="50,0" Name="ProgressBkg" PackSize="absolute,fixed" ScrollExtent="150,30" Size="150,30" SourceRect="395,276,487,300" SourceResource="/images/window_elements_hr.dds" />
<Progressbar AbsorbsInput="false" Color="#8A2BE2" DynamicDataFilter="FBFB" BackgroundColor="#000000" DynamicData="/GameData.Self.Health" Location="54,3" Name="FooBar" PackSize="absolute,fixed" Progress="1.0" ScrollExtent="141,24" Size="141,24" Style="progressBar" />
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Location="54,2" Name="Frame" PackSize="absolute,fixed" ScrollExtent="141,26" Size="141,26" />
<Text DynamicData="/GameData.Self.Health" Name="Percent" DynamicDataFilter="0001" OnTextChanged="
ProgColor=#FF0000
GreenColor=#00FF00
OrangeColor=#D2691E
isGreater=Parent.FooBar.Progress > 0.52
ProgColor=isGreater ? OrangeColor : ProgColor
isGreater=Parent.FooBar.Progress > 0.55
ProgColor=isGreater ? GreenColor : ProgColor
isGreater=Parent.FooBar.Progress > 0.85
ProgColor=isGreater ? OrangeColor : ProgColor
Parent.FooBar.Color=ProgColor
Parent.Parent.Health.Color=ProgColor" />
</Page>
<Page AbsorbsInput="false" Name="WindowFrame" PackSize="a,a" ScrollExtent="210,40" Size="210,40" Visible="true">
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Name="Frame" PackLocation="left,top" PackSize="absolute,absolute" RStyleDefault="/WindowElements.DesktopWindowFrame.data.frame.rect" ScrollExtent="210,40" Size="210,40" />
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Name="Bkg" PackLocation="left,top" PackSize="absolute,absolute" RStyleDefault="/WindowElements.DesktopWindowFrame.data.bkg.rect" ScrollExtent="210,40" Size="210,40" />
</Page>
</Page>
Any other ideas?
And thank you again for taking the time to look at this.