<?xml version="1.0" ?>
<FinalTemplateCollection>
    <Template templateName="ListboxActiveItemTemplate">
        <FixedChildrenListControl>
            <position x="0" y="[y]" />
            <children>
                <StaticTextControl>
                    <position x="105" y="218" />
                    <div fontName="Yellow_17">
                        <line>[value]</line>
                    </div>
                </StaticTextControl>
                <MessageButtonControl>
                    <position x="5" y="191" />
                    <textures normalId="players_stripe" activeId="players_stripe" pressedId="players_stripe" />
                    <sounds activeId="null" pressedId="text_button_pressed" />
                    <message value="click on [value]" receiver="[listboxId]" />
                </MessageButtonControl>
            </children>
        </FixedChildrenListControl>
    </Template>
    <Template templateName="ListboxNormalItemTemplate">
        <FixedChildrenListControl>
            <position x="0" y="[y]" />
            <children>
                <StaticTextControl>
                    <position x="105" y="218" />
                    <div fontName="White_15">
                        <line>[value]</line>
                    </div>
                </StaticTextControl>
                <MessageButtonControl>
                    <position x="5" y="191" />
                    <textures normalId="players_stripe" activeId="players_stripe" pressedId="players_stripe" />
                    <sounds activeId="null" pressedId="text_button_pressed" />
                    <message value="click on [value]" receiver="[listboxId]" />
                </MessageButtonControl>
            </children>
        </FixedChildrenListControl>
    </Template>
    <Template templateName="ListboxScrollTemplate">
        <VScrollPanelControl speed="250" storageMode="object" isButtonDispatcher="true">
            <position x="0" y="[scrollY]" />
            <checkpoints base="0" difference="[difference]" amount="[amount]" />
            <messageReceiver name="[vScrollName]" />
            <children>
                <MutableChildrenListControl>
                    <position x="0" y="0" />
                    <messageReceiver name="[mutableListName]" />
                </MutableChildrenListControl>
            </children>
        </VScrollPanelControl>
    </Template>
    <Template templateName="FirstPlayerNameEditTemplate">
        <InOutMovingControl time="0.4">
            <position x="0" y="500" />
            <sound soundId="window_moving" />
            <namedPositions>
                <position x="0" y="0" name="in" />
                <position x="0" y="500" name="out" />
            </namedPositions>
            <path templateName="DialogPathTemplate" />
            <messageReceiver name="EditBoxDialogMover" />
            <children>
                <StaticTextureControl>
                    <position x="253" y="230" />
                    <texture textureId="one_button_edit_panel" />
                    <children>
                        <StaticTextControl>
                            <position x="147" y="153" />
                            <div fontName="Orange_19" resourceName="EnterYourName" />
                        </StaticTextControl>
                        <FixedChildrenListControl>
                            <position x="147" y="84" />
                            <children>
                                <EditControl>
                                    <position x="0" y="1" />
                                    <messageReceiver name="Player name edit" />
                                    <width value="120" />
                                    <font name="White_15" />
                                    <cursor width="2" color="#FFFFFF" />
                                    <disallowedSymbols template="true" textFormat="true" dos="false" extra="@" />
                                </EditControl>
                            </children>
                        </FixedChildrenListControl>
                        <FixedChildrenListControl>
                            <position x="0" y="0" />
                            <children>
                                <KeyListeningControl>
                                    <position x="0" y="0" />
                                    <keys>
                                        <key value="VK_RETURN" receiver="lua:GameFunc" message="Enter your name ok pressed" />
                                    </keys>
                                </KeyListeningControl>
                                <MessageButtonControl>
                                    <position x="103" y="-25" />
                                    <textures normalId="ok_normal" activeId="ok_active" pressedId="ok_pressed" />
                                    <message value="Enter your name ok pressed" receiver="lua:GameFunc" />
                                </MessageButtonControl>
                            </children>
                        </FixedChildrenListControl>
                    </children>
                </StaticTextureControl>
            </children>
        </InOutMovingControl>
    </Template>
    <Template templateName="UpDownButtonsTemplate">
        <FixedChildrenListControl>
            <position x="0" y="0" />
            <children>
                <StaticTextureControl>
                    <position x="0" y="146" />
                    <texture textureId="players_arrows_bg" />
                </StaticTextureControl>
                <MaxScrollButtonControl>
                    <position x="-15" y="187" />
                    <textures normalId="players_arrow_up_normal" activeId="players_arrow_up_active" pressedId="players_arrow_up_pressed" disabledId="players_arrow_up_disabled" />
                    <flashing period="1.0" maxAlpha="0.7" />
                    <messageReceiver name="Players listbox vScroll max button" />
                </MaxScrollButtonControl>
                <MinScrollButtonControl>
                    <position x="-15" y="151" />
                    <textures normalId="players_arrow_down_normal" activeId="players_arrow_down_active" pressedId="players_arrow_down_pressed" disabledId="players_arrow_down_disabled" />
                    <flashing period="1.0" maxAlpha="0.7" />
                    <messageReceiver name="Players listbox vScroll min button" />
                </MinScrollButtonControl>
            </children>
        </FixedChildrenListControl>
    </Template>
    <Template templateName="NoArrowsTemplate">
        <StaticTextureControl>
            <position x="0" y="146" />
            <texture textureId="players_no_arrows" />
        </StaticTextureControl>
    </Template>
    <Template templateName="PlayersDialogTemplate">
        <FixedChildrenListControl>
            <position x="0" y="0" />
            <children>
                <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="Players list mover" />
                    <children>
                        <StaticTextureControl>
                            <position x="262" y="228" />
                            <texture textureId="players_panel_back" />
                            <children>
                                <RectangleFrameControl width="218" height="245">
                                    <position x="0" y="0" />
                                    <children>
                                        <BubblesBackGround>
                                            <position x="5" y="0" />
                                            <description textureId="bubble_blue" emitters="10" width="218" height="245" 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>
                                        <ListboxControl>
                                            <position x="-5" y="15" />
                                            <templates scrollTemplate="ListboxScrollTemplate" activeItemTemplate="ListboxActiveItemTemplate" normalItemTemplate="ListboxNormalItemTemplate" />
                                            <dimensions itemDistance="-41" minActiveIndex="0" maxActiveIndex="5" />
                                            <messageReceiver name="Players listbox" />
                                            <doubleClickMessage value="Players listbox double click" receiver="Players dispatcher" />
                                        </ListboxControl>
                                        <ExtendedWaterPlantControl fog="false">
                                            <position x="15" y="0" />
                                            <shopItem tankItemId="players_plant_left" />
                                            <icon textureId="players_plant_left" />
                                            <ground groundLine="5" />
                                            <layers>
                                                <mesh textureId="players_plant_left" x="0" y="0" maxShift="4.0" bottomStaticLine="5" meshWidth="1" meshHeight="3" />
                                            </layers>
                                        </ExtendedWaterPlantControl>
                                        <ExtendedWaterPlantControl fog="false">
                                            <position x="195" y="0" />
                                            <shopItem tankItemId="players_plant_right" />
                                            <icon textureId="players_plant_right" />
                                            <ground groundLine="5" />
                                            <layers>
                                                <mesh textureId="players_plant_right" x="0" y="0" maxShift="4.0" bottomStaticLine="5" meshWidth="1" meshHeight="3" />
                                            </layers>
                                        </ExtendedWaterPlantControl>
                                    </children>
                                </RectangleFrameControl>
                                <StaticTextureControl>
                                    <position x="0" y="0" />
                                    <texture textureId="players_panel_shadow" />
                                </StaticTextureControl>
                            </children>
                        </StaticTextureControl>
                        <StaticTextureControl>
                            <position x="245" y="167" />
                            <texture textureId="players_panel" />
                            <children>
                                <ScrollDispatcherControl>
                                    <position x="0" y="0" />
                                    <templates normal="UpDownButtonsTemplate" hidden="NoArrowsTemplate" />
                                    <messageReceiver name="Players listbox vScroll button dispatcher" />
                                </ScrollDispatcherControl>
                                <KeyListeningControl>
                                    <position x="0" y="0" />
                                    <keys>
                                        <key value="VK_RETURN" receiver="Players dispatcher" message="Players dialog select pressed" />
                                        <key value="VK_ESCAPE" receiver="Players dispatcher" message="Players dialog cancel pressed" />
                                        <key value="VK_F8" receiver="Players dispatcher" message="Delete all players" />
                                    </keys>
                                </KeyListeningControl>
                                <RectangleFrameControl width="180" height="29">
                                    <position x="65" y="330" />
                                    <children>
                                        <BubblesBackGround>
                                            <position x="0" y="-38" />
                                            <description textureId="bubble_blue" emitters="10" width="180" 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>
                                <StaticTextControl>
                                    <position x="158" y="351" />
                                    <div fontName="Orange_19">
                                        <line resourceName="Players" />
                                    </div>
                                </StaticTextControl>
                                <MessageButtonControl>
                                    <position x="246" y="227" />
                                    <textures normalId="players_new_normal" activeId="players_new_active" pressedId="players_new_pressed" />
                                    <message value="Players dialog new pressed" receiver="Players dispatcher" />
                                </MessageButtonControl>
                                <MessageButtonControl>
                                    <position x="246" y="152" />
                                    <textures normalId="players_rename_normal" activeId="players_rename_active" pressedId="players_rename_pressed" />
                                    <message value="Players dialog rename pressed" receiver="Players dispatcher" />
                                </MessageButtonControl>
                                <MessageButtonControl>
                                    <position x="246" y="78" />
                                    <textures normalId="players_delete_normal" activeId="players_delete_active" pressedId="players_delete_pressed" />
                                    <message value="Players dialog delete pressed" receiver="Players dispatcher" />
                                </MessageButtonControl>
                                <MessageButtonControl>
                                    <position x="47" y="-27" />
                                    <textures normalId="players_select_normal" activeId="players_select_active" pressedId="players_select_pressed" />
                                    <message value="Players dialog select pressed" receiver="Players dispatcher" />
                                </MessageButtonControl>
                                <MessageButtonControl>
                                    <position x="176" y="-27" />
                                    <textures normalId="cancel_normal" activeId="cancel_active" pressedId="cancel_pressed" />
                                    <message value="Players dialog cancel pressed" receiver="Players dispatcher" />
                                </MessageButtonControl>
                            </children>
                        </StaticTextureControl>
                    </children>
                </InOutMovingControl>
                <MutableChildrenListControl>
                    <position x="0" y="0" />
                    <messageReceiver name="Player name edit holder" />
                </MutableChildrenListControl>
                <PlayersDispatcherControl>
                    <position x="0" y="0" />
                    <messageReceiver name="Players dispatcher" />
                </PlayersDispatcherControl>
                <ModalDialogControl>
                    <position x="0" y="0" />
                    <messageReceiver name="Players modal dialog" />
                    <times starting="0.3" hiding="0.3" />
                </ModalDialogControl>
            </children>
        </FixedChildrenListControl>
    </Template>
</FinalTemplateCollection>
