<?xml version="1.0" encoding="utf-8" ?>
<Layout>

    <SelectorController>
        <Action type="1" axis="2" use_val="1" val="-0.75" cmd="left"/>
        <Action type="1" axis="2" use_val="1" val="0.75" cmd="right"/>
        <Action type="1" axis="3" use_val="1" val="-0.75" cmd="up"/>
        <Action type="1" axis="3" use_val="1" val="0.75" cmd="down"/>
        <Action type="0" btn="9" cmd="press"/>

        <Container class="GPGraphContainer"/>

        <Item path="../field/*/promo_button" scale="5 7" />

        <Item path="../field/*/quest_hween/play" scale="5 7" />
        <Item path="../field/*/quest_hween/locked" scale="5 7" def="1"/>
        <Item path="../field/*/quest_hween_reset" scale="5 7" />

        <Item path="../field/*/puzzle_witch/play" scale="5 7"/>
        <Item path="../field/*/puzzle_witch/locked" scale="5 7"/>
        <Item path="../field/*/puzzle_witch_reset" scale="5 7" />

        <Item path="../field/*/puzzle_pumpkin/play" scale="5 7"/>
        <Item path="../field/*/puzzle_pumpkin/locked" scale="5 7"/>
        <Item path="../field/*/puzzle_pumpkin_reset" scale="5 7" />
    </SelectorController>

    <GPPanel x="405" y="605">
        <GPPanelIcon x="0" y="0" alias="rs" auto_visible="0"/>
        <GPPanelIcon x="40" y="0" alias="btn_rb" auto_visible="0"/>
    </GPPanel>

    <ScrollView name="field" x="-10" y="50" width="540" height="540" y_offset="13" clip="1">
        <EpisodePromoWidget name="promo_widget" promo_type="episodes_quests" x="15" y="0" width="450" height="125" visible="0" replaceable="true">
            <Button name="promo_button" x="44" y="19" image="/puzzles_menu/puzzle_board.png">
                <Image name="promo_image" x="-54" y="-3" width="120" height="86" content_mode="AspectFit" image="/puzzles_menu/df.png"/>
                <Text name="promo_header" x="85" y="5" width="250" height="15" font="author" text="Doodle Devil" align="W" color="FFffae16"/>
                <Text name="promo_body" x="85" y="44" width="270" height="20" font="author" text="Over 9000 elements" align="W" color="FFFFFFFF"/>
            </Button>

            <Widget x="-20" y="10" visible="1">
                <AnimController autoPlay="1">
                    <ActionChain>
                        <EfxVisible visible="0"/>
                        <EfxWait range="0.1 0.2"/>
                        <ActionGroup>
                            <EfxScaleXY duration="0.5" from_x="0.6" from_y="0.6" to_x="1.0" to_y="1.0" modifier="bounce"/>
                            <EfxVisible visible="1"/>
                        </ActionGroup>
                    </ActionChain>
                </AnimController>
            </Widget>
        </EpisodePromoWidget>

        <Image x="50" y="0" image="/puzzles_menu/under_section.png">
            <Text x="130" y="5" width="150" height="30" font="font" text="PLAYMENU_SCR_QUESTS" align="C" color="FFd48d47" />
        </Image>

        <!-- quest_hween -->
        <EpisodeControl name="quest_hween" x="15" y="100" width="520" height="125">
            <Button name="play" x="44" y="19" image="/puzzles_menu/puzzle_board.png">
                <State name="ready" image="/puzzles_menu/puzzle_board_ready.png"/>

                <Text name="title" x="90" y="8" width="260" height="26" font="author" text="QUESTS_SCR_DGIFTS" align="W" color="FFffae16" />
                <Text name="desc" x="90" y="45" width="260" height="40" font="author" text="QUESTS_SCR_DGIFTS_DESC" align="W" color="FFFFFFFF" />

                <SkeletonWidget name="hween_spine" x="23" y="47" data="data/spine/dd_Quest_hero.json" atlas="play_menu/spine/dd_Quest_hero.atlas" base_scale="2" zorder="2000" >
                    <Scenario>
                        [
                        {
                        "id": "play",
                        "ani": "idle",
                        "loop": true
                        },
                        {
                        "id": "timeScale",
                        "scale": 0.5
                        }
                        ]
                    </Scenario>
                </SkeletonWidget>

                <Image name="ready" x="340" y="5" image="/puzzles_menu/ready.png"/>

                <Widget name="unloced_progress" x="342" y="-7">
                    <GameProgressWidget x="0" y="0" game="quest_hween" xml="anim_progress.xml">
                        <Image x="0" y="0" image="/quests_menu/percent_bkg.png"/>
                        <Text name="value" x="0" y="-5" width="70" height="70" font="font" text="21%" color="FFFFFFFF" align="C" />
                    </GameProgressWidget>
                </Widget>

                <Button name="quest_hween_reset" x="361" y="0" image="/interface/reset.png" visible="0" xml="anim_reset.xml">
                    <Click cmd="reset" param="quest_hween" handler="cur_sublayout"/>
                </Button>

                <Click cmd="play_episode" param="quest_hween" handler="cur_sublayout"/>
            </Button>

            <Button name="locked" image="/puzzles_menu/puzzle_board_lock.png" x="44" y="19">

                <Text name="title" x="90" y="8" width="260" height="26" font="author" text="QUESTS_SCR_DGIFTS" align="W" color="FFffae16" />
                <Text name="desc" x="90" y="45" width="260" height="40" font="author" text="QUESTS_SCR_DGIFTS_DESC" align="W" color="FFFFFFFF" />

                <Image name="icon_buy" x="347" y="-8" image="/quests_menu/unlock_quest.png"/>

                <Image name="icon_locked" x="-54" y="-3" image="/play_menu/hero_lock.png" />

                <Event id="quest_unlock">
                    {
                    "game":"quest_hween",
                    "sellMode":["paid", "f2p", "blitz"],
                    "unlockMsg":"QUEST_PASS_EPISODE1_TO_UNLOCK",
                    }
                </Event>
            </Button>
        </EpisodeControl>

        <Image x="50" y="0"  image="/puzzles_menu/under_section.png">
            <Text x="130" y="5" width="150" height="30" font="font" text="PLAYMENU_SCR_PUZZLES" align="C" color="FFd48d47" />
        </Image>


        <!-- puzzle_witch -->
        <EpisodeControl name="puzzle_witch" x="15" y="200" width="520" height="125">
            <Button name="play" x="44" y="19" image="/puzzles_menu/puzzle_board.png">
                <State name="ready" image="/puzzles_menu/puzzle_board_ready.png"/>

                <Text name="title" x="90" y="8" width="260" height="26" font="author" text="PUZZLES_SCR_WITCH_CLOTH" align="W" color="FFffae16"/>
                <Text name="desc" x="90" y="45" width="260" height="40" font="author" text="PUZZLES_SCR_WITCH_CLOTH_DESC" align="W" color="FFFFFFFF"/>

                <SkeletonWidget name="witch_spine" x="15" y="46" data="data/spine/dd_puzzle_witch.json" atlas="play_menu/spine/dd_puzzle_witch.atlas" base_scale="2" zorder="2000" >
                    <Scenario>
                        [
                        {
                        "id": "play",
                        "ani": "idle",
                        "loop": true
                        },
                        {
                        "id": "timeScale",
                        "scale": 0.5
                        }
                        ]
                    </Scenario>
                </SkeletonWidget>
                <Image name="ready" x="340" y="5" image="/puzzles_menu/ready.png"/>

                <Widget name="unloced_progress" x="342" y="-7">
                    <GameProgressWidget game="puzzle_witch" xml="anim_progress.xml">
                        <Image x="0" y="0" image="/quests_menu/percent_bkg.png"/>
                        <Text name="value" x="0" y="-5" width="70" height="70" font="font" text="21%" color="FFFFFFFF" align="C" />
                    </GameProgressWidget>
                </Widget>

                <Button name="puzzle_witch_reset" x="358" y="0" image="/interface/reset.png" xml="anim_reset.xml">
                    <Click cmd="reset" param="puzzle_witch" handler="cur_sublayout">
                        <Param value="PUZ_MSG_RESET_CONFIRM"/>
                    </Click>
                </Button>

                <Click cmd="play_episode" param="puzzle_witch" handler="cur_sublayout">
                    <Param value="crossfade"/>
                </Click>
            </Button>

            <Button name="locked" image="/puzzles_menu/puzzle_board_lock.png" x="44" y="19" visible="1">

                <Text name="title" x="90" y="8" width="260" height="26" font="author" text="PUZZLES_SCR_WITCH_CLOTH" align="W" color="FFffae16"/>
                <Text name="desc" x="90" y="45" width="260" height="40" font="author" text="PUZZLES_SCR_WITCH_CLOTH_DESC" align="W" color="FFFFFFFF"/>
                <Image name="icon_locked" x="-54" y="-3" image="/play_menu/witch_lock.png"/>

                <Image name="icon_buy" x="347" y="-8" image="/quests_menu/unlock_quest.png"/>

                <Event id="quest_unlock">
                    {
                    "game":"puzzle_witch",
                    "sellMode":["paid", "f2p", "blitz"],
                    "unlockMsg":"QUEST_PASS_EPISODE1_TO_UNLOCK",
                    }
                </Event>
            </Button>
        </EpisodeControl>


        <!-- puzzle_pumpkin -->
        <EpisodeControl name="puzzle_pumpkin" x="15" y="300" width="520" height="125">
            <Button name="play" x="44" y="19" image="/puzzles_menu/puzzle_board.png">
                <State name="ready" image="/puzzles_menu/puzzle_board_ready.png"/>

                <Text name="title" x="90" y="8" width="260" height="26" font="author" text="PUZZLES_SCR_PUMPKIN" align="W" color="FFffae16"/>
                <Text name="desc" x="90" y="45" width="260" height="40" font="author" text="PUZZLES_SCR_PUMPKIN_DESC" align="W" color="FFFFFFFF"/>

                <SkeletonWidget name="pumpkin_spine" x="21" y="47" data="data/spine/dd_puzzle_pumpkin.json" atlas="play_menu/spine/dd_puzzle_pumpkin.atlas" base_scale="2" zorder="2000" >
                    <Scenario>
                        [
                        {
                        "id": "play",
                        "ani": "idle",
                        "loop": true
                        },
                        {
                        "id": "timeScale",
                        "scale": 0.5
                        }
                        ]
                    </Scenario>
                </SkeletonWidget>
                <Image name="ready" x="340" y="5" image="/puzzles_menu/ready.png"/>

                <Widget name="unloced_progress" x="342" y="-7">
                    <GameProgressWidget game="puzzle_pumpkin" xml="anim_progress.xml">
                        <Image x="0" y="0" image="/quests_menu/percent_bkg.png"/>
                        <Text name="value" x="0" y="-5" width="70" height="70" font="font" text="21%" color="FFFFFFFF" align="C" />
                    </GameProgressWidget>
                </Widget>

                <Button name="puzzle_pumpkin_reset" x="358" y="0" image="/interface/reset.png" xml="anim_reset.xml">
                    <Click cmd="reset" param="puzzle_pumpkin" handler="cur_sublayout">
                        <Param value="PUZ_MSG_RESET_CONFIRM"/>
                    </Click>
                </Button>

                <Click cmd="play_episode" param="puzzle_pumpkin" handler="cur_sublayout">
                    <Param value="crossfade"/>
                </Click>
            </Button>

            <Button name="locked" image="/puzzles_menu/puzzle_board_lock.png" x="44" y="19" visible="1">

                <Text name="title" x="90" y="8" width="260" height="26" font="author" text="PUZZLES_SCR_PUMPKIN" align="W" color="FFffae16"/>
                <Text name="desc" x="90" y="45" width="260" height="40" font="author" text="PUZZLES_SCR_PUMPKIN_DESC" align="W" color="FFFFFFFF"/>
                <Image x="-54" y="-3" image="/play_menu/pumpkin_new_lock.png"/>

                <Image name="icon_buy" x="347" y="-8" image="/quests_menu/unlock_quest.png"/>

                <Event id="quest_unlock">
                    {
                    "game":"puzzle_pumpkin",
                    "sellMode":["paid", "f2p", "blitz"],
                    "unlockMsg":"QUEST_PASS_EPISODE1_TO_UNLOCK",
                    }
                </Event>
            </Button>
        </EpisodeControl>
    </ScrollView>

    <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" />

    <ResetControl handler="reset" container="field" show="reset_show" hide="reset_hide"/>

    <AnimController autoPlay="0" handler="reset_all">
        <ActionChain>
            <EfxSendEvent event="reset_show"/>
            <EfxSendEvent event="reset_pane" param="hide_reset_quest"/>
        </ActionChain>
    </AnimController>

    <AnimController autoPlay="0" handler="reset_hide">
        <ActionChain>
            <EfxSendEvent event="reset_hide"/>
            <EfxSendEvent event="reset_pane" param="reset_quest"/>
        </ActionChain>
    </AnimController>

    <AnimController autoPlay="1">
        <ActionGroup>
            <EfxSendEvent event="back_pane" param="back_main"/>
            <EfxSendEvent event="reset_pane" param="btn_reset"/>
            <EfxSendEvent event="shop_pane" param="shop"/>
            <EfxSendEvent event="play_menu_right" param="quests_and_puzzles"/>
        </ActionGroup>
    </AnimController>

    <Properties>
        <Property key="btn_selected">item_TreeQuests</Property>
    </Properties>
</Layout>
