<?xml version="1.0" encoding="utf-8" ?>
<Layout>
    <Widget name="tree_widget" x="9" y="61" width="510" height="600">

        <Image name="tree" x="2" y="-7" image="/tree_main_game/tree.png">
            <AnimController autoPlay="1" handler="aa">
                <ActionChain>
                    <EfxVisible visible="0"/>
                    <xxxEfxWait delay="0.01"/>
                    <ActionGroup>
                        <EfxColor duration="0.2" from="00FFFFFF" to="FFFFFFFF"/>
                        <EfxVisible visible="1"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>
        </Image>

        <Widget x="-13" y="64" width="500" height="450">
            <!-- progress_00.png is missing intentionally - this means the devil has not started coming through -->
            <DevilProgressImage name="devil_progress" image="/tree_main_game/progress_00.png" anchor="N"/>
        </Widget>

        <Text name="basic_title" x="131" y="7" width="216" height="40" font="font" text="TREE_MAIN_GAME_BASIC" align="C" color="FFFFFFFF"/>

        <!-- -->
        <EpisodeControl name="main_game_1" x="65" y="406" width="320" height="130" visible="0">
            <Button name="play" image="/tree_main_game/btn_play.png" x="20" y="30">
                <Text name="basic_title" x="30" y="10" width="216" height="40" font="font" text="MAINMENU_SCR_PLAY_BTN" align="C" color="FFFFFFFF"/>
                <!--Text name="basic_desc" x="30" y="21" width="216" height="40" font="author" text="TREE_MAIN_GAME_BASIC_DESC" align="C" color="FFFFFFFF"/-->
                <Event id="event_episode_1_click">{}</Event>
                <Click cmd="play_episode" param="main_game" handler="cur_sublayout">
                    <Param value="crossfade"/>
                </Click>
                <Properties>
                    <Property key="sfx_btn_hover">button_hover</Property>
                </Properties>

                <SelectorController>
                    <Action type="0" btn="9" cmd="press"/>
                    <Container class="GPOnceContainer"/>
                    <Item path=".." scale="1 1" alias="btn_rb" offset="240 0"/>
                </SelectorController>
            </Button>

            <!-- Progress for main_game_2 on purpose as main_game_1 is just 1 reaction. -->
            <GameProgressWidget name="progress" x="20" y="30" game="main_game_2">
                <Image x="0" y="0" image="/tree_main_game/percent_progress.png"/>
                <Text name="value" x="-7" y="-11" width="70" height="70" font="font" text="21%" color="FFFFFFFF" align="C"/>
            </GameProgressWidget>

            <!-- RESET -->
            <Widget name="unloced_reset" x="6" y="20">
                <Button name="reset" x="0" y="0" image="/interface/reset.png" visible="1" xml="anim_reset.xml">
                    <Click cmd="reset" param="main_game" handler="cur_sublayout"/>
                    <Properties>
                        <Property key="sfx_btn_hover">button_hover</Property>
                    </Properties>

                    <SelectorController>
                        <Action type="0" btn="8" cmd="press"/>
                        <Container class="GPOnceContainer"/>
                        <Item path=".." scale="1 1" alias="btn_lb" offset="64 16"/>
                    </SelectorController>
                </Button>
            </Widget>

            <AnimController autoPlay="1" handler="main_game_1">
                <ActionChain>
                    <EfxVisible visible="0"/>
                    <EfxWait delay="0"/>
                    <ActionGroup>
                        <EfxColor duration="0.2" from="00FFFFFF" to="FFFFFFFF"/>
                        <EfxScaleXY duration="0.2" from_x="0.5" from_y="0.5" to_x="1" to_y="1"/>
                        <EfxVisible visible="1"/>
                    </ActionGroup>
                </ActionChain>
            </AnimController>

            <AnimController name="anim_click_me" autoPlay="0">
                <ActionChain>
                    <EfxWait delay="4"/>
                    <EfxScaleXY duration="0.2" from_x="1.0" from_y="1.0" to_x="1.2" to_y="1.2" modifier="sindiminish"/>
                    <EfxScaleXY duration="0.2" from_x="1.2" from_y="1.2" to_x="1.0" to_y="1.0" modifier="sindiminish"/>
                    <EfxScaleXY duration="0.2" from_x="1.0" from_y="1.0" to_x="1.2" to_y="1.2" modifier="sindiminish"/>
                    <EfxScaleXY duration="0.2" from_x="1.2" from_y="1.2" to_x="1.0" to_y="1.0" modifier="sindiminish"/>
                </ActionChain>
            </AnimController>

        </EpisodeControl>

    </Widget>

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

    <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="main"/>
        </ActionGroup>
    </AnimController>

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