<?xml version="1.0" encoding="utf-8" ?> 
        
<!-- This script is run when the player wants to connect to the server. -->
<!-- It displays some text while trying to connect, and then
    kicks off the "ServerNameSelect" screen when finished. -->
<sector name="ServerConnect">
    
    <!-- Screen Entity -->
    <tServerConnect prototype="ScreenEntity">
        
        <!-- RENDER SECTION -->
        <Render>
            <sFont> Courier New </sFont>
            <vColor> {1, 1, 1, 1} </vColor>
            
            <!-- Menu Title -->
            <sTitle> Server Connect Screen </sTitle>
            <vTitlePos> (10, 10, 0, 0} </vTitlePos>
            <iTitleSize> 20 </iTitleSize>
            <tTitleRenderer prototype="ActionRenderText">
                <rText> sTitle </rText>
                <rPosition> vTitlePos </rPosition>
                <rColor> vColor </rColor>
                <rFont> sFont </rFont>
                <rSize> iTitleSize </rSize>
            </tTitleRenderer>
            
            <!-- Standard Message -->
            <sMsg> Attempting to connect to the server... </sMsg>
            <vMsgPos> {100, 100, 0, 0} </vMsgPos>
            <iMsgSize> 20 </iMsgSize>
            <tMsgRenderer prototype="ActionRenderText">
                <rText> sMsg </rText>
                <rPosition> vMsgPos </rPosition>
                <rColor> vColor </rColor>
                <rFont> sFont </rFont>
                <rSize> iMsgSize </rSize>
            </tMsgRenderer>
        </Render>
        <!-- END RENDER SECTION -->
        
        <!-- UPDATE SECTION -->
        <Update>
            <!-- Network Connect -->
            <tNetConnect prototype="ActionNetworkConnect">
                <rIsConnected> iIsConnected </rIsConnected>
                <rServerIP> iChosenIPAddress </rServerIP>
                <rSocket> iSocket </rSocket>
                <rWellKnownPort> iWellKnownPort </rWellKnownPort>
                <rPortNum> iPeerPort </rPortNum>
            </tNetConnect>
        </Update>
        <!-- END UPDATE SECTION -->
        
        <!-- React to the network connection. -->
        <tReactNetConnect prototype="ReactionNetConfirm">
            <tUnload prototype="ActionUnloadSector">
                <sSectorName>ServerConnect</sSectorName>
            </tUnload>
            <tLoad prototype="ActionLoad">
                <sFilename>ServerNameSelect.xml</sFilename>
                <iSynch>0</iSynch>
            </tLoad>
            <tLoad2 prototype="ActionLoad">
                <sFilename>ServerSysCode.xml</sFilename>
                <iSynch>0</iSynch>
            </tLoad2>
        </tReactNetConnect>
        
    </tServerConnect>
    
</sector>