<?xml version="1.0" ?>
<FinalTemplateCollection>
    <Template templateName="CheckboxExitConfirmationTemplate">
        <InOutMovingControl time="0.4">
            <position x="0" y="600" />
            <sound soundId="window_moving" />
            <namedPositions>
                <position x="0" y="0" name="in" />
                <position x="0" y="600" name="out" />
            </namedPositions>
            <path templateName="DialogPathTemplate" />
            <messageReceiver name="Exit panel mover" />
            <children>
                <StaticTextureControl>
                    <position x="253" y="230" />
                    <texture textureId="exit_panel" />
                    <children>
                        <KeyListeningControl>
                            <keys>
                                <key value="VK_RETURN" receiver="lua:MainMenuFunc" message="Exit confirmation dialog yes pressed" />
                                <key value="VK_ESCAPE" receiver="lua:MainMenuFunc" message="Exit confirmation dialog no pressed" />
                            </keys>
                        </KeyListeningControl>
                        <StaticTextControl valign="true">
                            <position x="147" y="120" />
                            <div fontName="White_Brown_16" resourceName="AreYouSureYouWantToExit" />
                        </StaticTextControl>
                        <CheckBoxControl>
                            <position x="45" y="55" />
                            <textures uncheckedNormalId="ExitCBnormal_unchecked" uncheckedActiveId="ExitCBactive_unchecked" checkedNormalId="ExitCBnormal_checked" checkedActiveId="ExitCBactive_checked" />
                            <variable name="isScreensaverEnabled" mode="global" defaultValue="false" />
                        </CheckBoxControl>
                        <MessageButtonControl>
                            <position x="32" y="-25" />
                            <textures normalId="yes_normal" activeId="yes_active" pressedId="yes_pressed" />
                            <message value="Exit confirmation dialog yes pressed" receiver="post:lua:MainMenuFunc" />
                        </MessageButtonControl>
                        <MessageButtonControl>
                            <position x="172" y="-25" />
                            <textures normalId="no_normal" activeId="no_active" pressedId="no_pressed" />
                            <message value="Exit confirmation dialog no pressed" receiver="lua:MainMenuFunc" />
                        </MessageButtonControl>
                    </children>
                </StaticTextureControl>
            </children>
        </InOutMovingControl>
    </Template>
    <Template templateName="ExitConfirmationTemplate">
        <InOutMovingControl time="0.4">
            <position x="0" y="600" />
            <sound soundId="window_moving" />
            <namedPositions>
                <position x="0" y="0" name="in" />
                <position x="0" y="600" name="out" />
            </namedPositions>
            <path templateName="DialogPathTemplate" />
            <messageReceiver name="Exit panel mover" />
            <children>
                <KeyListeningControl>
                    <keys>
                        <key value="VK_RETURN" receiver="lua:MainMenuFunc" message="Exit confirmation dialog yes pressed" />
                        <key value="VK_ESCAPE" receiver="lua:MainMenuFunc" message="Exit confirmation dialog no pressed" />
                    </keys>
                </KeyListeningControl>
                <StaticTextureControl>
                    <position x="253" y="250" />
                    <texture textureId="two_buttons_panel" />
                    <children>
                        <StaticTextControl valign="true">
                            <position x="147" y="100" />
                            <div fontName="Brown_16" resourceName="AreYouSureYouWantToExit" />
                        </StaticTextControl>
                        <MessageButtonControl>
                            <position x="32" y="-25" />
                            <textures normalId="yes_normal" activeId="yes_active" pressedId="yes_pressed" />
                            <message value="Exit confirmation dialog yes pressed" receiver="post:lua:MainMenuFunc" />
                        </MessageButtonControl>
                        <MessageButtonControl>
                            <position x="172" y="-25" />
                            <textures normalId="no_normal" activeId="no_active" pressedId="no_pressed" />
                            <message value="Exit confirmation dialog no pressed" receiver="lua:MainMenuFunc" />
                        </MessageButtonControl>
                    </children>
                </StaticTextureControl>
            </children>
        </InOutMovingControl>
    </Template>
    <Template templateName="PlayersDialogLinksTemplate">
        <StaticTextControl>
            <position x="160" y="39" />
            <div fontName="Orange_15">
                <line>{link normalFontName=&quot;Orange_15&quot; activeFontName=&quot;Orange_15&quot; receiver=&quot;lua:MainMenuFunc&quot; message=&quot;Change player link pressed&quot; activeSound=&quot;text_button_active&quot; pressedSound=&quot;text_button_pressed&quot;}textResource:WelcomePlayer{/link}</line>
            </div>
            <div fontName="White_12">
                <line>{link yShift=&quot;6&quot; normalFontName=&quot;White_12&quot; activeFontName=&quot;White_14&quot; receiver=&quot;lua:MainMenuFunc&quot; message=&quot;Change player link pressed&quot; activeSound=&quot;text_button_active&quot; pressedSound=&quot;text_button_pressed&quot;}textResource:ClickHereToChangePlayer{/link}</line>
            </div>
        </StaticTextControl>
    </Template>
    <Template templateName="MainMenuTankTemplate">
        <FixedChildrenListControl>
            <LongLifeParentControl>
                <storage receiverName="TankContentStorage" />
            </LongLifeParentControl>
        </FixedChildrenListControl>
    </Template>
    <Template templateName="GameLogoTemplate">
        <AlphaChangeControl start="1.0">
            <speed value="2.0" />
            <messageReceiver name="Game logo alpha changer" />
            <children>
                <GameLogoControl>
                    <effects>
                        <effect name="FishdomStartMenu" x="95" y="480" overTime="1.35" startTime="1.2" />
                        <effect name="FishdomMenuSecond" x="95" y="480" startTime="1.5" />
                    </effects>
                    <messageReceiver name="AnimatedLogo" />
                    <position x="0" y="600" />
                    <options showTime="0.7" delta="0.1" />
                    <bubble x="453" y="-176" up="bubbles_o" letterX="16" letterY="18" letter="letter_o" radius="3.0" />
                    <bubble x="537" y="-172" up="bubbles_m" letterX="18" letterY="16" letter="letter_m" radius="3.0" />
                    <bubble x="364" y="-167" up="bubbles_d" letterX="23" letterY="13" letter="letter_d" radius="3.0" />
                    <bubble x="277" y="-165" up="bubbles_h" letterX="17" letterY="17" letter="letter_h" radius="3.0" />
                    <bubble x="204" y="-161" up="bubbles_s" letterX="19" letterY="11" letter="letter_s" radius="3.0" />
                    <bubble x="49" y="-182" up="bubbles_f" letterX="24" letterY="16" letter="letter_f" radius="3.0" />
                    <bubble x="135" y="-168" up="bubbles_i" letterX="20" letterY="11" letter="letter_i" radius="3.0" />
                    <bubble x="632" y="-77" up="loading_tm" radius="2.0" />
                    <bubble x="152" y="-74" up="bubbles2" radius="1.0" />
                    <bubble x="150" y="-188" up="bubbles2" radius="1.0" />
                    <bubble x="522" y="-67" up="bubbles2" radius="1.0" />
                    <bubble x="652" y="-172" up="bubbles2" radius="1.0" />
                </GameLogoControl>
                <SwingingTextureControl angle="5.0">
                    <position x="700" y="800" />
                    <moveTo y="598" downTime="0.5" springSpeed="0.75" />
                    <texture textureId="loading_2" offsetTop="30" offsetLeft="55" />
                    <messageReceiver name="Swinging 2" />
                </SwingingTextureControl>
            </children>
        </AlphaChangeControl>
    </Template>
    <Template templateName="MoreGamesButtonTemplate">
        <StaticTextureControl>
            <position x="0" y="0" />
            <texture textureId="more_games_panel" />
            <children>
                <MessageButtonControl>
                    <position x="11" y="6" />
                    <textures normalId="more_games_normal" activeId="more_games_active" pressedId="more_games_pressed" />
                    <message receiver="lua:MainMenuFunc" value="Main menu more games button pressed" />
                </MessageButtonControl>
            </children>
        </StaticTextureControl>
    </Template>
    <Template templateName="MoreGamesTemplate">
        <ContextHelpServerControl>
            <children>
                <ZGlassControl />
                <KeyListeningControl>
                    <keys>
                        <key value="VK_ESCAPE" receiver="lua:MainMenuFunc" message="More games exit" />
                    </keys>
                </KeyListeningControl>
                <LinkWatcherControl links="../screenbranding/advertisement/links.xml">
                    <messageReceiver name="LinkWatcher" />
                </LinkWatcherControl>
                <StretchBackgroundControl>
                    <texture id="loading_background" />
                    <messageReceiver name="More games backgroung" />
                </StretchBackgroundControl>
                <ContextHelpClientControl>
                    <times initial="0.1" reshow="0.0" />
                    <toolTipToShow name="FishdomTextTemplate" />
                    <controlToMonitor>
                        <ButtonWithEffectControl>
                            <position x="76" y="350" />
                            <show delay="0.1" speed="2.0" />
                            <textures normalId="more_games_fishdom" activeId="more_games_fishdom" pressedId="more_games_fishdom" />
                            <message receiver="post:LinkWatcher" value="Fishdom" />
                            <variable name="temp:Advertsement" onOverValue="1" />
                        </ButtonWithEffectControl>
                    </controlToMonitor>
                </ContextHelpClientControl>
                <ContextHelpClientControl>
                    <times initial="0.1" reshow="0.0" />
                    <toolTipToShow name="FishdomH2OTextTemplate" />
                    <controlToMonitor>
                        <ButtonWithEffectControl>
                            <position x="300" y="350" />
                            <show delay="0.2" speed="2.0" />
                            <textures normalId="more_games_h2o" activeId="more_games_h2o" pressedId="more_games_h2o" />
                            <message receiver="post:LinkWatcher" value="Fishdom H2O" />
                            <variable name="temp:Advertsement" onOverValue="2" />
                        </ButtonWithEffectControl>
                    </controlToMonitor>
                </ContextHelpClientControl>
                <ContextHelpClientControl>
                    <times initial="0.1" reshow="0.0" />
                    <toolTipToShow name="GardenscapesTemplate" />
                    <controlToMonitor>
                        <ButtonWithEffectControl>
                            <position x="519" y="350" />
                            <show delay="0.3" speed="2.0" />
                            <textures normalId="more_games_gardenscapes" activeId="more_games_gardenscapes" pressedId="more_games_gardenscapes" />
                            <message receiver="post:LinkWatcher" value="Gardenscapes" />
                            <variable name="temp:Advertsement" onOverValue="3" />
                        </ButtonWithEffectControl>
                    </controlToMonitor>
                </ContextHelpClientControl>
                <ContextHelpClientControl>
                    <times initial="0.1" reshow="0.0" />
                    <toolTipToShow name="SpookyTemplate" />
                    <controlToMonitor>
                        <ButtonWithEffectControl>
                            <position x="76" y="173" />
                            <show delay="0.2" speed="2.0" />
                            <textures normalId="more_games_spooky" activeId="more_games_spooky" pressedId="more_games_spooky" />
                            <message receiver="post:LinkWatcher" value="Spooky" />
                            <variable name="temp:Advertsement" onOverValue="4" />
                        </ButtonWithEffectControl>
                    </controlToMonitor>
                </ContextHelpClientControl>
                <ContextHelpClientControl>
                    <times initial="0.1" reshow="0.0" />
                    <toolTipToShow name="HarvestTemplate" />
                    <controlToMonitor>
                        <ButtonWithEffectControl>
                            <position x="300" y="173" />
                            <show delay="0.3" speed="2.0" />
                            <textures normalId="more_games_royal_envoy" activeId="more_games_royal_envoy" pressedId="more_games_royal_envoy" />
                            <message receiver="post:LinkWatcher" value="Harvest" />
                            <variable name="temp:Advertsement" onOverValue="5" />
                        </ButtonWithEffectControl>
                    </controlToMonitor>
                </ContextHelpClientControl>
                <ContextHelpClientControl>
                    <times initial="0.1" reshow="0.0" />
                    <toolTipToShow name="FrostyTemplate" />
                    <controlToMonitor>
                        <ButtonWithEffectControl>
                            <position x="519" y="173" />
                            <show delay="0.4" speed="2.0" />
                            <textures normalId="more_games_frosty" activeId="more_games_frosty" pressedId="more_games_frosty" />
                            <message receiver="post:LinkWatcher" value="Frosty" />
                            <variable name="temp:Advertsement" onOverValue="6" />
                        </ButtonWithEffectControl>
                    </controlToMonitor>
                </ContextHelpClientControl>
                <ContextHelpClientControl>
                    <times initial="0.1" reshow="0.0" />
                    <toolTipToShow name="PlayOnTemplate" />
                    <controlToMonitor>
                        <MessageButtonControl>
                            <position x="260" y="18" />
                            <textures normalId="try_more_normal" activeId="try_more_active" pressedId="try_more_pressed" />
                            <message receiver="post:LinkWatcher" value="More games button" />
                        </MessageButtonControl>
                    </controlToMonitor>
                </ContextHelpClientControl>
                <StaticTextureControl>
                    <position x="162" y="12" />
                    <texture textureId="more_games_starfish" />
                </StaticTextureControl>
                <StaticTextureControl>
                    <position x="505" y="6" />
                    <texture textureId="more_games_dragon" />
                </StaticTextureControl>
                <InOutMovingControl time="0.4">
                    <position x="3" y="-39" />
                    <namedPositions>
                        <position x="3" y="3" name="in" />
                        <position x="3" y="-39" name="out" />
                    </namedPositions>
                    <path templateName="QuadraticPathTemplate" />
                    <messageReceiver name="More games back panel mover" />
                    <children>
                        <StaticTextureControl>
                            <texture textureId="more_games_back_panel" />
                            <children>
                                <MessageButtonControl>
                                    <position x="8" y="2" />
                                    <textures normalId="more_games_back_normal" activeId="more_games_back_active" pressedId="more_games_back_pressed" />
                                    <message receiver="lua:MainMenuFunc" value="More games exit" />
                                </MessageButtonControl>
                            </children>
                        </StaticTextureControl>
                    </children>
                </InOutMovingControl>
                <InOutMovingControl time="0.4">
                    <position x="172" y="600" />
                    <namedPositions>
                        <position x="172" y="545" name="in" />
                        <position x="172" y="600" name="out" />
                    </namedPositions>
                    <path templateName="QuadraticPathTemplate" />
                    <messageReceiver name="More games title panel mover" />
                    <children>
                        <StaticTextureControl>
                            <texture textureId="more_games_title_panel" />
                            <children>
                                <StaticTextControl valign="true">
                                    <position x="227" y="23" />
                                    <div fontName="White_25" align="center">
                                        <line>More {image dy=&quot;1&quot;}more_games_playrix_logo{/image} Games</line>
                                    </div>
                                </StaticTextControl>
                            </children>
                        </StaticTextureControl>
                    </children>
                </InOutMovingControl>
            </children>
        </ContextHelpServerControl>
    </Template>
    <Template templateName="MainMenuScreensaverButtonTemplate">
        <ContextHelpClientControl>
            <position x="0" y="0" />
            <times initial="0.1" reshow="0.0" />
            <toolTipToShow name="MainMenuScreensaverButton" />
            <controlToMonitor>
                <MessageButtonControl>
                    <position x="0" y="0" />
                    <textures normalId="screensaver_normal" activeId="screensaver_active" pressedId="screensaver_pressed" />
                    <message value="Main menu screensaver button pressed" receiver="lua:MainMenuFunc" />
                </MessageButtonControl>
            </controlToMonitor>
        </ContextHelpClientControl>
    </Template>
    <Template templateName="MainMenuExtrasButtonTemplate">
        <ContextHelpClientControl>
            <position x="0" y="0" />
            <times initial="0.1" reshow="0.0" />
            <toolTipToShow name="MainMenuExtrasButton" />
            <controlToMonitor>
                <MessageButtonControl>
                    <position x="0" y="0" />
                    <textures normalId="extras_normal" activeId="extras_active" pressedId="extras_pressed" />
                    <message value="Extras button pressed" receiver="lua:MainMenuFunc" />
                </MessageButtonControl>
            </controlToMonitor>
        </ContextHelpClientControl>
    </Template>
    <Template templateName="MainMenuTemplate">
        <ContextHelpServerControl>
            <children>
                <MutableChildrenListControl>
                    <messageReceiver name="Current tank content" />
                </MutableChildrenListControl>
                <ZGlassControl />
                <KeyListeningControl>
                    <keys>
                        <key value="VK_RETURN" receiver="lua:MainMenuFunc" message="Main menu start button pressed" />
                        <key value="VK_ESCAPE" receiver="lua:MainMenuFunc" message="Main menu exit button pressed" />
                    </keys>
                </KeyListeningControl>
                <AlphaChangeControl start="1.0">
                    <speed value="0.0" />
                    <messageReceiver name="Main menu alpha changer" />
                    <children>
                        <InOutMovingControl time="0.5">
                            <position x="3" y="600" />
                            <namedPositions>
                                <position x="3" y="558" name="in" />
                                <position x="3" y="600" name="out" />
                            </namedPositions>
                            <path templateName="QuadraticPathTemplate" />
                            <messageReceiver name="More games panel mover" />
                            <children>
                                <VariableDrivenSwitchControl>
                                    <variable name="temp:advertisement" type="bool" scope="global" defaultValue="false" />
                                    <states>
                                        <state default="true" templateName="EmptyTemplate" />
                                        <state variableValue="true" templateName="MoreGamesButtonTemplate" />
                                    </states>
                                </VariableDrivenSwitchControl>
                            </children>
                        </InOutMovingControl>
                        <InOutMovingControl time="0.5">
                            <position x="0" y="-130" />
                            <namedPositions>
                                <position x="0" y="0" name="in" />
                                <position x="0" y="-130" name="out" />
                            </namedPositions>
                            <path templateName="BluePanelPathTemplate" />
                            <messageReceiver name="Main menu blue panel mover" />
                            <children>
                                <StaticTextureControl>
                                    <position x="121" y="0" />
                                    <texture textureId="main_menu_blue_bar" />
                                    <children>
                                        <RectangleFrameControl width="295" height="36">
                                            <position x="10" y="0" />
                                            <children>
                                                <BubblesBackGround>
                                                    <position x="20" y="-30" />
                                                    <description textureId="bubble_blue" emitters="10" width="265" height="100" minPause="3.0" maxPause="6.0" minSpeed="20.0" maxSpeed="60.0" amplitude="5.0" period="10.0" blendMode="alpha" />
                                                    <scale>
                                                        <range min="0.00" max="0.00" />
                                                        <range min="0.05" max="0.10" />
                                                        <range min="0.10" max="0.15" />
                                                        <range min="0.15" max="0.20" />
                                                        <range min="0.10" max="0.15" />
                                                        <range min="0.05" max="0.10" />
                                                        <range min="0.00" max="0.00" />
                                                    </scale>
                                                </BubblesBackGround>
                                            </children>
                                        </RectangleFrameControl>
                                        <TemplateInstanceControl>
                                            <base templateName="PlayersDialogLinksTemplate" />
                                        </TemplateInstanceControl>
                                    </children>
                                </StaticTextureControl>
                            </children>
                        </InOutMovingControl>
                        <InOutMovingControl time="0.5">
                            <position x="0" y="-130" />
                            <namedPositions>
                                <position x="0" y="0" name="in" />
                                <position x="0" y="-130" name="out" />
                            </namedPositions>
                            <path templateName="MainPanelPathTemplate" />
                            <messageReceiver name="Main menu bottom panel mover" />
                            <children>
                                <StaticTextureControl>
                                    <position x="0" y="0" />
                                    <texture textureId="main_screen_bottom_panel" />
                                    <children>
                                        <ContextHelpClientControl>
                                            <position x="0" y="0" />
                                            <times initial="0.1" reshow="0.0" />
                                            <toolTipToShow name="MainMenuExitButton" />
                                            <controlToMonitor>
                                                <MessageButtonControl>
                                                    <position x="20" y="10" />
                                                    <textures normalId="exit_normal" activeId="exit_active" pressedId="exit_pressed" />
                                                    <message value="Main menu exit button pressed" receiver="lua:MainMenuFunc" />
                                                </MessageButtonControl>
                                            </controlToMonitor>
                                        </ContextHelpClientControl>
                                        <VariableDrivenSwitchControl>
                                            <position x="458" y="10" />
                                            <variable name="temp:ExtrasScreen enabled" type="bool" scope="global" defaultValue="false" />
                                            <states>
                                                <state variableValue="false" templateName="MainMenuScreensaverButtonTemplate" />
                                                <state variableValue="true" templateName="MainMenuExtrasButtonTemplate" />
                                            </states>
                                        </VariableDrivenSwitchControl>
                                        <ContextHelpClientControl>
                                            <position x="0" y="0" />
                                            <times initial="0.1" reshow="0.0" />
                                            <toolTipToShow name="MainMenuOptionsButton" />
                                            <controlToMonitor>
                                                <MessageButtonControl>
                                                    <position x="562" y="10" />
                                                    <textures normalId="options_normal" activeId="options_active" pressedId="options_pressed" />
                                                    <message value="Main menu options button pressed" receiver="lua:MainMenuFunc" />
                                                </MessageButtonControl>
                                            </controlToMonitor>
                                        </ContextHelpClientControl>
                                        <ContextHelpClientControl>
                                            <position x="0" y="0" />
                                            <times initial="0.1" reshow="0.0" />
                                            <toolTipToShow name="MainMenuStartButton" />
                                            <controlToMonitor>
                                                <MessageButtonControl>
                                                    <position x="665" y="7" />
                                                    <textures normalId="start_normal" activeId="start_active" pressedId="start_pressed" />
                                                    <message value="Main menu start button pressed" receiver="lua:MainMenuFunc" />
                                                </MessageButtonControl>
                                            </controlToMonitor>
                                        </ContextHelpClientControl>
                                    </children>
                                </StaticTextureControl>
                            </children>
                        </InOutMovingControl>
                        <AlphaChangeControl start="1.0">
                            <position x="0" y="0" />
                            <speed value="2.0" />
                            <messageReceiver name="Main menu modal dialog alpha changer" />
                            <children>
                                <ModalDialogControl>
                                    <messageReceiver name="Main menu modal dialog" />
                                    <times starting="0.3" hiding="0.3" />
                                </ModalDialogControl>
                            </children>
                        </AlphaChangeControl>
                        <ModalDialogControl maxBlackAlpha="0">
                            <messageReceiver name="First name modal dialog" />
                            <times starting="0.3" hiding="0.3" />
                        </ModalDialogControl>
                    </children>
                </AlphaChangeControl>
            </children>
        </ContextHelpServerControl>
    </Template>
</FinalTemplateCollection>
