Size

Namespace: PowerArgs
We found 10 examples in language CSharp for this search. You will see 47 fragments of code.
        public static Mesh CreateCuboid(float3 size)
        {
            return new Mesh
            {
                Vertices = new[]
                {
                    new float3 {x = +0.5f * size.x, y = -0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = +0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = +0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = -0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = -0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = +0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = +0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = -0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = -0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = +0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = +0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = -0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = -0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = +0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = +0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = -0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = +0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = +0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = +0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = +0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = -0.5f * size.y, z = -0.5f * size.z},
                    new float3 {x = +0.5f * size.x, y = -0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = -0.5f * size.y, z = +0.5f * size.z},
                    new float3 {x = -0.5f * size.x, y = -0.5f * size.y, z = -0.5f * size.z}
                },

                Triangles = new ushort[]
                {
                    // front face
                    0, 2, 1, 0, 3, 2,

                    // right face
                    4, 6, 5, 4, 7, 6,

                    // back face
                    8, 10, 9, 8, 11, 10,

                    // left face
                    12, 14, 13, 12, 15, 14,

                    // top face
                    16, 18, 17, 16, 19, 18,

                    // bottom face
                    20, 22, 21, 20, 23, 22

                },

                Normals = new[]
                {
                    new float3(0, 0, 1),
                    new float3(0, 0, 1),
                    new float3(0, 0, 1),
                    new float3(0, 0, 1),
                    new float3(1, 0, 0),
                    new float3(1, 0, 0),
                    new float3(1, 0, 0),
                    new float3(1, 0, 0),
                    new float3(0, 0, -1),
                    new float3(0, 0, -1),
                    new float3(0, 0, -1),
                    new float3(0, 0, -1),
                    new float3(-1, 0, 0),
                    new float3(-1, 0, 0),
                    new float3(-1, 0, 0),
                    new float3(-1, 0, 0),
                    new float3(0, 1, 0),
                    new float3(0, 1, 0),
                    new float3(0, 1, 0),
                    new float3(0, 1, 0),
                    new float3(0, -1, 0),
                    new float3(0, -1, 0),
                    new float3(0, -1, 0),
                    new float3(0, -1, 0)
                },

                UVs = new[]
                {
                    new float2(1, 0),
                    new float2(1, 1),
                    new float2(0, 1),
                    new float2(0, 0),
                    new float2(1, 0),
                    new float2(1, 1),
                    new float2(0, 1),
                    new float2(0, 0),
                    new float2(1, 0),
                    new float2(1, 1),
                    new float2(0, 1),
                    new float2(0, 0),
                    new float2(1, 0),
                    new float2(1, 1),
                    new float2(0, 1),
                    new float2(0, 0),
                    new float2(1, 0),
                    new float2(1, 1),
                    new float2(0, 1),
                    new float2(0, 0),
                    new float2(1, 0),
                    new float2(1, 1),
                    new float2(0, 1),
                    new float2(0, 0)
                },
                BoundingBox = new AABBf(-0.5f * size, 0.5f*size)
            };
        }

        public static Mesh CreateCylinder(float radius, float height, int segments)
        {
            return CreateConeFrustum(radius, radius, height, segments);
        }

        public static Mesh CreateCone(float radius, float height, int segments)
        {
            return CreateConeFrustum(radius, 0.0f, height, segments);
        }

        public static Mesh CreateConeFrustum(float radiuslower, float radiusupper, float height, int segments)
        {
            throw new NotImplementedException();
        }

        public static Mesh CreatePyramid(float baselen, float height)
        {
            throw new NotImplementedException();
        }
        public static Mesh CreateTetrahedron(float edgelen)
        {
            throw new NotImplementedException();
        }


        /// <summary>
        /// Adds an edge with the associated data.
        /// </summary>
        public uint AddEdge(uint vertex1, uint vertex2, uint data)
        {
            if (_readonly) { throw new Exception("Graph is readonly."); }
            if (vertex1 == vertex2) { throw new ArgumentException("Given vertices must be different."); }
            _vertices.EnsureMinimumSize(Math.Max(vertex1, vertex2) * VERTEX_SIZE + EDGE_COUNT + 1);
            if (_edgeDataSize != 1) { throw new ArgumentOutOfRangeException("Dimension of data doesn't match."); }
            
            if ((_nextEdgePointer / _edgeSize) > uint.MaxValue) { throw new Exception($"Cannot add another edge, this graph can only handle a max of {uint.MaxValue} edges.");}
            
            var vertexPointer = vertex1 * VERTEX_SIZE;
            var edgeCount = _vertices[vertexPointer + EDGE_COUNT];
            var edgePointer = _vertices[vertexPointer + FIRST_EDGE] * _edgeSize;
            var edgeId = uint.MaxValue;

            if (edgeCount == 0)
            { // no edge yet, just add the end.
                _vertices[vertexPointer + EDGE_COUNT] = 1;
                _vertices[vertexPointer + FIRST_EDGE] = (uint)(_nextEdgePointer / _edgeSize);
                edgeId = (uint)(_nextEdgePointer / _edgeSize);

                // make sure we can add another edge.
                _edges.EnsureMinimumSize(_nextEdgePointer + (1 * _edgeSize) + 1);

                _edges[_nextEdgePointer] = vertex2;
                _edges[_nextEdgePointer + MINIMUM_EDGE_SIZE + 0] = data;
                _nextEdgePointer += _edgeSize;
            }
            else if ((edgeCount & (edgeCount - 1)) == 0)
            { // edgeCount is a power of two, increase space.
                // make sure we can add another edge.
                _edges.EnsureMinimumSize(_nextEdgePointer + (edgeCount * _edgeSize) + 1);

                if (edgePointer == (_nextEdgePointer - (edgeCount * _edgeSize)))
                { // these edge are at the end of the edge-array, don't copy just increase size.
                    _edges[_nextEdgePointer] = vertex2;
                    edgeId = (uint)(_nextEdgePointer / _edgeSize);
                    _edges[_nextEdgePointer + MINIMUM_EDGE_SIZE + 0] = data;
                    _nextEdgePointer += (edgeCount * _edgeSize); // duplicate space for this vertex.
                    _vertices[vertexPointer + EDGE_COUNT] = edgeCount + 1;
                }
                else
                { // not at the end, copy edges to the end.
                    _vertices[vertexPointer + FIRST_EDGE] = (uint)(_nextEdgePointer / _edgeSize);
                    _vertices[vertexPointer + EDGE_COUNT] = edgeCount + 1;

                    // keep new pointer & duplicate space for this vertex.
                    var newNextEdgePointer = _nextEdgePointer + (edgeCount * 2 * _edgeSize);

                    // make sure we can add another edge.
                    _edges.EnsureMinimumSize(_nextEdgePointer + (edgeCount * _edgeSize) + 1);

                    for (var edge = 0; edge < edgeCount; edge++)
                    {
                        _edges[_nextEdgePointer] = _edges[edgePointer + (edge * _edgeSize)];
                        for (uint i = 0; i < _edgeDataSize; i++)
                        {
                            _edges[_nextEdgePointer + MINIMUM_EDGE_SIZE + i] =
                                _edges[edgePointer + MINIMUM_EDGE_SIZE + i + (edge * _edgeSize)];
                        }
                        if (_switchEdge != null)
                        { // report on the edge switch.
                            _switchEdge((uint)((edgePointer + (edge * _edgeSize)) / (long)_edgeSize),
                                (uint)(_nextEdgePointer / _edgeSize));
                        }
                        _nextEdgePointer += _edgeSize;

                        // make sure we can add another edge.
                        _edges.EnsureMinimumSize(_nextEdgePointer + 1);
                    }

                    // make sure we can add another edge.
                    _edges.EnsureMinimumSize(_nextEdgePointer + (edgeCount * _edgeSize) + 1);

                    // add at the end.
                    _edges[_nextEdgePointer] = vertex2;
                    edgeId = (uint)(_nextEdgePointer / _edgeSize);
                    _edges[_nextEdgePointer + MINIMUM_EDGE_SIZE + 0] = data;
                    _nextEdgePointer = newNextEdgePointer;
                }
            }
            else
            { // just add the edge.
                _edges[edgePointer + (edgeCount * _edgeSize)] = vertex2;
                edgeId = (uint)((edgePointer + (edgeCount * _edgeSize)) / _edgeSize);
                _edges[edgePointer + (edgeCount * _edgeSize) + MINIMUM_EDGE_SIZE + 0] = data;

                _vertices[vertexPointer + EDGE_COUNT] = edgeCount + 1;
            }
            _edgeCount++;

            return edgeId;
        }

        /// <summary>
        /// Adds an edge with the associated data.
        /// </summary>
        public uint AddEdge(uint vertex1, uint vertex2, params uint[] data)
        {
            if (_readonly) { throw new Exception("Graph is readonly."); }
            if (vertex1 == vertex2) { throw new ArgumentException("Given vertices must be different."); }
            _vertices.EnsureMinimumSize(Math.Max(vertex1, vertex2) * VERTEX_SIZE + EDGE_COUNT + 1);
            
            if ((_nextEdgePointer / _edgeSize) > uint.MaxValue) { throw new Exception($"Cannot add another edge, this graph can only handle a max of {uint.MaxValue} edges.");}

            var vertexPointer = vertex1 * VERTEX_SIZE;
            var edgeCount = _vertices[vertexPointer + EDGE_COUNT];
            var edgePointer = _vertices[vertexPointer + FIRST_EDGE] * (uint)_edgeSize;
            var edgeId = uint.MaxValue;

            if (edgeCount == 0)
            { // no edge yet, just add the end.
                _vertices[vertexPointer + EDGE_COUNT] = 1;
                _vertices[vertexPointer + FIRST_EDGE] = (uint)(_nextEdgePointer / _edgeSize);
                edgeId = (uint)(_nextEdgePointer / _edgeSize);

                // make sure we can add another edge.
                _edges.EnsureMinimumSize(_nextEdgePointer + (1 * _edgeSize) + 1);

                _edges[_nextEdgePointer] = vertex2;
                for (uint i = 0; i < _edgeDataSize; i++)
                {
                    _edges[_nextEdgePointer + MINIMUM_EDGE_SIZE + i] =
                        data[i];
                }
                _nextEdgePointer += _edgeSize;
            }
            else if ((edgeCount & (edgeCount - 1)) == 0)
            { // edgeCount is a power of two, increase space.
                // make sure we can add another edge.
                _edges.EnsureMinimumSize(_nextEdgePointer + (edgeCount * _edgeSize) + 1);

                if (edgePointer == (_nextEdgePointer - (edgeCount * _edgeSize)))
                { // these edge are at the end of the edge-array, don't copy just increase size.
                    _edges[_nextEdgePointer] = vertex2;
                    edgeId = (uint)(_nextEdgePointer / _edgeSize);
                    for (uint i = 0; i < _edgeDataSize; i++)
                    {
                        _edges[_nextEdgePointer + MINIMUM_EDGE_SIZE + i] =
                            data[i];
                    }
                    _nextEdgePointer += (edgeCount * _edgeSize); // duplicate space for this vertex.
                    _vertices[vertexPointer + EDGE_COUNT] = edgeCount + 1;
                }
                else
                { // not at the end, copy edges to the end.
                    _vertices[vertexPointer + FIRST_EDGE] = (uint)(_nextEdgePointer / _edgeSize);
                    _vertices[vertexPointer + EDGE_COUNT] = edgeCount + 1;

                    // keep new pointer & duplicate space for this vertex.
                    var newNextEdgePointer = _nextEdgePointer + (edgeCount * 2 * _edgeSize);

                    // make sure we can add another edge.
                    _edges.EnsureMinimumSize(_nextEdgePointer + (edgeCount * _edgeSize) + 1);

                    for (var edge = 0; edge < edgeCount; edge++)
                    {
                        _edges[_nextEdgePointer] = _edges[edgePointer + (edge * _edgeSize)];
                        for (uint i = 0; i < _edgeDataSize; i++)
                        {
                            _edges[_nextEdgePointer + MINIMUM_EDGE_SIZE + i] =
                                _edges[edgePointer + MINIMUM_EDGE_SIZE + i + (edge * _edgeSize)];
                        }
                        if (_switchEdge != null)
                        { // report on the edge switch.
                            _switchEdge((uint)((edgePointer + (edge * _edgeSize)) / (long)_edgeSize),
                                (uint)(_nextEdgePointer / _edgeSize));
                        }
                        _nextEdgePointer += _edgeSize;

                        // make sure we can add another edge.
                        _edges.EnsureMinimumSize(_nextEdgePointer + 1);
                    }

                    // make sure we can add another edge.
                    _edges.EnsureMinimumSize(_nextEdgePointer + (edgeCount * _edgeSize) + 1);

                    // add at the end.
                    _edges[_nextEdgePointer] = vertex2;
                    edgeId = (uint)(_nextEdgePointer / _edgeSize);
                    for (uint i = 0; i < _edgeDataSize; i++)
                    {
                        _edges[_nextEdgePointer + MINIMUM_EDGE_SIZE + i] =
                            data[i];
                    }
                    _nextEdgePointer = newNextEdgePointer;
                }
            }
            else
            { // just add the edge.
                _edges[edgePointer + (edgeCount * (uint)_edgeSize)] = vertex2;
                edgeId = (edgePointer + (edgeCount * (uint)_edgeSize)) / (uint)_edgeSize;
                for (uint i = 0; i < _edgeDataSize; i++)
                {
                    _edges[edgePointer + (edgeCount * (uint)_edgeSize) + MINIMUM_EDGE_SIZE + i] =
                        data[i];
                }

                _vertices[vertexPointer + EDGE_COUNT] = edgeCount + 1;
            }
            _edgeCount++;

            return edgeId;
        }

        /// <summary>
        /// Updates and edge's associated data.
        /// </summary>
        public uint UpdateEdge(uint vertex1, uint vertex2, Func<uint[], bool> update, params uint[] data)
        {
            if (_readonly) { throw new Exception("Graph is readonly."); }
            if (vertex1 == vertex2) { throw new ArgumentException("Given vertices must be different."); }
            _vertices.EnsureMinimumSize(Math.Max(vertex1, vertex2) * VERTEX_SIZE + EDGE_COUNT + 1);

            var vertexPointer = vertex1 * VERTEX_SIZE;
            var edgeCount = _vertices[vertexPointer + EDGE_COUNT];
            var edgePointer = _vertices[vertexPointer + FIRST_EDGE] * _edgeSize;
            var lastEdgePointer = edgePointer + (edgeCount * _edgeSize);

            var currentData = new uint[_edgeDataSize];
            while (edgePointer < lastEdgePointer)
            {
                for (uint i = 0; i < _edgeDataSize; i++)
                {
                    currentData[i] = _edges[edgePointer + MINIMUM_EDGE_SIZE + i];
                }
                if (_edges[edgePointer] == vertex2)
                {
                    if (update(currentData))
                    { // yes, update here.
                        for (uint i = 0; i < _edgeDataSize; i++)
                        {
                            _edges[edgePointer + MINIMUM_EDGE_SIZE + i] =
                                data[i];
                        }
                        return (uint)(edgePointer / _edgeSize);
                    }
                }
                edgePointer += _edgeSize;
            }
            return Constants.NO_EDGE;
        }

        /// <summary>
        /// Updates and edge's associated data.
        /// </summary>
        public uint UpdateEdgeIfBetter(uint vertex1, uint vertex2, Func<uint[], bool> update, params uint[] data)
        {
            if (_readonly) { throw new Exception("Graph is readonly."); }
            if (vertex1 == vertex2) { throw new ArgumentException("Given vertices must be different."); }
            _vertices.EnsureMinimumSize(Math.Max(vertex1, vertex2) * VERTEX_SIZE + EDGE_COUNT + 1);

            var vertexPointer = vertex1 * VERTEX_SIZE;
            var edgeCount = _vertices[vertexPointer + EDGE_COUNT];
            if (edgeCount == 0)
            {
                return Constants.NO_EDGE;
            }
            var edgePointer = _vertices[vertexPointer + FIRST_EDGE] * _edgeSize;
            var lastEdgePointer = edgePointer + (edgeCount * _edgeSize);

            var currentData = new uint[_edgeDataSize];
            while (edgePointer < lastEdgePointer)
            {
                for (uint i = 0; i < _edgeDataSize; i++)
                {
                    currentData[i] = _edges[edgePointer + MINIMUM_EDGE_SIZE + i];
                }
                if (_edges[edgePointer] == vertex2)
                {
                    if (update(currentData))
                    { // yes, update here.
                        for (uint i = 0; i < _edgeDataSize; i++)
                        {
                            _edges[edgePointer + MINIMUM_EDGE_SIZE + i] =
                                data[i];
                        }
                    }
                    return (uint)(edgePointer / _edgeSize);
                }
                edgePointer += _edgeSize;
            }
            return Constants.NO_EDGE;
        }

        /// <summary>
        /// Deletes all edges leading from/to the given vertex. 
        /// </summary>
        /// <remarks>Only deletes all edges vertex->* NOT *->vertex</remarks>
        public int RemoveEdges(uint vertex)
        {
            var removed = 0;
            var edges = this.GetEdgeEnumerator(vertex);
            while (edges.MoveNext())
            {
                removed += this.RemoveEdge(vertex, edges.Neighbour);
            }
            return removed;
        }

        /// <summary>
        /// Deletes the edge between the two given vertices.
        /// </summary>
        /// <remarks>Only deletes edge vertex1->vertex2 NOT vertex2 -> vertex1.</remarks>
        public int RemoveEdge(uint vertex1, uint vertex2)
        {
            if (_readonly) { throw new Exception("Graph is readonly."); }
            if (vertex1 >= _vertices.Length) { return 0; }
            if (vertex2 >= _vertices.Length) { return 0; }

            var removed = 0;
            var vertexPointer = vertex1 * VERTEX_SIZE;
            var edgeCount = _vertices[vertexPointer + EDGE_COUNT];
            var edgePointer = _vertices[vertexPointer + FIRST_EDGE] * _edgeSize;

            for (var removeEdgePointer = edgePointer; removeEdgePointer < edgePointer + (edgeCount * (uint)_edgeSize);
                removeEdgePointer += _edgeSize)
            {
                if (_edges[removeEdgePointer] == vertex2)
                { // edge found, remove it.
                    removed++;
                    _edgeCount--;

                    // reduce edge count.
                    edgeCount--;
                    if (removeEdgePointer == edgePointer + (edgeCount * _edgeSize))
                    { // no need to move data anymore, this is the last edge being removed.
                        break;
                    }

                    // move the last edge and overwrite the current edge.
                    _edges[removeEdgePointer] = _edges[edgePointer + (edgeCount * _edgeSize)];
                    for (var i = 0; i < _edgeDataSize; i++)
                    {
                        _edges[removeEdgePointer + MINIMUM_EDGE_SIZE + i] =
                            _edges[edgePointer + (edgeCount * _edgeSize) + MINIMUM_EDGE_SIZE + i];
                    }

                    // report on the move.
                    if (_switchEdge != null)
                    {
                        _switchEdge((uint)((edgePointer + (edgeCount * _edgeSize)) / _edgeSize),
                            (uint)(removeEdgePointer / _edgeSize));
                    }

                    removeEdgePointer -= _edgeSize;
                }
            }
            _vertices[vertexPointer + EDGE_COUNT] = edgeCount;
            return removed;
        }


        public void Reinitialize(int initialSize, int maxSizeQuota, BufferManager bufferManager)
        {
            Reinitialize(initialSize, maxSizeQuota, maxSizeQuota, bufferManager);
        }

        public void Reinitialize(int initialSize, int maxSizeQuota, int effectiveMaxSize, BufferManager bufferManager)
        {
            Contract.Assert(!_initialized, "Clear must be called before re-initializing stream");

            if (bufferManager == null)
            {
                throw Error.ArgumentNull("bufferManager");
            }

            _theMaxSizeQuota = maxSizeQuota;
            _maxSize = effectiveMaxSize;
            _bufferManager = bufferManager;
            _currentChunk = bufferManager.TakeBuffer(initialSize);
            _currentChunkSize = 0;
            _totalSize = 0;
            _chunkCount = 1;
            _chunks[0] = _currentChunk;
            _initialized = true;
        }

        public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
        {
            throw Error.NotSupported(SRResources.ReadNotSupported);
        }

        public override int EndRead(IAsyncResult asyncResult)
        {
            throw Error.NotSupported(SRResources.ReadNotSupported);
        }

        public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
        {
            Write(buffer, offset, count);
            return new CompletedAsyncResult(callback, state);
        }

        public override void EndWrite(IAsyncResult asyncResult)
        {
            CompletedAsyncResult.End(asyncResult);
        }

        public void LoadContent(ContentManager content)
        {
        }

        public Nullable<Vector3> CheckRayIntersection(Ray ray)
        {
            for (int i = 0; i < BoundingBoxes.Count; i++)
            {
                if (ray.Intersects(BoundingBoxes[i]) != null)
                {
                    float intersect = ray.Intersects(BoundingBoxes[i]).Value;
                    Nullable<Vector3> positionInWorldSpace = ray.Position + ray.Direction * intersect;
                    return positionInWorldSpace;
                }
            }
            return null;

        }

        public void Update(GameTime gametime)
        {

        }

        public void Draw(Camera camera, GameTime gametime)
        {
            RasterizerState rs = new RasterizerState();
            graphicsDevice.RasterizerState = rs;
            graphicsDevice.BlendState = BlendState.Additive;

            graphicsDevice.SetVertexBuffer(vbo);
            graphicsDevice.Indices = ibo;

            foreach (EffectTechnique et in fx.Techniques)
            {
                //rot += (float)gametime.ElapsedGameTime.TotalSeconds * 0.5f;
                //if (rot > (float)(2 * Math.PI))
                //    rot -= (float)(2 * Math.PI);
                //m_World = Matrix.CreateScale(4.0f);
                //m_World *= Matrix.CreateFromYawPitchRoll(rot, rot, rot);

                m_Projection = camera.Projection;
                m_View = camera.View;
                fx.Parameters["World"].SetValue(m_World);
                fx.Parameters["View"].SetValue(m_View);
                fx.Parameters["Projection"].SetValue(m_Projection);
                fx.CurrentTechnique = et;

                graphicsDevice.BlendState = BlendState.Opaque;
                fx.CurrentTechnique.Passes[0].Apply();
                graphicsDevice.DrawUserIndexedPrimitives<VertexPositionColor>(PrimitiveType.LineList, verts, 0, verts.Length, wire_indices, 0, wire_indices.Length / 2);
                graphicsDevice.BlendState = BlendState.NonPremultiplied;
                fx.CurrentTechnique.Passes[1].Apply();
                graphicsDevice.DrawUserIndexedPrimitives<VertexPositionColor>(PrimitiveType.TriangleList, verts, 0, verts.Length, indices, 0, indices.Length / 3);
            }
        }


        public override string ToString()
        {
            if (IsCube)
            {
                return $"Cube @({Center.X:0.0}, {Center.Y:0.0}, {Center.Z:0.0}): w = {size.X:0.0}, h = {size.Y:0.0}, l = {size.Z:0.0}";
            }
            else
            {
                return $"Cuboid @({Center.X:0.0}, {Center.Y:0.0}, {Center.Z:0.0}): w = {size.X:0.0}, h = {size.Y:0.0}, l = {size.Z:0.0}";
            }
        }


		public void Create(uint windowSize)
		{
			if (_windowSize != windowSize)
			{
				// System.GC.Collect();
				_buffer = new byte[windowSize];
			}
			_windowSize = windowSize;
			_pos = 0;
			_streamPos = 0;
		}

		public void Init(System.IO.Stream stream, bool solid)
		{
			ReleaseStream();
			_stream = stream;
			if (!solid)
			{
				_streamPos = 0;
				_pos = 0;
				TrainSize = 0;
			}
		}
	
		public bool Train(System.IO.Stream stream)
		{
			long len = stream.Length;
			uint size = (len < _windowSize) ? (uint)len : _windowSize;
			TrainSize = size;
			stream.Position = len - size;
			_streamPos = _pos = 0;
			while (size > 0)
			{
				uint curSize = _windowSize - _pos;
				if (size < curSize)
					curSize = size;
				int numReadBytes = stream.Read(_buffer, (int)_pos, (int)curSize);
				if (numReadBytes == 0)
					return false;
				size -= (uint)numReadBytes;
				_pos += (uint)numReadBytes;
				_streamPos += (uint)numReadBytes;
				if (_pos == _windowSize)
					_streamPos = _pos = 0;
			}
			return true;
		}

		public void ReleaseStream()
		{
			Flush();
			_stream = null;
		}

		public void Flush()
		{
			uint size = _pos - _streamPos;
			if (size == 0)
				return;
			_stream.Write(_buffer, (int)_streamPos, (int)size);
			if (_pos >= _windowSize)
				_pos = 0;
			_streamPos = _pos;
		}

		public void CopyBlock(uint distance, uint len)
		{
			uint pos = _pos - distance - 1;
			if (pos >= _windowSize)
				pos += _windowSize;
			for (; len > 0; len--)
			{
				if (pos >= _windowSize)
					pos = 0;
				_buffer[_pos++] = _buffer[pos++];
				if (_pos >= _windowSize)
					Flush();
			}
		}


    //Add item to end of list.
    public void Add(T item) {
        if (array == null || size == array.Length) {
            Allocate();
        }
        array[size] = item;
        size++;
    }

	//Add item to end of list if it is unique.
	public void AddUnique( T item ) {
		if ( array == null || size == array.Length ) {
			Allocate();
		}
		if ( !Contains( item ) ) {
			array[size] = item;
			size++;
		}
	}

	//Add items to the end of the list
	public void AddRange( IEnumerable<T> items ) {
		foreach ( T item in items ) {
			Add( item );
		}
	}

	//Insert item at specified index
	public void Insert(int index, T item) {
        if (array == null || size == array.Length) {
            Allocate();
        }
        if (index < size) {
            //move things back 1
            for (int i = size; i > index; i--) {
                array[i] = array[i-1];
            }
            array[index] = item;
            size++;
        }
        else Add(item);
    }

    //Removes specified item and keeps everything else in order
    public bool Remove(T item) {
        if (array != null) {
            for (int i = 0; i < size; i++) {
                if (item.Equals(array[i])) { //found it, push everything up
                    size--;
                    for (int j = i; j < size; j++) {
                        array[j] = array[j+1];
                    }
                    array[size] = default(T);
                    return true;
                }
            }
        }
        return false;
    }

    //Removes item at specified index while keeping everything else in order
    //O(n)
    public void RemoveAt(int index) {
        if (array != null && size > 0 && index < size) {
            size--;
            for (int i = index; i < size; i++) {
                array[i] = array[i+1];
            }
            array[size] = default(T);
        }
    }

			public void Init() { A1 = 362436069; A2 = 521288629; }
			public UInt32 GetRnd()
			{
				return
					((A1 = 36969 * (A1 & 0xffff) + (A1 >> 16)) << 16) ^
					((A2 = 18000 * (A2 & 0xffff) + (A2 >> 16)));
			}
			public void Init()
			{
				Value = 0;
				NumBits = 0;
			}
			public UInt32 GetRnd(int numBits)
			{
				UInt32 result;
				if (NumBits > numBits)
				{
					result = Value & (((UInt32)1 << numBits) - 1);
					Value >>= numBits;
					NumBits -= numBits;
					return result;
				}
				numBits -= NumBits;
				result = (Value << numBits);
				Value = RG.GetRnd();
				result |= Value & (((UInt32)1 << numBits) - 1);
				Value >>= numBits;
				NumBits = 32 - numBits;
				return result;
			}

			public void Set(UInt32 bufferSize)
			{
				Buffer = new Byte[bufferSize];
				Pos = 0;
				BufferSize = bufferSize;
			}
			UInt32 GetRndBit() { return RG.GetRnd(1); }


//--------------------------------------------------------------------------
//-------------------------------------- Cursors
//
new GuiCursor(DefaultCursor)
{
   hotSpot = "1 1";
   bitmapName = "gui/CUR_3darrow";
};

new GuiCursor(ArrowNoCursor)
{
   hotSpot = "1 1";
   bitmapName = "gui/CUR_3darrowno";
};

new GuiCursor(ArrowWaitCursor)
{
   hotSpot = "1 1";
   bitmapName = "gui/CUR_3darrowwait";
};

new GuiCursor(ArrowHelpCursor)
{
   hotSpot = "1 1";
   bitmapName = "gui/CUR_3darrowhelp";
};

new GuiCursor(MoveCursor)
{
   hotSpot = "11 11";
   bitmapName = "gui/CUR_3dmove";
};

new GuiCursor(UpDownCursor)
{
   hotSpot = "5 10";
   bitmapName = "gui/CUR_3dupdown";
};

new GuiCursor(LeftRightCursor)
{
   hotSpot = "9 5";
   bitmapName = "gui/CUR_3dleftright";
};

new GuiCursor(DiagRightCursor)
{
   hotSpot = "8 8";
   bitmapName = "gui/CUR_3ddiagright";
};

new GuiCursor(DiagLeftCursor)
{
   hotSpot = "8 8";
   bitmapName = "gui/CUR_3ddiagleft";
};

new GuiCursor(RotateCursor)
{
   hotSpot = "11 14";
   bitmapName = "gui/CUR_rotate";
};

new GuiCursor(ResizeDownCursor)
{
   hotSpot = "4 8";
   bitmapName = "gui/CUR_3dresizeright";
};

new GuiCursor(GrabCursor)
{
   hotSpot = "9 13";
   bitmapName = "gui/CUR_Grab";
};

//--------------------------------------------------------------------------
//-------------------------------------- Profiles
//
new GuiControlProfile("GuiDialogProfile");

new GuiControlProfile("GuiModelessDialogProfile")
{
   modal = false;
};

new GuiControlProfile ("GuiContentProfile")
{
   opaque = true;
   fillColor = "255 255 255";
};

new GuiControlProfile ("clockProfile")
{
   fontType = "Univers Condensed";
   fontSize = 12;
   fontColor = "255 255 255";
};

new GuiControlProfile ("SiegeHalftimeClockProfile")
{
   fontType = "Univers Condensed";
   fontSize = 18;
   fontColor = "255 255 255";
};

new GuiControlProfile ("GuiContentProfileNoClear")
{
   opaque = false;
   fillColor = "255 255 255";
};

//--------------------------------------------------------------------------
// Base font definitions:
//--------------------------------------------------------------------------
$ShellFont = "Univers";
$ShellFontSize = 16;
$ShellMediumFontSize = 18;
$ShellHeaderFont = "Sui Generis";
$ShellHeaderFontSize = 22;
$ShellButtonFont = "Univers Condensed";
$ShellButtonFontSize = 16;
$ShellLabelFont = "Univers Condensed";
$ShellLabelFontSize = 18;
$ShellBoldFont = "Univers Bold";

$ShellColorBright = "173 255 250";
$ShellColorDark = "130 190 185";
$ShellColorVeryDark = "0 117 133";

// Color coding system for Player names in the game:
$PlayerNameColor  = "200 200 200";
$TribeTagColor    = "220 220 20";
$SmurfNameColor   = "150 150 250";
$BotNameColor     = "60 220 150";

//--------------------------------------------------------------------------
// Beginning of the "New Shell" section:
new GuiControlProfile ("ShellButtonProfile")
{
   fontType = $ShellButtonFont;
   fontSize = $ShellButtonFontSize;
   fontColor = "8 19 6";
   fontColorHL = "25 68 56";
   fontColorNA = "5 5 5";
   fontColorSEL = "25 68 56";
   fixedExtent = true;
   justify = "center";
	bitmap = "gui/shll_button";
   textOffset = "0 10";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("ShellButtonNoTabProfile")
{
   fontType = $ShellButtonFont;
   fontSize = $ShellButtonFontSize;
   fontColor = "8 19 6";
   fontColorHL = "25 68 56";
   fontColorNA = "5 5 5";
   fontColorSEL = "25 68 56";
   fixedExtent = true;
   justify = "center";
	bitmap = "gui/shll_button";
   textOffset = "0 10";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
   tab = false;
   canKeyFocus = true;
};

new GuiControlProfile ("ShellRadioProfile")
{
   fontType = $ShellButtonFont;
   fontSize = $ShellButtonFontSize;
   fontColor = "8 19 6";
   fontColorHL = "25 68 56";
   fontColorNA = "5 5 5";
   fixedExtent = true;
   justify = "center";
   bitmap = "gui/shll_radio";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("ShellTabProfile")
{
   fontType = $ShellButtonFont;
   fontSize = $ShellButtonFontSize;
   fontColor = "8 19 6";
   fontColorHL = "25 68 56";
   fontColorNA = "5 5 5";
   fontColorSEL = "8 19 6";
   fixedExtent = true;
   justify = "center";
   bitmap = "gui/shll_tabbutton";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("TabGroupProfile")
{
   fontType = $ShellButtonFont;
   fontSize = $ShellButtonFontSize;
   fontColor = "8 19 6";
   fontColorHL = "25 68 56";
   fontColorNA = "5 5 5";
   fontColorSEL = "8 19 6";
   fixedExtent = true;
   bitmapBase = "gui/shll_horztabbutton";
   justify = "center";
   textOffset = "8 0";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("LaunchTabProfile")
{
   fontType = $ShellButtonFont;
   fontSize = $ShellButtonFontSize;
   fontColor = "60 140 140";
   fontColorHL = "6 245 215";
   fontColorNA = "64 64 64";
   fontColorSEL = "6 245 215";
   fixedExtent = true;
   bitmapBase = "gui/lnch_tab";
   justify = "center";
   textOffset = "8 0";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("ShellTabFrameProfile")
{
	bitmapBase = "gui/shll_tabframe";
};

new GuiControlProfile ("ShellHorzTabFrameProfile")
{
	bitmapBase = "gui/shll_horztabframe";
};

new GuiControlProfile ("ShellPopupProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "8 19 6";
   fontColorHL = "25 68 56";
   fontColorNA = "5 5 5";
   fontColorSEL = "8 19 6";
   fixedExtent = true;
   justify = "center";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
	bitmapBase = "gui/shll_scroll";
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("NewTextEditProfile")
{
   fillColorHL = $ShellColorDark;
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "60 140 140";
   fontColorHL = "25 68 56";
   fontColorNA = "128 128 128";
   cursorColor = $ShellColorBright;
   bitmap = "gui/shll_entryfield";
   textOffset = "14 0";
   autoSizeWidth = false;
   autoSizeHeight = false;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("NewTextEditNumericProfile")
{
   fillColorHL = $ShellColorDark;
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "60 140 140";
   fontColorHL = "25 68 56";
   fontColorNA = "128 128 128";
   cursorColor = $ShellColorBright;
   bitmap = "gui/shll_entryfield";
   justify = "center";
   textOffset = "14 0";
   autoSizeWidth = false;
   autoSizeHeight = false;
   numbersOnly = true;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("NewTextEditCenterProfile")
{
   fillColorHL = $ShellColorDark;
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "60 140 140";
   fontColorHL = "25 68 56";
   fontColorNA = "128 128 128";
   cursorColor = $ShellColorBright;
   bitmap = "gui/shll_entryfield";
   justify = "center";
   autoSizeWidth = false;
   autoSizeHeight = false;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("NewScrollCtrlProfile")
{
   bitmapBase = "gui/shll_scroll";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
};

new GuiControlProfile ("ShellFieldProfile")
{
   bitmapBase = "gui/shll_field";
};

new GuiControlProfile ("ShellSliderProfile")
{
   fontType = $ShellLabelFont;
   fontSize = $ShellFontSize;
   fontColor   = "60 180 180";
   fontColorNA = "128 128 128";
   bitmapBase = "gui/shll_scroll";
	canKeyFocus = true;
   soundButtonOver = sButtonOver;
};

new GuiControlProfile ("ShellTextArrayProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor   = "60 180 180";
   fontColorHL = "6 245 215";
   fontColorNA = "108 108 108";
   fontColorSEL = "25 68 56";
   bitmapBase = "gui/shll_bar";
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("ShellActiveTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor   = "60 180 180";
   fontColorHL = "6 245 215";
   fontColorNA = "128 128 128";
   fontColorSEL = "25 68 56";
   justify = "center";
};

new GuiControlProfile ("ShellPaneProfile")
{
   fontType = $ShellHeaderFont;
   fontSize = $ShellHeaderFontSize;
   fontColor = "5 5 5";
   autoSizeWidth = false;
   autoSizeHeight = false;
	bitmapBase = "gui/shll";
};

new GuiControlProfile ("ShellDlgPaneProfile")
{
   fontType = $ShellHeaderFont;
   fontSize = $ShellHeaderFontSize;
   fontColor = "5 5 5";
   autoSizeWidth = false;
   autoSizeHeight = false;
	bitmapBase = "gui/dlg";
};

new GuiControlProfile ("ShellWindowProfile")
{
   borderColor = "3 124 134";
   fontType = $ShellHeaderFont;
   fontSize = $ShellHeaderFontSize;
   fontColor = "5 5 5";
   autoSizeWidth = false;
   autoSizeHeight = false;
	bitmapBase = "gui/dlg";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
};

new GuiControlProfile ("ShellDlgProfile")
{
   fontType = $ShellHeaderFont;
   fontSize = $ShellHeaderFontSize;
   fontColor = "5 5 5";
	bitmap = "gui/dlg_box";
   autoSizeWidth = false;
   autoSizeHeight = false;
};

new GuiControlProfile ("BrowserH1Profile")
{
	fontType = "Univers Condensed Bold";
	fontSize = 28;
   fontColor = "40 247 113"; // green
   autoSizeWidth = false;
   autoSizeHeight = true;
   bitmapBase = "gui/shll";
};

new GuiControlProfile ("CloseButtonProfile")
{
	bitmap = "gui/shll_menuclose";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("SoundTestButtonProfile")
{
	bitmap = "gui/shll_soundbutton";
   soundButtonOver = sButtonOver;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("LaunchMenuProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "6 245 215";
   fontColorHL = "74 251 228";
   fontColorSEL = "4 41 45";
   borderColor = "84 121 125 200";
   fixedExtent = true;
   justify = "center";
   bitmapBase = "gui/launch_btn";
   textOffset = "0 19";
   soundButtonDown = sLaunchMenuOpen;
   soundButtonOver = sLaunchMenuOver;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("LaunchBtnTopProfile")
{
   fixedExtent = true;
   bitmapBase = "gui/launchtop_btn";
};

new GuiControlProfile ("ShellServerBrowserProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor   = "60 180 180";
   fontColorHL = "6 245 215";
   fontColorNA = "128 128 128";
   fontColorSEL = "25 68 56";
   fontColors[4] = "20 167 93";     // Mod base color
   fontColors[5] = "40 217 113";    // Mod rollover color
   fontColors[6] = "5 60 30";       // Mod selected color
   fontColors[7] = "108 108 108";   // Differing build base color       
   fontColors[8] = "168 168 168";   // Differing build rollover color
   fontColors[9] = "58 58 58";      // Differing build selected color
   bitmapBase = "gui/shll_scroll";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
	tab = true;
	canKeyFocus = true;
};

new GuiControlProfile ("ShellBrowserListProfile")
{
   fontType = $ShellFont;
   fontSize = 12;
   fontColor = "20 220 20";
   fontColorHL = "60 250 60";
   fontColorNA = "128 128 128";
   fontColorSEL = "0 60 0";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("LobbyPlayerListProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor   = "60 180 180";
   fontColorHL = "6 245 215";
   fontColorNA = "128 128 128";
   fontColorSEL = "25 68 56";
   fontColors[6] = $PlayerNameColor;
   fontColors[7] = $TribeTagColor;  
   fontColors[8] = $SmurfNameColor; 
   fontColors[9] = $BotNameColor;   
   bitmapBase = "gui/shll_scroll";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
	tab = true;
	canKeyFocus = true;
};

new GuiControlProfile ("ShellBrowserTitleProfile")
{
   fontType = "Sui Generis";
   fontSize = 32;
   fontColor = "173 255 250";
   autoSizeWidth = true;
   autoSizeHeight = true;
   tab = false;
   canKeyFocus = false;
};
//--------------------------------------------------------------------------
// End of "New Shell" section.

new GuiControlProfile ("ShellHoloButtonProfile")
{
   opaque = true;
   fillColor = $ShellColorVeryDark;
   fillColorNA = "128 128 128";
   border = true;
   borderColor   = $ShellColorBright;
   borderColorHL = "127 127 127";
   borderColorNA = "192 192 192";
   fontType = "Univers";
   fontSize = 14;
   fontColor = $ShellColorBright;
   fontColorHL = $ShellColorDark;
   fontColorNA = "192 192 192";
   fixedExtent = true;
   justify = "center";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("GameHoloButtonProfile")
{
   opaque = true;
   fillColor = "0 64 0 80";
   border = true;
   borderColor   = "0 255 0";
   borderColorHL = "127 127 127";
   fontType = "Univers";
   fontSize = 14;
   fontColor = "0 255 0";
   fontColorHL = "0 128 0";
   fixedExtent = true;
   justify = "center";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
   tab = true;
};

new GuiControlProfile ("ShellHoloBox")
{
   opaque = true;
   fillColor = "72 72 72 128";
	border = true;
	borderColor = $ShellColorBright;
};

new GuiControlProfile ("TaskHudBox")
{
   opaque = true;
   fillColor = "72 72 72 128";
	border = true;
	borderColor = "30 59 56 80";
};

new GuiControlProfile ("ShellOpaqueBox")
{
   opaque = true;
   fillColor = $ShellColorVeryDark;
   border = true;
   borderColor = $ShellColorBright;
};

new GuiControlProfile ("ShellScrollCtrlProfile")
{
   border = true;
   borderColor = $ShellColorBright;
   bitmap = "gui/shellScroll";
};

new GuiControlProfile ("ShellTextProfile")
{
   fontType = $ShellLabelFont;
   fontSize = $ShellLabelFontSize;
   fontColor = "66 229 244";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellTextRightProfile")
{
   fontType = $ShellLabelFont;
   fontSize = $ShellLabelFontSize;
   fontColor = "66 229 244";
   justify = "right";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellTextCenterProfile")
{
   fontType = $ShellLabelFont;
   fontSize = $ShellLabelFontSize;
   fontColor = "66 229 244";
   justify = "center";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("DisabledTextProfile")
{
   fontType = $ShellLabelFont;
   fontSize = $ShellLabelFontSize;
   fontColor = "128 128 128";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("DisabledTextRightProfile")
{
   fontType = $ShellLabelFont;
   fontSize = $ShellLabelFontSize;
   fontColor = "128 128 128";
   justify = "right";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellAltTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "66 219 234";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellAltTextRightProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "66 219 234";
   justify = "right";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellAltTextCenterProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "66 219 234";
   justify = "center";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellStaticTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "66 219 234";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("VersionTextProfile")
{
   fontType = "Univers Bold";
   fontSize = $ShellMediumFontSize;
   fontColor = "0 0 0";
   justify = "right";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("CenterPrintTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
   fontColor = $ShellColorBright;
   autoSizeWidth = false;
   autoSizeHeight = true;
};


new GuiControlProfile ("ShellEditMOTDTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "66 219 234";
   fontColorHL = "25 68 56";
   fillColorHL = "50 233 206";
   cursorColor = "200 240 240";
   autoSizeWidth = false;
   autoSizeHeight = false;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("ShellTopicTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
   fontColor = "100 200 200";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("BrowserFilterLabelProfile")
{
   fontType = $ShellLabelFont;
   fontSize = 22;
   fontColor = "0 220 0";
   justify = "left";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("BrowserFilterTextProfile")
{
   fontType = $ShellLabelFont;
   fontSize = 22;
   fontColor = "66 219 234";
   justify = "left";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("BrowserStatusTextProfile")
{
   fontType = $ShellLabelFont;
   fontSize = 22;
   fontColor = "66 219 234";
   justify = "right";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("BrowserProgressProfile")
{
   opaque = false;
   fillColor = "79 253 181 180";
   border = true;
   borderColor   = "3 124 134";
};

new GuiControlProfile ("InfoWindowProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "66 219 234";
   fontColors[6] = $PlayerNameColor;
   fontColors[7] = $TribeTagColor;  
   fontColors[8] = $SmurfNameColor; 
   fontColors[9] = $BotNameColor;   
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellMessageTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
   fontColor = "66 219 234";
   fontColorHL = "25 68 56";
   fillColorHL = "50 233 206";
   cursorColor = "200 240 240";
   autoSizeWidth = false;
   autoSizeHeight = false;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("ShellLoadTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
   fontColor = "66 219 234";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellLargeLabelProfile" )
{
   fontType = $ShellLabelFont;
   fontSize = 22;
   fontColor = "60 180 180";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellMediumTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
   fontColor = $ShellColorBright;
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellMediumTextCenterProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
   fontColor = $ShellColorBright;
   autoSizeWidth = false;
   autoSizeHeight = true;
   justify = "center";
};

new GuiControlProfile ("DebriefHeadlineTextProfile")
{
   fontType = $ShellLabelFont;
   fontSize = 28;
   fontColor = $ShellColorBright;
   autoSizeWidth = false;
   autoSizeHeight = true;
   tab = false;
   canKeyFocus = false;
};

new GuiControlProfile ("DebriefTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
   fontColor = "60 180 180";
   fontColors[6] = $PlayerNameColor;
   fontColors[7] = $TribeTagColor;  
   fontColors[8] = $SmurfNameColor; 
   fontColors[9] = $BotNameColor;   
   autoSizeWidth = false;
   autoSizeHeight = false;
   tab = false;
   canKeyFocus = false;
};

new GuiControlProfile ("ScoreHeaderTextProfile")
{
   fontType = $ShellLabelFont;
   fontSize = 28;
   fontColor = "0 255 255";
   autoSizeWidth = false;
   autoSizeHeight = true;
   tab = false;
   canKeyFocus = false;
};

new GuiControlProfile ("ScoreSubheaderTextProfile")
{
   fontType = $ShellLabelFont;
   fontSize = 22;
   fontColor = "0 255 255";
   autoSizeWidth = false;
   autoSizeHeight = true;
   tab = false;
   canKeyFocus = false;
};

new GuiControlProfile ("ScoreTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
   fontColor = "0 220 220";
   autoSizeWidth = false;
   autoSizeHeight = false;
   tab = false;
   canKeyFocus = false;
};

new GuiControlProfile ("ShellTreeViewProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
	fontColor = "6 245 215";
	fontColorHL = "6 245 215";
   fontColorSEL = "25 68 56";
	bitmapBase = "gui/shll_bar";
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("ShellBigTextProfile")
{
   fontType = $ShellHeaderFont;
   fontSize = $ShellHeaderFontSize;
   fontColor = $ShellColorBright;
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("HudScoreListProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
   fontColor   = "60 180 180";
};

new GuiControlProfile ("GuiHelpBoxProfile")
{
	border = false;
	//borderColor = "3 144 156";
   opaque = true;
   fillColor = "3 144 156 86";
};

new GuiControlProfile ("GuiHelpTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
	fontColor = "169 215 250";
   autoSizeWidth = false;
   autoSizeHeight = false;
	justify = "left";
};

new GuiControlProfile ("GuiHelpHeaderProfile")
{
   fontType = $ShellLabelFont;
   fontSize = $ShellLabelFontSize;
	fontColor = "169 215 250";
   autoSizeWidth = true;
   autoSizeHeight = true;
	justify = "left";
};

new GuiControlProfile ("GuiVoiceRedProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "180 0 0";
	justify = "left";
};

new GuiControlProfile ("GuiVoiceGreenProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "0 180 0";
	justify = "left";
};

new GuiControlProfile( "GuiDeathMsgHudProfile" )
{
	opaque = false;
	border = false;
	//borderColor = "255 255 0 128";
};

new GuiControlProfile ("GuiTextProfile")
{
   fontType = "Univers";
   fontSize = 16;
   fontColor = "0 0 0";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("GuiCenterTextProfile")
{
   fontType = "Univers";
   fontSize = 16;
   fontColor = "0 0 0";
   fixedExtent = true;
   justify = "center";
};

new GuiControlProfile ("GuiBigTextProfile")
{
   fontType = "Times";
   fontSize = 36;
   fontColor = "0 0 0";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("GuiBigTextProfileWhite")
{
   fontType = "Times";
   fontSize = 24;

   fontColor   = "  0   0   0";
   fillColor   = "255 255 255";

   fontColorHL = "255 255 255";
   fillColorHL = "0 0 0";

   autoSizeWidth = true;
   autoSizeHeight = true;
   
   opaque = true;
};

new GuiControlProfile("GuiBorderProfile") 
{
	border = "true";
	borderColor = "40 205 170";
   opaque = true;
   fillColor = "0 64 100 80";
};

new GuiControlProfile("ZoomHudProfile") 
{
	border = "true";
	borderColor = "40 205 170";
   opaque = false;
   fillColor = "0 64 100 80";
};

new GuiControlProfile("GuiDashBoxProfile") 
{
	border = "false";
   opaque = false;
};

new GuiControlProfile("GuiDashTextProfile") 
{
   fontType = "Univers Condensed";
   fontSize = 16;
   fontColor = "154 208 253";
   justify = "center";
};

new GuiControlProfile ("GuiTextBGLeftProfile")
{
   fontType = "Univers Condensed";
   fontSize = 20;
   fontColor = "70 235 200";
   justify = "center";
};

new GuiControlProfile ("GuiTextBGCenterProfile")
{
   fontType = "Univers";
   fontSize = 16;
   fontColor = "70 235 200";
   justify = "center";
};

new GuiControlProfile ("GuiTextBGRightProfile")
{
   fontType = "Univers";
   fontSize = 16;
   fontColor = "70 235 200";
   justify = "right";
};

new GuiControlProfile ("GuiTextBGWhiteRightProfile")
{
   fontType = "Univers Condensed";
   fontSize = 16;
   fontColor = "90 255 220";
   justify = "right";
};

new GuiControlProfile ("GuiHelpLineProfile")
{
	borderColor = "231 101 26";
	bitmap = "gui/hud_dot";
};

new GuiControlProfile ("GuiTextObjHudCenterProfile")
{
	fontType = "Univers Condensed";
	fontSize = 16;
	fontColor = "169 215 250";
   fontColors[6] = $PlayerNameColor;
   fontColors[7] = $TribeTagColor;  
   fontColors[8] = $SmurfNameColor; 
   fontColors[9] = $BotNameColor;   
	justify = "center";
};

new GuiControlProfile ("GuiTextObjHudLeftProfile")
{
	fontType = "Univers Condensed";
	fontSize = 16;
	fontColor = "169 215 250";
   fontColors[6] = $PlayerNameColor;
   fontColors[7] = $TribeTagColor;  
   fontColors[8] = $SmurfNameColor; 
   fontColors[9] = $BotNameColor;   
	justify = "left";
};

new GuiControlProfile ("GuiTextObjGreenLeftProfile")
{
	fontType = "Univers Condensed";
	fontSize = 16;
	fontColor = "23 236 67";
   fontColors[6] = $PlayerNameColor;
   fontColors[7] = $TribeTagColor;  
   fontColors[8] = $SmurfNameColor; 
   fontColors[9] = $BotNameColor;   
	justify = "left";
};

new GuiControlProfile ("GuiTextObjGreenCenterProfile")
{
	fontType = "Univers Condensed";
	fontSize = 16;
	fontColor = "23 236 67";
   fontColors[6] = $PlayerNameColor;
   fontColors[7] = $TribeTagColor;  
   fontColors[8] = $SmurfNameColor; 
   fontColors[9] = $BotNameColor;   
	justify = "center";
};

new GuiControlProfile ("DeathMsgTextProfile")
{
   fontType = "Univers";
   fontSize = 14;
   fontColor = "40 247 113"; // green
	justify = "left";
};

new GuiControlProfile("DebuggerWindowProfile") {
	border = "true";
	borderColor = "255 255 255";
	opaque = "true";
	fillColor = "0 0 0"; 
};

new GuiControlProfile ("GuiTextEditProfile")
{
   opaque = true;
   fillColor = "255 255 255";
   fillColorHL = "128 128 128";
   border = true;
   borderColor = "0 0 0";
   fontType = "Lucida Console";
   fontSize = 12;
   fontColor = "0 0 0";
   fontColorHL = "255 255 255";
   fontColorNA = "128 128 128";
   textOffset = "0 2";
   autoSizeWidth = false;
   autoSizeHeight = true;
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("GuiInspectorTextEditProfile")
{
   opaque = true;
   fillColor = "255 255 255";
   fillColorHL = "128 128 128";
   border = true;
   borderColor = "0 0 0";
   fontType = "Univers";
   fontSize = 16;
   fontColor = "0 0 0";
   fontColorHL = "255 255 255";
   autoSizeWidth = false;
   autoSizeHeight = true;
   tab = false;
   canKeyFocus = true;
};

new GuiControlProfile ("GuiMessageEditHudProfile")
{
   fontType = "verdana";
   fontSize = 14;
   fontColor = "255 255 0";
   cursorColor = "255 205 0";
   autoSizeWidth = false;
   autoSizeHeight = true;
   tab = false;
   canKeyFocus = true;
};

new GuiControlProfile ("GuiMessageEditHudTextProfile")
{
   fontType = "verdana";
   fontSize = 14;
   fontColor = "255 255 255";
   autoSizeWidth = true;
   autoSizeHeight = true;
   tab = false;
};

new GuiControlProfile("GuiAmmoHudProfile")
{
   fontType = "Univers Condensed";
   fontSize = 16;
	fontColor = "169 215 250";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile("GuiPackTextProfile")
{
   fontType = "Univers";
   fontSize = 12;
	fontColor = "169 215 250";
	justify = "center";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile("GuiTempSpeedProfile")
{
   fontType = "Univers Condensed";
   fontSize = 16;
	fontColor = "240 0 240";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile("GuiRecordingHudProfile")
{
   fontType = "Univers Condensed";
   fontSize = 16;
	fontColor = "255 0 0";
	justify = "center";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("GuiChatBackProfile")
{
   bitmapbase = "gui/hud_new_window";
};

new GuiControlProfile ("HudScoreProfile")
{
   bitmap = "gui/hud_new_scorewindow";
   borderColor = "30 59 56";
};

new GuiControlProfile ("HudHelpTagProfile")
{
   borderColor = "231 101 26";
   bitmap = "gui/hud_dot";
};

new GuiControlProfile ("HudVoteBackProfile")
{
   bitmapBase = "gui/hud_new_window_B";
};

new GuiControlProfile ("GuiVMenuProfile")
{
   bitmapBase = "gui/hud_new_window";
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
};

new GuiControlProfile ("GuiChatHudProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "44 172 181"; // default color (death msgs, scoring, inventory)
   fontColors[1] = "4 235 105"; // client join/drop, tournament mode
   fontColors[2] = "219 200 128"; // gameplay, admin/voting, pack/deployable
   fontColors[3] = "77 253 95";  // team chat, spam protection message, client tasks
   fontColors[4] = "40 231 240";  // global chat
   fontColors[5] = "200 200 50 200";  // used in single player game
   // WARNING! Colors 6-9 are reserved for name coloring 
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("GuiHudNavProfile")
{
//   fontType = "Univers Condensed";
//   fontSize = 16;
//   fontColor = "255 255 255";
//   autoSizeWidth = false;
//   autoSizeHeight = true;
   fontColors[6] = $PlayerNameColor;
   fontColors[7] = $TribeTagColor;  
   fontColors[8] = $SmurfNameColor; 
   fontColors[9] = $BotNameColor;   
};

new GuiControlProfile ( "GuiHudVoiceMenuProfile" )
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "70 235 200";
   justify = "left";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ( "GuiHudVoiceCommandProfile" )
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "40 205 210";
   justify = "left";
   autoSizeWidth = false;
   autoSizeHeight = true;
};


new GuiControlProfile ("GuiCommandMsgHudProfile")
{
   fontType = "Univers Condensed";
   fontSize = 16;
   fontColor = "253 221 0";
   autoSizeWidth = false;
   autoSizeHeight = true;
   tab = false;
};

new GuiControlProfile ("GuiButtonProfile")
{
   opaque = true;
   fillColor = "232 232 232";
   border = true;
   borderColor   = "0 0 0";
   borderColorHL = "127 127 127";
   fontType = "Univers Condensed";
   fontSize = 16;
   fontColor = "0 0 0";
   fontColorHL = "32 100 100";
   fixedExtent = true;
   justify = "center";
   soundButtonDown = sButtonDown;
   soundButtonOver = sButtonOver;
	canKeyFocus = false;
};

new GuiControlProfile ("GuiHudCounterProfile")
{
   opaque = true;
   fillColor = "232 232 232";
   border = false;
   borderColor   = "0 0 0";
   borderColorHL = "127 127 127";
   fontType = $ShellFont;
   fontSize = 12;
   fontColor = "0 0 0";
   fontColorHL = "32 100 100";
   fixedExtent = true;
   justify = "center";
};

new GuiControlProfile ("GuiRadioProfile")
{
   opaque = false;
   fillColor = "232 232 232";
   border = false;
   borderColor = "0 0 0";
   fontType = "Univers";
   fontSize = 14;
   fontColor = "0 0 0";
   fontColorHL = "32 100 100";
   fixedExtent = true;
   justify = "center";
};

new GuiControlProfile ("GuiCheckBoxProfile")
{
   opaque = false;
   fillColor = "232 232 232";
   border = false;
   borderColor = "0 0 0";
   fontType = "Univers";
   fontSize = 14;
   fontColor = "0 0 0";
   fontColorHL = "32 100 100";
   fixedExtent = true;
   justify = "center";
};

new GuiControlProfile ("GuiPopUpMenuProfile")
{
   opaque = true;
   fillColor = "232 232 232";
   border = true;
   borderColor = "0 0 0";
   fontType = "Univers";
   fontSize = 14;
   fontColor = "0 0 0";
   fontColorHL = "32 100 100";
   fontColorSEL = "32 100 100";
   fixedExtent = true;
   justify = "center";
};

new GuiControlProfile ("GuiWindowProfile")
{
   opaque = true;
   fillColor = "200 200 200";
   fillColorHL = "64 150 150";
   fillColorNA = "150 150 150";
   fontType = "Univers";
   fontSize = 16;
   fontColor = "0 0 0";
   fontColorHL = "0 0 0";
   text = "GuiWindowCtrl test";
   bitmap = "gui/darkWindow";
};

new GuiControlProfile ("GuiScrollCtrlProfile")
{
   border = true;
   borderColor = "0 0 0";
   bitmap = "gui/darkScroll";
};

new GuiControlProfile ("GuiScrollContentProfile")
{
   opaque = false;
   autoSizeWidth = true;
   autoSizeHeight = true;
   border = false;

};

new GuiControlProfile ("GuiTreeViewProfile")
{
   fontType = "Lucida Console";
   fontSize = 12;
   fontColor = "0 0 0";
   fontColorHL = "64 150 150";
   bitmap = "gui/treeView";
};

new GuiControlProfile ("GuiTextArrayProfile")
{
   fontType = "Univers";
   fontSize = 16;
   fontColor = "0 0 0";
   fontColorHL = "32 100 100";
   fillColorHL = "200 200 200";
};

new GuiControlProfile ("GuiConsoleProfile")
{
   fontType = "Lucida Console";
   fontSize = 12;
   fontColor = "0 0 0";
   fontColorHL = "130 130 130";
   fontColorNA = "255 0 0";
   fontColors[6] = "50 50 50";
   fontColors[7] = "50 50 0";  
   fontColors[8] = "0 0 50"; 
   fontColors[9] = "0 50 0";   
};

new GuiControlProfile ("GuiConsoleTextProfile")
{
   fontType = "Lucida Console";
   fontSize = 12;
   fontColor = "0 0 0";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile("GuiMediumBoldTextProfile")
{
   fontType = "Univers Condensed";
   fontSize = 16;
   fontColor = "0 0 0";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile("EditTSControlProfile")
{
   fontType = "Univers";
   fontSize = 16;
   fontColor = "200 200 200";
   autoSizeWidth = true;
   autoSizeHeight = true;
   fillColor = "255 255 0";
   opaque = "true";
};

new GuiControlProfile("EditorContentProfile")
{
   fontType = "Univers";
   fontSize = 16;
   fontColor = "200 200 200";
   autoSizeWidth = true;
   autoSizeHeight = true;
   fillColor = "220 220 220";
   opaque = "true";
   border = true;
   borderColor   = "180 180 180";
};

new GuiControlProfile ("ShellProgressBarProfile")
{
   opaque = false;
   fillColor = "44 152 162 100";
   border = true;
   borderColor   = "78 88 120";
};

new GuiControlProfile ("ShellProgressBarTextProfile")
{
	fontType = $ShellLabelFont;
	fontSize = $ShellLabelFontSize;
	fontColor = "169 215 250";
   justify = "center";
};

new GuiControlProfile ("ShellLoadFrameProfile" )
{
   border = true;
   borderColor   = "78 88 120";
};

new GuiControlProfile ("ShellSubHeaderProfile" )
{
	fontType = "Univers Condensed Bold";
	fontSize = 28;
	fontColor = "66 219 234";
	justify = "left";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile( "DlgBackProfile" )
{
	opaque = true;
	fillColor = "0 0 0 160";
};

new GuiControlProfile( "MotdCProfile" )
{
	justify = "center";
	opaque = true;
    autoSizeWidth = true;
	fillColor = "0 0 0 160";
	fontType = "Univers Condensed";
	fontSize = 14;
	fontColor = "000 219 234";
};

new GuiControlProfile( "GuiInputCtrlProfile" )
{
   tab = true;
	canKeyFocus = true;
};

new GuiControlProfile( "TesterProfile" )
{
	border = true;
	borderColor = "255 255 0";
};

new GuiControlProfile ("TaskHudProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "66 229 244";
   autoSizeWidth = true;
   autoSizeHeight = true;
   fontColors[1] = "0 200 0 200";
   fontColors[2] = "200 0 0 200";
   fontColors[3] = "0 0 200 200";
   fontColors[6] = $PlayerNameColor;
   fontColors[7] = $TribeTagColor;  
   fontColors[8] = $SmurfNameColor; 
   fontColors[9] = $BotNameColor;   
};

new GuiControlProfile ("TaskHudTextProfile")
{
   fontType = $ShellLabelFont;
   fontSize = $ShellFontSize;
   fontColor = "66 229 244";
   autoSizeWidth = true;
   autoSizeHeight = true;
};

new GuiControlProfile ("ShellChatMemberListProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor   = "60 180 180";
   fontColorHL = "6 245 215";
   fontColorNA = "128 128 128";
   fontColorSEL = "25 68 56";
	fontColors[4] = "255 255 255";	// nick font color
	fontColors[5] = "200 255 255";	// nick highlighted color
	fontColors[6] = "0 0 0";			// nick selected color
	fontColors[7] = "255 255 0";		// tribe font color
	fontColors[8] = "200 255 0";		// tribe highlighted color
	fontColors[9] = "0 0 255";			// tribe selected color
   bitmapBase = "gui/shll_bar";
   tab = true;
   canKeyFocus = true;
};

new GuiControlProfile ("GuiChannelVectorProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellFontSize;
   fontColor = "249 250 194"; 		// default font color
   fontColors[1] = "255 255 255";	// nick font color
   fontColors[2] = "255 255 0";		// tribe font color
   fontColors[3] = "0 200 0";			// server font color
   fontColors[4] = "4 235 105"; 	// client join/drop, tournament mode
   fontColors[5] = "219 200 128"; 	// gameplay, admin/voting, pack/deployable
   fontColors[6] = "77 253 95";  	// team chat, spam protection message, client tasks
   fontColors[7] = "40 231 240";  	// global chat
   fontColors[8] = "200 200 50 200";  // used in single player game
   fontColors[9] = "66 219 234";
   autoSizeWidth = false;
   autoSizeHeight = true;
};

new GuiControlProfile ("GuiTempHeatProfile")
{
   fontType = $ShellButtonFont;
   fontSize = $ShellFontSize;
   fontColor = "230 40 230";
	justify = "center";
};

new GuiControlProfile ("GuiBubblePopupProfile")
{
	border = false;
   opaque = true;
   fillColor = "3 144 156 200";
};

new GuiControlProfile ("GuiBubbleTextProfile")
{
   fontType = $ShellFont;
   fontSize = $ShellMediumFontSize;
   fontColor = "100 200 200";
   autoSizeWidth = false;
   autoSizeHeight = true;
};



        /// <devdoc>
        ///    <para>
        ///       Performs vector addition of two <see cref='Size'/> objects.
        ///    </para> 
        /// </devdoc>
        public static Size Add(Size sz1, Size sz2)
        {
            return new Size(sz1.Width + sz2.Width, sz1.Height + sz2.Height);
        }

        /// <devdoc>
        ///    <para>
        ///       Contracts a <see cref='Size'/> by another <see cref='Size'/> .
        ///    </para> 
        /// </devdoc>
        public static Size Subtract(Size sz1, Size sz2)
        {
            return new Size(sz1.Width - sz2.Width, sz1.Height - sz2.Height);
        }

        /// <devdoc>
        ///    <para>
        ///       Tests to see whether the specified object is a 
        ///    <see cref='Size'/>
        ///    with the same dimensions as this <see cref='Size'/>. 
        /// </para> 
        /// </devdoc>
        public override Boolean Equals(Object obj)
        {
            if (!(obj is Size))
                return false;

            Size comp = (Size)obj;
            // Note value types can't have derived classes, so we don't need to
            // check the types of the objects here.  -- [....], 2/21/2001 
            return (comp._width == _width) &&
                   (comp._height == _height);
        }

        /// <devdoc>
        ///    <para> 
        ///       Returns a hash code.
        ///    </para> 
        /// </devdoc> 
        public override Int32 GetHashCode()
        {
            return _width ^ _height;
        }

        /// <devdoc> 
        ///    <para>
        ///       Creates a human-readable string that represents this 
        ///    <see cref='Size'/>. 
        ///    </para>
        /// </devdoc> 
        public override String ToString()
        {
            return "{Width=" + _width.ToString(CultureInfo.CurrentCulture) + ", Height=" + _height.ToString(CultureInfo.CurrentCulture) + "}";
        }

PowerArgs.Cli.Physics.Size : Object

Methods :

public static ISize Create(Single w = , Single h = )
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()