View Single Post
  #5  
Unread 06-07-2009, 11:24 PM
oleega oleega is offline
A Brown Bear
 
Join Date: Apr 2006
Server: Blackburrow
Posts: 11
Default

I think I understand the idea behind your example. I tried changing the health bar, that did not work, so I tried to change the color in a power bar. The following code snippet does not work. The original color of the progress bar remains. Am I missing something?
Code:
<Page DynamicData="/GameData.Self.Power"  DynamicDataFilter="0001" Location="5,5" Name="PowerBar" 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" BackgroundColor="#000000"  Color="#FFFFFF" DynamicData="/GameData.Self.Power" Location="54,3" Name="Bar" PackSize="absolute,fixed" Progress="0.500" 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.Power"  Name="Percent" OnTextChanged="
		ProgColor=#FF0000
		BlueColor=#0000CD
		PinkColor=#FF1493
		PurpleColor=#8A2BE2
		YellowColor=#FFFF00
		OrangeColor=#D2691E
		ProgColor=Parent.Bar.Progress > .30 ? OrangeColor : ProgColor
		ProgColor=Parent.Bar.Progress > .40 ? YellowColor : ProgColor
		ProgColor=Parent.Bar.Progress > 0.45 ? BlueColor : ProgColor
		ProgColor=Parent.Bar.Progress > 0.55 ? PinkColor : ProgColor
                ProgColor=Parent.Bar.Progress > 0.62 ? PurpleColor : ProgColor
                Parent.Bar.Color=ProgColor"/>
		
    </Page>
Reply With Quote