<?xml version="1.0" encoding="utf-8" ?>
<Layout>
    <Widget >
        <Widget x="0" y="15">
            <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="-2" y="-6" 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="-2" y="-6" 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="-2" y="-6" 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>
                    <EfxVisible visible="0"/>
                    <EfxWait delay="0.3"/>
                    <ActionGroup>
                        <EfxPlaySound sound="tool_bar_btn_appear"/>
                        <EfxMove from_x="-100" from_y="15" to_x="0" to_y="15" duration="0.1"/>
                        <EfxVisible visible="1"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>
        </Widget>

        <Widget x="0" y="151">
            <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"/>


            </PaneController>

            <AnimController autoPlay="1">
                <ActionChain>
                    <EfxVisible visible="0"/>
                    <EfxWait delay="0.5"/>
                    <ActionGroup>
                        <EfxPlaySound sound="tool_bar_btn_appear"/>
                        <EfxMove from_x="-100" from_y="151" to_x="0" to_y="151" duration="0.1"/>
                        <EfxVisible visible="1"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>
        </Widget>

        <CloudSyncControl x="0" y="287" 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="94" y="0" width="46" height="46"  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="0.8"/>
                        <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="0" y="287" 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="2" y="2" image="cloud_sync_steam.png"/>
                
                <Image name="badge" x="94" y="0" width="46" height="46"  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="0.7"/>
                        <ActionGroup>
                            <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>    
        
        
        <Button name="achievements" x="0" y="423" >
            <Image x="0" y="0" image="/toolbar/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>
                    <EfxVisible visible="0"/>
                    <EfxWait delay="1.1"/>
                    <ActionGroup>
                        <EfxPlaySound sound="tool_bar_btn_appear"/>
                        <EfxMove from_x="-100" from_y="423" to_x="0" to_y="423" duration="0.1"/>
                        <EfxVisible visible="1"/>
                    </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>

        <Button name="lootsie" x="0" y="559" show_if="$device.isLootsieConnected == true" >
            <Image x="0" y="0" image="button_toolbar_2.png"/>
            <Image x="0" y="0" image="extras_toolbar.png"/>

            <Event id="event_lootsie_show"/>

            <AnimController autoPlay="1">
                <ActionChain>
                    <EfxVisible visible="0"/>
                    <EfxWait delay="0.6"/>
                    <ActionGroup>
                        <EfxPlaySound sound="round_ui_button_slidein_or_grow"/>
                        <EfxMove from_x="-100" from_y="559" to_x="0" to_y="559" duration="0.1"/>
                        <EfxVisible visible="1"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>

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

        </Button>

        <Button name="shop" x="0" y="559" 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>

            <AnimController autoPlay="1">
                <ActionChain>
                    <EfxVisible visible="0"/>
                    <EfxWait delay="1.3"/>
                    <ActionGroup>
                        <EfxPlaySound sound="tool_bar_btn_appear"/>
                        <EfxMove from_x="-100" from_y="559" to_x="0" to_y="559" duration="0.1"/>
                        <EfxVisible visible="1"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>
            <Properties>
                <Property key="sfx_btn_hover">button_hover</Property>
            </Properties>

            <Properties>
                <Property key="sfx_btn_hover">button_hover</Property>
            </Properties>
        </Button>
    </Widget>
    
    <GPPanel x="50" y="685">
        <GPPanelIcon x="0" y="0" alias="navigate" auto_visible="0"/>
    </GPPanel>



</Layout>
