<?xml version="1.0" encoding="utf-8" ?>
<Layout x="0" y="0" width="1024" height="768" animate="EfxPopup">
    <Particles name="ps" x="0" y="0" file="/shop/win8_daily_bonus.ps" visible="0">
        <AnimController name="ps_animation" autoPlay="0" events="play_mana_particle">
            <ActionChain>
                <aEfxWait delay="0.6" />
                <EfxVisible visible="1" />
                <EfxMove duration=".7" from_x="0" from_y="0" to_x="1500" to_y="500"/>
                <EfxVisible visible="0" />
            </ActionChain>
        </AnimController>
    </Particles>
    
    <Image name="rays2" x="110" y="-20" image="../main_menu/rays.png">
            <AnimController autoPlay="1" >
                <ActionChain>
                    <ActionRepeat repeat="-1">
                        <EfxRotate from="0" to="-3590" duration="500"/>
                    </ActionRepeat>
                </ActionChain>
            </AnimController>
    </Image>
    
    <Image name="bkg" x="0" y="89" image="/shop/daily_bonus_small.png" />
    <!-- <Image name="close" x="850" y="130" image="/shop/close.png" /> -->
    
    <Widget name="box" x="20" y="50">
        <Text name="daily_bonus" x="149" y="116" width="700" height="48" font="medium" align="C" text="DAILY_BONUS" color="FFffb670" />
        <Text name="daily_bonus_desc" x="165" y="174" width="660" height="48" font="medium" align="C" text="DAILY_BONUS_DESC" color="FFfdb64f" />

        <Widget name="day_1" x="96" y="272">
            <Image name="img_open" x="0" y="0" image="/shop/1day_open.png" />
            <Image name="img_close" x="0" y="0" image="/shop/1day_close.png" />
            <Text name="day_text" x="32" y="81" width="90" height="48" font="font" align="C" text="DAILY_BONUS_DAY" color="FF39210b" />

            <AnimController name="open" autoPlay="1">
                <ActionChain>
                    <EfxWait  delay="0.6" />
                    <ActionGroup>
                        <EfxAlpha to="1" duration="0.2"/>

                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <AnimController name="hide" autoPlay="0">
                <ActionChain>
                    <ActionGroup>
                        <EfxAlpha to="0" duration="0.6"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <AnimController name="expand" autoPlay="0">
                <ActionChain>
                    <ActionGroup>
                    <EfxPlaySound sound="bonus_select"/>
                        <EfxMoveSpline duration="0.5" modifier="fullarc">
                            <Point coor_x="42" coor_y="328"/>
                            <Point coor_x="100" coor_y="247"/>
                            <Point coor_x="105" coor_y="250"/>
                        </EfxMoveSpline>    
                        <EfxAlphaAmp from="1" to="1" amp="0.3" duration="0.5" modifier="fullarc"/>
                        <EfxScaleAmp from="1" to="1" amp="0.2" duration="0.5" modifier="fullarc"/>
                    </ActionGroup>
                    <EfxSendEvent event="play_mana_particle"/>
                </ActionChain>
            </AnimController>
        </Widget>
        
        <Widget name="day_2" x="241" y="254">
            <Image name="img_open" x="0" y="0" image="/shop/2day_open.png" />
            <Image name="img_close" x="0" y="0" image="/shop/2day_close.png" />
            <Text name="day_text" x="32" y="99" width="90" height="48" font="font" align="C" text="DAILY_BONUS_DAY" color="FF39210b" />

            <AnimController name="open" autoPlay="1">
                <ActionChain>
                    <EfxWait  delay="0.5" />
                    <ActionGroup>
                        <EfxAlpha to="1" duration="0.2"/>
                        <EfxMove duration="0.2" from_x="42" to_x="241" mode="ftx" modifier="sindiminish"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <AnimController name="hide" autoPlay="0">
                <ActionChain>
                    <ActionGroup>
                        <EfxAlpha to="0" duration="0.6"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <AnimController name="expand" autoPlay="0">
                <ActionChain>
                    <ActionGroup>
                        <EfxPlaySound sound="bonus_select"/>
                        <EfxMoveSpline duration="0.5" modifier="fullarc">
                            <Point coor_x="203" coor_y="308"/>
                            <Point coor_x="260" coor_y="237"/>
                            <Point coor_x="105" coor_y="250"/>
                        </EfxMoveSpline>    
                        <EfxAlphaAmp from="1" to="1" amp="0.3" duration="0.5" modifier="fullarc"/>
                        <EfxScaleAmp from="1" to="1" amp="0.2" duration="0.5" modifier="fullarc"/>
                    </ActionGroup>
                    <EfxSendEvent event="play_mana_particle"/>
                </ActionChain>
            </AnimController>
        </Widget>
        
        <Widget name="day_3" x="374" y="238">
            <Image name="img_open" x="0" y="0" image="/shop/3day_open.png" />
            <Image name="img_close" x="0" y="0" image="/shop/3day_close.png" />
            <Text name="day_text" x="44" y="115" width="90" height="48" font="font" align="C" text="DAILY_BONUS_DAY" color="FF39210b" />

            <AnimController name="open" autoPlay="1">
                <ActionChain>
                    <EfxWait  delay="0.4" />
                    <ActionGroup>
                        <EfxAlpha to="1" duration="0.2"/>
                        <EfxMove duration="0.2" from_x="42" to_x="374" mode="ftx" modifier="sindiminish"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <AnimController name="hide" autoPlay="0">
                <ActionChain>
                    <ActionGroup>
                        <EfxAlpha to="0" duration="0.6"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <AnimController name="expand" autoPlay="0">
                <ActionChain>
                    <ActionGroup>
                        <EfxPlaySound sound="bonus_select"/>
                        <EfxMoveSpline duration="0.8" modifier="fullarc">
                            <Point coor_x="354" coor_y="288"/>
                            <Point coor_x="370" coor_y="100"/>
                            <Point coor_x="105" coor_y="250"/>
                        </EfxMoveSpline>    
                        <EfxAlphaAmp from="1" to="1" amp="0.3" duration="0.8" modifier="fullarc"/>
                        <EfxScaleAmp from="1" to="1" amp="0.3" duration="0.8" modifier="fullarc"/>
                    </ActionGroup>
                    <EfxSendEvent event="play_mana_particle"/>
                </ActionChain>
            </AnimController>
        </Widget>
        
        <Widget name="day_4" x="506" y="228">
            <Image name="img_open" x="0" y="0" image="/shop/4day_open.png" />
            <Image name="img_close" x="0" y="0" image="/shop/4day_close.png" />
            <Text name="day_text" x="58" y="125" width="90" height="48" font="font" align="C" text="DAILY_BONUS_DAY" color="FF39210b" />

            <AnimController name="open" autoPlay="1">
                <ActionChain>
                    <EfxWait  delay="0.3" />
                    <ActionGroup>
                        <EfxAlpha to="1" duration="0.2"/>
                        <EfxMove duration="0.2" from_x="42" to_x="506" mode="ftx" modifier="sindiminish"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>
            <AnimController name="hide" autoPlay="0">
                <ActionChain>
                    <ActionGroup>
                        <EfxAlpha to="0" duration="0.6"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>
            
            <AnimController name="expand" autoPlay="0">
                <ActionChain>
                    <ActionGroup>
                        <EfxPlaySound sound="bonus_select"/>
                        <EfxMoveSpline duration="0.8" modifier="fullarc">
                            <Point coor_x="509" coor_y="278"/>
                            <Point coor_x="550" coor_y="100"/>
                            <Point coor_x="105" coor_y="250"/>
                        </EfxMoveSpline>    
                        <EfxAlphaAmp from="1" to="1" amp="0.3" duration="0.8" modifier="fullarc"/>
                        <EfxScaleAmp from="1" to="1" amp="0.3" duration="0.8" modifier="fullarc"/>
                    </ActionGroup>
                    <EfxSendEvent event="play_mana_particle"/>
                </ActionChain>
            </AnimController>
        </Widget>

        <Widget name="day_5" x="684" y="196">
            <Image name="img_open" x="0" y="0" image="/shop/5day_open.png" />
            <Image name="img_close" x="0" y="0" image="/shop/5day_close.png" />
            <Text name="day_text" x="38" y="158" width="90" height="48" font="font" align="C" text="DAILY_BONUS_DAY" color="FF39210b" />

            <AnimController name="open" autoPlay="1">
                <ActionChain>
                    <EfxWait  delay="0.2" />
                    <ActionGroup>
                        <EfxAlpha to="1" duration="0.2"/>
                        <EfxMove duration="0.2" from_x="42" to_x="684" mode="ftx" modifier="sindiminish"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <AnimController name="hide" autoPlay="0">
                <ActionChain>
                    <ActionGroup>
                        <EfxAlpha to="0" duration="0.6"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <AnimController name="expand" autoPlay="0">
                <ActionChain>
                    <ActionGroup>
                        <EfxPlaySound sound="bonus_select"/>
                        <EfxMoveSpline duration="0.8" modifier="fullarc">
                            <Point coor_x="726" coor_y="278"/>
                            <Point coor_x="384" coor_y="90"/>
                            <Point coor_x="105" coor_y="250"/>
                        </EfxMoveSpline>    
                        <EfxAlphaAmp from="1" to="1" amp="0.3" duration="0.8" modifier="fullarc"/>
                        <EfxScaleAmp from="1" to="1" amp="0.3" duration="0.8" modifier="fullarc"/>
                    </ActionGroup>
                    <EfxSendEvent event="play_mana_particle"/>

                </ActionChain>
            </AnimController>
        </Widget>

        <Widget name="arrow" x="143" y="176">
            <Image name="" image="/shop/bonus_arrow.png" x="0" y="0">
                <AnimController autoPlay="1">
                    <ActionChain>
                        <ActionRepeat repeat="-1">
                            <ActionChain>
                                <ActionGroup>
                                    <EfxScaleXY duration="0.5" from_x="1.0" from_y="1.0" to_x="1" to_y="0.8" modifier="fullarc"/>
                                    <EfxMove duration="0.5" from_y="0" to_y="10" mode="fty" modifier="fullarc"/>
                                </ActionGroup>

                                <ActionGroup>
                                    <EfxScaleXY duration="0.5" from_x="1.0" from_y="0.8" to_x="1" to_y="1" modifier="fullarc"/>
                                    <EfxMove duration="0.5"  from_y="10"  to_y="0" mode="fty" modifier="fullarc"/>
                                </ActionGroup>

                            </ActionChain>
                            <aEfxMoveSin speed_x="0" speed_y="2" amp_x="0" amp_y="15"/>
                        </ActionRepeat>

                    </ActionChain>
                </AnimController>
            </Image>
        </Widget>

        <Widget name="bonus_content" x="302" y="116" width="500" height="400" visible="0" xml="/shop/bonus_content.xml"/>
    </Widget>
    
    <Button name="open_bonus" x="0" y="0" width="1024" height="768" visible="0">
        <Button name="get_reward" x="392" y="478" image="/hint/button_big_orange.png">
            <Text name="get_reward_text" x="43" y="8" width="150" height="48" font="medium" align="C" text="DAILY_BONUS_GET_REWARD" color="FFFFFFFF" lineHeight="17"/>
            
            <SelectorController>
                <Action type="0" btn="12" cmd="press"/>
                <Container class="GPOnceContainer"/>
                <Item path=".." scale="1 1" alias="btn_a" offset="-12 10"/>
            </SelectorController>   
        </Button>
        <AnimController name="button_down_effect" autoPlay="0"/>
    </Button>
    <Button name="left" x="0" y="0" width="1024" height="768">
        <Button name="thank_you" x="392" y="478" image="/hint/button_big_orange.png">
            <Text name="thank_you_text" x="43" y="8" width="150" height="48" font="medium" align="C" text="DAY_THANKS" color="FFFFFFFF" lineHeight="17"/>
            
            <SelectorController>
                <Action type="0" btn="12" cmd="press"/>
                <Container class="GPOnceContainer"/>
                <Item path=".." scale="1 1" alias="btn_a" offset="-12 10"/>
            </SelectorController>   
        </Button>
        <AnimController name="button_down_effect" autoPlay="0"/>        
    </Button>    

    
    <Properties>
        <Property key="sfx_dlg_appear">daily_bonus_come</Property>
        <Property key="sfx_dlg_dismiss">dialy_bonus_away</Property>
    </Properties>
    
</Layout>

