View Single Post
  #2  
Unread 05-06-2005, 01:45 AM
dc_roenfanz's Avatar
dc_roenfanz dc_roenfanz is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Unkown
Posts: 588
Default

Quote:
Originally Posted by hirebrand
Any ideas? The button is supposed to switch between a black and white background.



Code:
<?xml version="1.0" encoding="utf-8"?>
<Page allowcloseontop="false" eq2usescomwndcontrols="true" Location="610,561" MinimumSize="210,110" Name="MainChat" PackLocation="left,bottom" PackLocationProp="0610/0001,-207/0001" ScrollExtent="386,172" Size="386,172" UserMovable="true" UserResizable="true">
<Page Location="4,20" Name="ChatPage" PackSize="absolute,absolute" PackSizeProp="0010/0001,0026/0001" ScrollExtent="376,146" Size="376,146">
<Page Location="9,7" Name="TabFrame" PackLocation="left,top" PackLocationProp="0009/0001,0007/0001" PackSize="absolute,fixed" PackSizeProp="0020/0001,0002/0003" ScrollExtent="356,27" Size="356,27">
<Button backdropcontrol="false" Enabled="false" framecontrol="true" Location="324,4" Name="tableft" PackLocation="right,top" PackLocationProp="-032/0001,0004/0001" PackSize="fixed,fixed" PackSizeProp="0002/0003,0002/0003" ScrollExtent="15,15" Size="15,15" Style="/ButtonStyles.tabscroll_right"></Button>
<Button backdropcontrol="false" Enabled="false" framecontrol="true" Location="339,4" Name="tabright" PackLocation="right,top" PackLocationProp="-017/0001,0004/0001" PackSize="fixed,fixed" PackSizeProp="0002/0003,0002/0003" ScrollExtent="15,15" Size="15,15" Style="/ButtonStyles.tabscroll_left"></Button>
<TabbedPane ActiveTab="0" DataSource="TabSource" Name="TabPane" PackLocation="left,top" PackLocationProp="0000/0001,0000/0001" PackSize="absolute,fixed" PackSizeProp="0031/0001,0002/0003" ScrollExtent="325,27" ScrollLeftButton="tableft" ScrollRightButton="tabright" Size="325,27" Style="/ButtonStyles.tab_default">
</TabbedPane>
</Page>
<Page Location="-3,28" Name="ChatFrame" PackLocation="left,top" PackLocationProp="-003/0001,0028/0001" PackSize="absolute,absolute" PackSizeProp="-011/0001,0016/0001" ScrollExtent="387,130" Size="387,130">


<Button

A="Parent.Parent.BackgroundColor=(#DDDDDD) OnPress=(B)"
B="Parent.Parent.BackgroundColor=(#000000) OnPress=(A)"
OnPress="MainHUD.MainChat.BackgroundColor=(#000000) OnPress=(A)"

LocalTooltip="Background Color" Location="329,101" Name="ColorButton" PackLocation="right,bottom" PackLocationProp="-058/0001,-029/0001" ScrollExtent="15,15" Size="15,15" Style="/ButtonStyles.options_button" Tooltip="Background Color"></Button>


<Button LocalTooltip="Default Chat Channel" Location="345,101" Name="DefaultChannelButton" PackLocation="right,bottom" PackLocationProp="-042/0001,-029/0001" ScrollExtent="15,15" Size="15,15" Style="/ButtonStyles.channel_button" Tooltip="Default Chat Channel"></Button>
<Image Location="345,101" Name="DefaultChannelBkg" PackLocation="right,bottom" PackLocationProp="-042/0001,-029/0001" ScrollExtent="15,15" Size="15,15" SourceRect="122,219,137,234" SourceResource="images/widgets01.dds"/>
<Text AbsorbsInput="false" Cursor="/Cursor.Text" Font="/Fonts.Font_Chat" GetsInput="false" Location="3,6" Margin="0,0,0,1" Name="ChatDisplay" PackLocation="left,top" PackLocationProp="0003/0001,0006/0001" PackSize="absolute,absolute" PackSizeProp="0029/0001,0039/0001" ScrollExtent="358,91" Size="358,91" TextAlignmentVertical="Bottom"></Text>
<Textbox Color="#F0F0F0" Cursor="/Cursor.Text" Location="3,98" Name="ChatInput" PackLocation="left,bottom" PackLocationProp="0003/0001,-032/0001" PackSize="absolute,fixed" PackSizeProp="0062/0001,0002/0003" ScrollExtent="325,19" Size="325,19" Style="chat_textbox"></Textbox>
<Scrollbar ArrowPressSound="sounds/button" Control="ChatDisplay" Location="361,6" Name="ChatScroll" PackLocation="right,top" PackLocationProp="-026/0001,0006/0001" PackSize="fixed,absolute" PackSizeProp="0002/0003,0020/0001" ScrollExtent="16,110" Size="16,110" Style="/ScrollStyles.default_vscroll"/>
<Page AbsorbsInput="false" backdropcontrol="false" BackgroundOpacity="1.000" framecontrol="true" Location="-5,0" Name="ChatFrameBorder" PackLocation="left,top" PackLocationProp="-005/0001,0000/0001" PackSize="absolute,absolute" PackSizeProp="-019/0001,0000/0001" RStyleDefault="/FrameStyles.win_gold_plain" ScrollExtent="406,130" Size="406,130"/>
</Page>
</Page>
<DataSource Name="TabSource">
<Data Name="One" target="SomeWidget" text="One"/>
<Data Name="Two" text="Two"/>
</DataSource>
<Button LocalTooltip="Close" Location="362,3" Name="WC_CloseButton" PackLocation="right,top" PackLocationProp="-024/0001,0003/0001" ScrollExtent="15,15" Size="15,15" Style="/ButtonStyles.close_button" Tooltip="Close" UserMovable="true"></Button>
<Button LocalTooltip="Window Options" Location="332,3" Name="WC_OptionsButton" PackLocation="right,top" PackLocationProp="-054/0001,0003/0001" ScrollExtent="15,15" Size="15,15" Style="/ButtonStyles.options_button" Tooltip="Window Options" UserMovable="true"></Button>
<Button LocalTooltip="Help" Location="347,3" Name="WC_HelpButton" PackLocation="right,top" PackLocationProp="-039/0001,0003/0001" ScrollExtent="15,15" Size="15,15" Style="/ButtonStyles.help_button" Tooltip="Help" UserMovable="true"></Button>
<TextboxStyle CaratColor="#221100" CaratWidth="2" Name="chat_textbox" NormalTextStyle="/Fonts.Font_ChatInput" RStyleDefault="/rectlist.win_background" SelectionColor="#A0A0A0" SelectionOpacity="1.000" TextPadding="4,1,4,1"/>
<Text AbsorbsInput="false" Font="/Fonts.FontZapf18" LocalText="Chat" Location="6,2" MaxLines="1" Name="WC_Title" PackSize="fixed" PackSizeProp="0002/0003,xxxx/xxxx" ScrollExtent="90,18" Size="90,17" TextAlignment="Center" TextColor="#EBDEAA" UserMovable="true">Chat</Text>
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Name="WC_Titlebar" PackLocation="left,top" PackLocationProp="0000/0001,0000/0001" PackSize="absolute" PackSizeProp="-001/0001,xxxx/xxxx" RStyleDefault="/FrameStyles.title_gold_simple" ScrollExtent="387,24" Size="387,24"/>
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Location="0,17" Name="WC_Frame" PackLocation="left,top" PackLocationProp="0000/0001,0017/0001" PackSize="absolute,absolute" PackSizeProp="0000/0001,0016/0001" RStyleDefault="/FrameStyles.win_gold_simple" ScrollExtent="386,156" Size="386,156"/>
<Page AbsorbsInput="false" BackgroundColor="#DDDDDD" BackgroundOpacity="1.000" Color="#DDDDDD" Location="2,22" Name="WC_Backdrop" PackLocation="left,top" PackLocationProp="0002/0001,0022/0001" PackSize="absolute,absolute" PackSizeProp="0008/0001,0028/0001" ScrollExtent="378,144" Size="378,144"/>
</Page>
Im not sure, but On all the toggles I made, i kept the syntax exactly the same

A="MainHUD.MainChat.BackgroundColor=(#DDDDDD) OnPress=(B)"
B="MainHUD.MainChat.BackgroundColor=(#000000) OnPress=(A)"
OnPress="MainHUD.MainChat.BackgroundColor=(#000000) OnPress=(A)"

OR

A="Parent.Parent.BackgroundColor=(#DDDDDD) OnPress=(B)"
B="Parent.Parent.BackgroundColor=(#000000) OnPress=(A)"
OnPress="Parent.Parent.BackgroundColor=(#000000) OnPress=(A)"

Is it not working at all, or is it only toggling once but not the second time?
Another idea just came to me, don't know if this matters or not, but should the mianhud command be like how gamedata is?

example healthBAR=/gamedata.self.health (iirc)
so: /MainHUD.MainChat.BackgroundColor=(#000000) OnPress=(A)

Dont know if either of those would make a difference, but just ideas

Reply With Quote