<?xml version="1.0" encoding="utf-8" ?>
<Layout scale="1.0" preload="MainMenu,BattleMap,QuestsMenu,Achievements,MainGameMenu">
    <!--Image name="bkg" x="0" y="-161" image="/interface/bkg_4_3.png" />
    <Image name="book" x="116" y="35" image="/interface/book_2.png" /-->
    <Image name="bkg" x="0" y="-161" image="/interface/bkg_4_3_book.jpg" />

    <!--Image name="book" x="116" y="35" image="/interface/book_2.png" visible="0">
        <AnimController autoPlay="1">
            <ActionChain>
                <EfxVisible visible="0"/>
                <ActionGroup>
                    <EfxScaleXY duration="0.3" from_x="0.5" from_y="0.5" to_x="1" to_y="1"/>
                    <EfxColor duration="0.3" from="00FFFFFF" to="FFFFFFFF"/>
                    <EfxVisible visible="1"/>
                </ActionGroup>
                <EfxSendEvent event="event_play_menu_left_page_loaded"/>
                <EfxSendCmd handler="anim_ep_but" cmd="play"/>
                <EfxSendCmd handler="anim_qu_but" cmd="play"/>
                <EfxSendCmd handler="anim_pu_but" cmd="play"/>
                <EfxSendCmd handler="anim_ar_but" cmd="play"/>
                <EfxSendCmd handler="anim_mg_but" cmd="play"/>

            </ActionChain>
        </AnimController>
    </Image-->

    <GPSharedActions>
        <Action type="0" btn="12" cmd="press"/>
    </GPSharedActions>

    <GPToolbarController>
        <Action type="0" btn="0" cmd="left"/>
        <Action type="0" btn="1" cmd="right"/>
        <Action type="0" btn="12" cmd="press"/>

        <Container class="GPButtonsContainer"/>

        <Item path="../*/back_main" scale="1 1" cID="def_circle"/>
        <Item path="../*/back_from_demon_list" scale="1 1" cID="def_circle"/>
        <Item path="../*/back_from_battle_map" scale="1 1" cID="def_circle"/>
        <Item path="../*/btn_reset" scale="1 1" cID="def_circle"/>
        <Item path="../*/cloud" scale="1 1" cID="def_circle"/>
        <Item path="../*/achievements" scale="1 1" cID="def_circle"/>
        <Item path="../*/lootsie" scale="1 1" cID="def_circle"/>
        <Item path="../*/shop" scale="1 1" cID="def_circle"/>

    </GPToolbarController>

    <SelectorController>
        <Action type="1" axis="1" use_val="1" val="0.5" cmd="left"/>
        <Action type="1" axis="1" use_val="1" val="-0.5" cmd="right"/>
        <Action type="0" btn="12" cmd="press"/>

        <Container class="GPButtonsContainer"/>

        <Item path="../button_1/item_MainGameMenu" scale="5 7" def="1"/>
        <Item path="../button_2/item_Demon" scale="5 7"/>
        <Item path="../button_5/item_TreeQuests" scale="5 7"/>
        <Item path="../button_3/item_PuzzlesMenu" scale="5 7"/>

    </SelectorController>

    <AnimController autoPlay="1">
        <ActionChain>
            <EfxPlaySound sound="play_menu_open"/>
            <EfxSendEvent event="event_play_menu_left_page_loaded"/>
            <EfxSendCmd handler="anim_ep_but" cmd="play"/>
            <EfxSendCmd handler="anim_qu_but" cmd="play"/>
            <EfxSendCmd handler="anim_pu_but" cmd="play"/>
            <EfxSendCmd handler="anim_ar_but" cmd="play"/>
            <EfxSendCmd handler="anim_mg_but" cmd="play"/>

        </ActionChain>
    </AnimController>

    <Widget name="button_1" x="285" y="110" visible="0" >
        <Button name="item_MainGameMenu" x="0" y="0" image="/play_menu/button_all_notpressed.png" sound="demons_screen_open">
            <State name="selected" image="/play_menu/button_all_pressed.png"/>
            <Click handler="cur_layout" cmd="on_right" param="MainGameMenu"/>

            <Text name="text_main_game" x="58" y="45" width="280" height="50" font="medium" text="PLAYMENU_SCR_MAIN_GAME" align="C" color="FFFFFFFF"/>

            <Properties>
                <Property key="sfx_btn_hover">button_hover</Property>
            </Properties>
            <Image name="under_main_game" x="-95" y="-49" image="pic_main_game.png"/>
        </Button>
        <AnimController autoPlay="0" handler="anim_ep_but">
            <ActionChain>
                <EfxWait delay="0.4"/>
                <ActionGroup>
                    <EfxMove from_x="285" from_y="-100" to_x="285" to_y="110" duration="0.1"/>
                    <EfxColor duration="0.1" from="00FFFFFF" to="FFFFFFFF"/>
                    <EfxVisible visible="1"/>
                </ActionGroup>

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

    <Widget name="button_2" x="285" y="250" visible="0" >
        <Button name="item_Demon" x="0" y="0" image="/play_menu/button_all_notpressed.png">
            <State name="selected" image="/play_menu/button_all_pressed.png"/>
            <Click handler="cur_layout" cmd="on_right" param="BattleMap"/>

            <DemonFirstTime name="promo" x="-10" y="92">
                <Image x="0" y="0" image="demons_new_feature.png"/>
                <Text name="text_promo" x="75" y="-10" width="270" height="40" font="author" text="DEMON_BATTLE_PROMO" align="C" color="FFFFFFFF"/>
            </DemonFirstTime>

            <Text name="text_quests" x="58" y="48" width="280" height="40" font="medium" text="PLAYMENU_SCR_DEMONS_BATTLE" align="C" color="FFFFFFFF"/>

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

            <Image name="under_demons" x="-60" y="-10" image="pic_demons.png"/>
        </Button>
        <AnimController autoPlay="0" handler="anim_qu_but">
            <ActionChain>
                <EfxWait delay="0.3"/>
                <ActionGroup>
                    <EfxMove from_x="285" from_y="-100" to_x="285" to_y="250" duration="0.1"/>
                    <EfxColor duration="0.1" from="00FFFFFF" to="FFFFFFFF"/>
                    <EfxVisible visible="1"/>
                </ActionGroup>
            </ActionChain>
        </AnimController>
    </Widget>

    <Widget name="button_3" x="285" y="530" visible="0">
        <Button name="item_PuzzlesMenu" x="0" y="0" image="/play_menu/button_all_notpressed.png" sound="button_devilslot_01" show_if="($config.options_kids_safe != 1) * $device.getStore != steam">

            <Click cmd="layout" param="SlotMachine">
                <Param value="crossfade"/>
            </Click>
            <Text x="58" y="48" width="280" height="40" font="medium" text="PLAYMENU_SCR_SLOTMACHINE" align="C" color="FFFFFFFF"/>

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

            <Image x="-60" y="-10" image="pic_slot_machine.png"/>
        </Button>

        <Button x="0" y="0" image="/play_menu/button_all_notpressed_d.png" show_if="($config.options_kids_safe == 1)">
            <Click cmd="msg_box" param="MESSAGE_SLOT_MACHINE_KIDS_SAFE"/>

            <Text x="58" y="43" width="280" height="40" font="medium" text="PLAYMENU_SCR_SLOTMACHINE" align="C" color="FFFFFFFF"/>

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

            <Image x="-60" y="-10" image="pic_slot_machine_d.png"/>
        </Button>

        <AnimController autoPlay="0" handler="anim_pu_but">
            <ActionChain>
                <EfxWait delay="0.1"/>
                <ActionGroup>
                    <EfxMove from_x="285" from_y="-100" to_x="285" to_y="530" duration="0.1"/>
                    <EfxColor duration="0.1" from="00FFFFFF" to="FFFFFFFF"/>
                    <EfxVisible visible="1"/>
                </ActionGroup>
            </ActionChain>
        </AnimController>

    </Widget>

    <Widget name="button_5" x="285" y="390" visible="0">
        <Button name="item_TreeQuests" x="0" y="0" sound="button_encyclopedia_01" image="button_all_notpressed.png">
            <State name="selected" image="/play_menu/button_all_pressed.png"/>
            <Click handler="cur_layout" cmd="on_right" param="TreeQuests"/>
            <Text name="text_minigames" x="85" y="48" width="250" height="40" font="medium" text="PLAYMENU_SCR_QUESTS_AND_PUZZLES" align="C" color="FFFFFFFF"/>

            <Properties>
                <Property key="sfx_btn_hover">button_hover</Property>
            </Properties>
            <Image name="under_encyclopedia" x="-60" y="-10" image="pic_quests_puzzles.png"/>
        </Button>
        <AnimController autoPlay="0" handler="anim_mg_but">
            <ActionChain>
                <EfxWait delay="0.2"/>
                <ActionGroup>
                    <EfxMove from_x="285" from_y="-100" to_x="285" to_y="390" delay="0.0" duration="0.1"/>
                    <EfxColor duration="0.1" from="00FFFFFF" to="FFFFFFFF"/>
                    <EfxVisible visible="1"/>
                </ActionGroup>
            </ActionChain>
        </AnimController>
    </Widget>


    <GPPanel x="615" y="660">
        <GPPanelIcon x="0" y="0" alias="ls" auto_visible="0"/>
        <GPPanelIcon x="40" y="0" alias="btn_a" auto_visible="0"/>
    </GPPanel>


    <!--Particles name="ps_star1" x="100" y="200" file="/main_menu/win8_far_star.ps" />
    <Particles name="ps_star2" x="20" y="500" file="/main_menu/win8_far_star.ps" />
    <Particles name="ps_star3" x="400" y="20" file="/main_menu/win8_far_star.ps" />
    <Particles name="ps_star4" x="700" y="750" file="/main_menu/win8_far_star.ps" />
    <Particles name="ps_star5" x="1250" y="30" file="/main_menu/win8_far_star.ps" /-->

        <Widget name="right" x="760" y="0" width="650" height="750"/>

        <Widget name="status_bar" x="0" y="12" width="1366" height="50" xml="/status_bar/play_menu_status_bar.xml"/>
        <Widget name="toolbar" x="5" y="40" xml="/toolbar/toolbar_playmenu.xml"/>

    </Layout>
