<?xml version="1.0" encoding="utf-8" ?>
<Layout preload="Groups">
    <BkgImage name="bkg" x="0" y="0" image="/interface/bkg_4_3_book.jpg" />
    <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>
    
    <GPSharedActions>
        <Action type="0" btn="12" cmd="press"/>
    </GPSharedActions>

    <GPToolbarController>
        <Action type="0" btn="2" cmd="left"/>
        <Action type="0" btn="3" 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="../*/universe" scale="1 1" cID="def_circle"/>
        <Item path="../*/cloud" scale="1 1" cID="def_circle"/>
        <Item path="../*/btn_reset" scale="1 1" cID="def_circle"/>
        <Item path="../*/shop" scale="1 1" cID="def_circle"/>
        <Item path="../*/achievements" scale="1 1" cID="def_circle"/>
        <Item path="../*/lootsie" 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>   

    <Widget name="button_1" x="140" y="109" 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="30" y="30" width="270" 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="-100" y="-34" image="pic_main_game.png"/>
        </Button>
        <AnimController autoPlay="0" handler="anim_ep_but">
            <ActionChain>
                <EfxWait delay="0.3"/>
                <ActionGroup>
                    <EfxMove from_x="127" from_y="-100" to_x="127" to_y="100" duration="0.1"/>
                    <EfxColor duration="0.1" from="00FFFFFF" to="FFFFFFFF"/>
                    <EfxVisible visible="1"/>
                </ActionGroup>
                
            </ActionChain>    
        </AnimController>
    </Widget>

    <Widget name="button_2" x="140" y="231" 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"/>
            <Message name="DEMON_LAYOUT" value="from_button"/> <!-- any non-empty value will fit -->

			<DemonFirstTime name="promo" x="-19" y="86">
				<Image x="0" y="0" image="demons_new_feature.png"/>	
				<Text name="text_promo" x="53" y="-10" width="270" height="40" font="author" text="DEMON_BATTLE_PROMO" align="C" color="FFFFFFFF"/>
			</DemonFirstTime>
			
            <Text name="text_quests" x="30" y="35" width="270" 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="-70" y="-7" image="pic_demons.png"/>
        </Button> 

        <AnimController autoPlay="0" handler="anim_qu_but">
            <ActionChain>
                <EfxWait delay="0.2"/>
                <ActionGroup>
                    <EfxMove from_x="127" from_y="-100" to_x="127" to_y="220" duration="0.1"/>
                    <EfxColor duration="0.1" from="00FFFFFF" to="FFFFFFFF"/>
                    <EfxVisible visible="1"/>
                </ActionGroup>
            </ActionChain>
        </AnimController>
    </Widget>

 
 
 
    <Widget name="button_3" x="140" y="351" 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">
            <State name="selected" image="/play_menu/button_all_pressed.png"/>
            <Click cmd="layout" param="SlotMachine">
                <Param value="crossfade"/>
            </Click>
            
            <Text name="text_puzzles" x="30" y="35" width="270" height="40" font="medium" text="PLAYMENU_SCR_SLOTMACHINE" align="C" color="FFFFFFFF"/>
            
            <Properties>
                <Property key="sfx_btn_hover">button_hover</Property>
            </Properties>
            
            <Image name="under_slot_machine" x="-70" y="-6" 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 name="text_puzzles" x="30" y="35" width="270" height="40" font="medium" text="PLAYMENU_SCR_SLOTMACHINE" align="C" color="FFFFFFFF"/>
            <Properties>
                <Property key="sfx_btn_hover">button_hover</Property>
            </Properties>
            
            <Image name="under_slot_machine" x="-44" y="6" image="pic_slot_machine_d.png"/>
        </Button>
    
        <AnimController autoPlay="0" handler="anim_pu_but">
            <ActionChain>
                <EfxWait delay="0.0"/>

                <ActionGroup>
                    <EfxMove from_x="127" from_y="-100" to_x="127" to_y="466" duration="0.1"/>
                    <EfxColor duration="0.1" from="00FFFFFF" to="FFFFFFFF"/>
                    <EfxVisible visible="1"/>
                </ActionGroup>
            </ActionChain>
        </AnimController>

    </Widget>
    
    <Widget name="button_5" x="140" y="351" 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="58" y="34" width="230" 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="-70" y="-6" image="pic_quests_puzzles.png"/>
        </Button>            
        <AnimController autoPlay="0" handler="anim_mg_but">
            <ActionChain>
                <EfxWait delay="0.1"/>
                <ActionGroup>
                    <EfxMove from_x="127" from_y="-100" to_x="127" to_y="343" delay="0.0" duration="0.1"/>
                    <EfxColor duration="0.1" from="00FFFFFF" to="FFFFFFFF"/>
                    <EfxVisible visible="1"/>
                </ActionGroup>
            </ActionChain>
        </AnimController>
    </Widget>
    
    <!-- Encyclopedia -->
    <!-- 
    <Widget name="button_5" x="140" y="351" visible="0">
        <Button name="item_MiniGamesMenu" x="0" y="0" sound="button_encyclopedia_01" image="button_all_notpressed.png">
            <State name="selected" image="/play_menu/button_all_pressed.png"/>
            <Click cmd="layout" param="Encyclopedia">
                <Param value="crossfade"/>
            </Click>
            <Text name="text_minigames" x="38" y="34" width="270" height="40" font="medium" text="PLAYMENU_SCR_ENCYCLOPEDIA" align="C" color="FFFFFFFF"/>
            <Properties>
                <Property key="sfx_btn_hover">button_hover</Property>
            </Properties>
        </Button>
        <Image name="under_encyclopedia" x="-70" y="-6" image="pic_encyclopedia.png"/>    
        <AnimController autoPlay="0" handler="anim_mg_but">
            <ActionChain>
                <EfxWait delay="0.1"/>
                <ActionGroup>
                    <EfxMove from_x="127" from_y="-100" to_x="127" to_y="343" delay="0.0" duration="0.1"/>
                    <EfxColor duration="0.1" from="00FFFFFF" to="FFFFFFFF"/>
                    <EfxVisible visible="1"/>
                </ActionGroup>
            </ActionChain>
        </AnimController>
    </Widget>
    -->
    
    <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="510" y="24" width="512" height="600" />
    
    <Widget name="status_bar" x="0" y="12" width="1024" height="50" xml="/status_bar/play_menu_status_bar.xml"/>
    <Widget name="toolbar" x="-64" y="626" xml="/toolbar/toolbar_playmenu.xml"/>
    
    <GPPanel x="415" y="568">
        <GPPanelIcon x="0" y="0" alias="ls" auto_visible="0"/>
        <GPPanelIcon x="40" y="0" alias="btn_a" auto_visible="0"/>
    </GPPanel>
    
</Layout>
