예제 #1
0
        public void UpdateText(string text, int wrapLength = 0)
        {
            if (Texture == null)
            {
                throw new InvalidOperationException(Errors.E_TEXTURE_NULL);
            }

            Text = text;

            Surface surface = new Surface(Font, Text, Color, wrapLength);

            Texture.UpdateSurfaceAndTexture(surface);
        }
예제 #2
0
        public void UpdateText(string text, int wrapLength)
        {
            if (Texture == null)
            {
                throw new InvalidOperationException("Texture is null. Has it been disposed?");
            }

            ISurface surface = new Surface(Font, text, Color, wrapLength);

            Texture.UpdateSurfaceAndTexture(surface);

            Text      = text;
            IsWrapped = wrapLength > 0;
        }