<?xml version="1.0" encoding="utf-8" ?>
<Layout>
    <Image name="planet_slots" x="195" y="10" image="/interface/planet_slots6.png"/>

    <Widget x="202" y="17">
        <PaneController x="0" y="0" events="back_pane">
            <Button name="back_main" x="0" y="0">
                <Image x="0" y="0" image="button_toolbar_2.png"/>
                <Image x="0" y="0" image="back.png"/>
                <Click cmd="layout" param="back">
                    <Param value="crossfade"/>
                </Click>
                <Properties>
                    <Property key="sfx_btn_hover">button_hover</Property>
                </Properties>

                <SelectorController>
                    <Action type="0" btn="13" cmd="press"/>
                    <Container class="GPOnceContainer"/>
                    <Item path=".." scale="1 1" alias="btn_b" offset="-12 10"/>
                </SelectorController>
            </Button>
            <Button name="back_from_demon_list" x="0" y="0">
                <Image x="0" y="0" image="button_toolbar_2.png"/>
                <Image x="0" y="0" image="back.png"/>
                <Click handler="cur_layout" cmd="on_right" param="DemonList"/>

                <Properties>
                    <Property key="sfx_btn_hover">button_hover</Property>
                </Properties>

                <SelectorController>
                    <Action type="0" btn="13" cmd="press"/>
                    <Container class="GPOnceContainer"/>
                    <Item path=".." scale="1 1" alias="btn_b" offset="-12 10"/>
                </SelectorController>
            </Button>
            <Button name="back_from_battle_map" x="0" y="0">
                <Image x="0" y="0" image="button_toolbar_2.png"/>
                <Image x="0" y="0" image="back.png"/>
                <Click handler="cur_layout" cmd="on_right" param="BattleMap"/>

                <Properties>
                    <Property key="sfx_btn_hover">button_hover</Property>
                </Properties>

                <SelectorController>
                    <Action type="0" btn="13" cmd="press"/>
                    <Container class="GPOnceContainer"/>
                    <Item path=".." scale="1 1" alias="btn_b" offset="-12 10"/>
                </SelectorController>
            </Button>
        </PaneController>

        <AnimController autoPlay="1">
            <ActionChain>
                <EfxColor duration="0" to="00FFFFFF" />
                <EfxWait delay="0.3"/>
                <ActionGroup>
                    <EfxPlaySound sound="tool_bar_btn_appear"/>
                    <EfxScaleXY duration="0.3" from_x="0.3" from_y="0.3" to_x="1" to_y="1" modifier="bounce" />
                    <EfxColor duration="0.3" from="00FFFFFF" to="FFFFFFFF" />
                </ActionGroup>
            </ActionChain>
        </AnimController>
    </Widget>

    <Button name="lootsie" x="326" y="17" image="/toolbar/button_toolbar_2.png" show_if="$device.isLootsieConnected == true">
        <Image x="0" y="0" image="/toolbar/quest_new_year.png"/>
        <Event id="event_lootsie_show"/>

        <AnimController autoPlay="1">
            <ActionChain>
                <EfxColor duration="0" to="00FFFFFF" />
                <EfxWait delay="0.3"/>
                <ActionGroup>
                    <EfxPlaySound sound="tool_bar_btn_appear"/>
                    <EfxScaleXY duration="0.3" from_x="0.3" from_y="0.3" to_x="1" to_y="1" modifier="bounce" />
                    <EfxColor duration="0.3" from="00FFFFFF" to="FFFFFFFF" />
                </ActionGroup>
            </ActionChain>
        </AnimController>
        <Properties>
            <Property key="sfx_btn_hover">button_hover</Property>
        </Properties>
    </Button>

    <CloudSyncControl x="583" y="17" show_if="$config.social_net_cloud_enabled == 1" create_if="$device.hasFacebookSupport == true">
        <Button name="cloud" x="0" y="0">
            <Image x="0" y="0" image="button_toolbar_2.png"/>
            <Image x="1" y="2" image="cloud_sync.png"/>
            <Image name="badge" x="80" y="0" width="29" height="29" image="../toolbar/exclamation_mark.png" >
                <AnimController autoPlay="1">
                    <ActionRepeat repeat="3">
                        <ActionChain>
                            <EfxWait delay="4"/>
                            <EfxPlaySound sound="button_blinking"/>
                            <EfxScaleXY duration="0.15" from_x="1.0" from_y="1.0" to_x="1.4" to_y="1.4" modifier="sindiminish"/>
                            <EfxScaleXY duration="0.15" from_x="1.4" from_y="1.4" to_x="1.0" to_y="1.0" modifier="sindiminish"/>
                            <EfxScaleXY duration="0.15" from_x="1.0" from_y="1.0" to_x="1.4" to_y="1.4" modifier="sindiminish"/>
                            <EfxScaleXY duration="0.15" from_x="1.4" from_y="1.4" to_x="1.0" to_y="1.0" modifier="sindiminish"/>
                        </ActionChain>
                    </ActionRepeat>
                </AnimController>
            </Image>

            <AnimController autoPlay="1">
                <ActionChain>
                    <EfxColor duration="0" to="00FFFFFF" />
                    <EfxWait delay="1"/>
                    <ActionGroup>
                        <EfxPlaySound sound="tool_bar_btn_appear"/>
                        <EfxScaleXY duration="0.5" from_x="0.3" from_y="0.3" to_x="1" to_y="1" modifier="bounce" />
                        <EfxColor duration="0.5" from="00FFFFFF" to="FFFFFFFF" />
                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <Properties>
                <Property key="sfx_btn_hover">button_hover</Property>
            </Properties>
        </Button>
    </CloudSyncControl>

     <CloudSyncControl x="583" y="17" show_if="$config.social_net_steam_cloud_enabled == 1 * $device.getStore == steam">
        <Button name="cloud_steam" x="0" y="0">
            <Image x="0" y="0" image="button_toolbar_2.png"/>
            <Image x="-12" y="-14" image="cloud_sync_steam.png"/>
            <Image name="badge" x="80" y="0" width="29" height="29" image="../toolbar/exclamation_mark.png" >
                <AnimController autoPlay="1">
                    <ActionRepeat repeat="3">
                        <ActionChain>
                            <EfxWait delay="4"/>
                            <EfxPlaySound sound="button_blinking"/>
                            <EfxScaleXY duration="0.15" from_x="1.0" from_y="1.0" to_x="1.4" to_y="1.4" modifier="sindiminish"/>
                            <EfxScaleXY duration="0.15" from_x="1.4" from_y="1.4" to_x="1.0" to_y="1.0" modifier="sindiminish"/>
                            <EfxScaleXY duration="0.15" from_x="1.0" from_y="1.0" to_x="1.4" to_y="1.4" modifier="sindiminish"/>
                            <EfxScaleXY duration="0.15" from_x="1.4" from_y="1.4" to_x="1.0" to_y="1.0" modifier="sindiminish"/>
                        </ActionChain>
                    </ActionRepeat>
                </AnimController>
            </Image>

            <AnimController autoPlay="1">
                <ActionChain>
                    <EfxColor duration="0" to="00FFFFFF" />
                    <EfxWait delay="1"/>
                    <ActionGroup>
                        <EfxPlaySound sound="tool_bar_btn_appear"/>
                        <EfxScaleXY duration="0.5" from_x="0.3" from_y="0.3" to_x="1" to_y="1" modifier="bounce" />
                        <EfxColor duration="0.5" from="00FFFFFF" to="FFFFFFFF" />
                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <Properties>
                <Property key="sfx_btn_hover">button_hover</Property>
            </Properties>
        </Button>
    </CloudSyncControl>
    
    <Widget x="714" y="17">
        <PaneController x="0" y="0" events="reset_pane">
            <Button name="btn_reset" x="0" y="0">
                <Image x="0" y="0" image="button_toolbar_2.png"/>
                <Image x="0" y="0" image="reset.png"/>
                <Click handler="cur_sublayout" cmd="show_reset"/>
                <Properties>
                    <Property key="sfx_btn_hover">button_hover</Property>
                </Properties>

                <SelectorController>
                    <Action type="0" btn="14" cmd="press"/>
                    <Container class="GPOnceContainer"/>
                    <Item path=".." scale="1 1" alias="btn_x" offset="-12 10"/>
                </SelectorController>
            </Button>

            <Widget name="empty"/>

            <Button name="shop" x="0" y="0" show_if="$device.isLootsieConnected == false  * $device.getStore != steam * $device.getStore != humblebundle">
                <Image x="0" y="0" image="button_toolbar_2.png"/>
                <Image x="0" y="0" image="shop.png"/>

                <Click cmd="layout" param="Shop">
                    <Param value="crossfade"/>
                </Click>

                <Properties>
                    <Property key="sfx_btn_hover">button_hover</Property>
                </Properties>

                <SelectorController>
                    <Action type="0" btn="14" cmd="press"/>
                    <Container class="GPOnceContainer"/>
                    <Item path=".." scale="1 1" alias="btn_x" offset="-12 10"/>
                </SelectorController>
            </Button>
        </PaneController>

        <AnimController autoPlay="1">
            <ActionChain>
                <EfxColor duration="0" to="00FFFFFF" />
                <EfxWait delay="1.2"/>
                <ActionGroup>
                    <EfxPlaySound sound="tool_bar_btn_appear"/>
                    <EfxScaleXY duration="0.3" from_x="0.3" from_y="0.3" to_x="1" to_y="1" modifier="bounce" />
                    <EfxColor duration="0.3" from="00FFFFFF" to="FFFFFFFF" />
                </ActionGroup>
            </ActionChain>
        </AnimController>
    </Widget>

    <Button name="achievements" x="840" y="17">
        <Image x="0" y="0" image="button_toolbar_2.png"/>
        <Image x="0" y="0" image="/toolbar/achivements.png"/>
        <Click cmd="layout" param="Achievements">
            <Param value="crossfade"/>
        </Click>

        <AnimController autoPlay="1">
            <ActionChain>
                <EfxColor duration="0" to="00FFFFFF" />
                <EfxWait delay="1.4"/>
                <ActionGroup>
                    <EfxPlaySound sound="tool_bar_btn_appear"/>
                    <EfxScaleXY duration="0.3" from_x="0.3" from_y="0.3" to_x="1" to_y="1" modifier="bounce" />
                    <EfxColor duration="0.3" from="00FFFFFF" to="FFFFFFFF" />
                </ActionGroup>
            </ActionChain>
        </AnimController>
        <Properties>
            <Property key="sfx_btn_hover">button_hover</Property>
        </Properties>

        <SelectorController>
            <Action type="0" btn="15" cmd="press"/>
            <Container class="GPOnceContainer"/>
            <Item path=".." scale="1 1" alias="btn_y" offset="-12 10"/>
        </SelectorController>
    </Button>


</Layout>
