EQ2Interface

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

Drumstix42 03-09-2012 09:58 PM

Effector reset
 
I'm having trouble resetting an Effector after it's finished.

The element:
Code:

<Image Location="-40,0" Name="Progress" OnEffectFinished="Parent.Reset.press=true" OnShowEffector="FillIn" Size="40,4" >
effector:
Code:

<LocationEffector Name="FillIn" setoneffect="true" Speed="20,0" TargetLocation="0,0" />
The Reset:
Code:

<Button Name="Reset" OnPress="Parent.Bar.Visible=false&#xD;&#xA;Parent.Bar.Visible=true" Style="/ButtonStyles.invisible" Visible="false" />
The effector works once, but then the element stays Visible.
No matter what I do I can't seem to get the bar to Reset to default location, hide, and replay the animation. Am I missing something? Too little sleep?

If I try to directly hide the element after the effector finishes, the game seems to crash. So does the UIBuilder. I can cause another element show, even a copy of the same one, but trying to hide the initial element via script = crash.

Darqwood 03-10-2012 08:06 AM

Quote:

Originally Posted by Drumstix42 (Post 99756)
I'm having trouble resetting an Effector after it's finished.

The element:
Code:

<Image Location="-40,0" Name="Progress" OnEffectFinished="Parent.Reset.press=true" OnShowEffector="FillIn" Size="40,4" >
effector:
Code:

<LocationEffector Name="FillIn" setoneffect="true" Speed="20,0" TargetLocation="0,0" />
The Reset:
Code:

<Button Name="Reset" OnPress="Parent.Bar.Visible=false&#xD;&#xA;Parent.Bar.Visible=true" Style="/ButtonStyles.invisible" Visible="false" />
The effector works once, but then the element stays Visible.
No matter what I do I can't seem to get the bar to Reset to default location, hide, and replay the animation. Am I missing something? Too little sleep?

If I try to directly hide the element after the effector finishes, the game seems to crash. So does the UIBuilder. I can cause another element show, even a copy of the same one, but trying to hide the initial element via script = crash.




See if this sample helps any. Directly hiding the effected element also crashes me, so I just wrap it inside another page. This one picks up the element and forces it back to starting position each time until you hit the stop button.


Code:

<Page Name="EventPanel" Location="40,40" ScrollExtent="44,44" Size="44,44" OnHide="Bar.Visible=Visible&#xD;&#xA;Bar.Left=0" OnShow="Bar.Visible=Visible" PackLocation=",fff" BackgroundColor="#504050" BackgroundOpacity="0.500" Visible="false">
    <LocationEffector Name="FillIn" Speed="20,0" TargetLocation="44,0" />
    <Page Name="Bar" Location="0,0" OnMove="Parent.Reset.Visible=(Left &gt; 41)" OnShowEffector="FillIn" ScrollExtent="44,44" Size="44,44" BackgroundColor="#4488FF" BackgroundOpacity="0.600" Visible="false" />
    <Page Name="Reset" OnShow="Parent.Bar.Left=0&#xD;&#xA;Visible=false" Visible="false" />
</Page>
<Button Name="StartE" OnPress="Parent.EventPanel.Visible=true" Style="/CommonElements.SmallPushButton.data.style" Location="40,90" Size="40,20" />
<Button Name="StopE" OnPress="Parent.EventPanel.Visible=false" Style="/CommonElements.SmallPushButton.data.style" Location="40,110" Size="40,20" />

__

Drumstix42 03-10-2012 03:08 PM

My hero :D

I think I see why it needs to work like this. Thank you for not letting me get to the point of ripping my hair out.


All times are GMT -5. The time now is 10:24 AM.

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