Exemple #1
0
        /// <summary>
        /// Set the default font for the game.
        /// </summary>
        /// <param name="defaultFont"></param>
        public static void SetDefaultFont(ICutlassFont defaultFont)
        {
            if (!defaultFont.IsLoaded)
            {
                defaultFont.LoadContent();
            }

            _DefaultFont = defaultFont.Font;
        }
        /// <summary>
        /// Add a font of type ICutlassFont.
        /// </summary>
        /// <param name="newTexture"></param>
        public static FontId AddFont(ICutlassFont newFont)
        {
            FontId fontId;

            lock (_FontIdLock)
            {
                fontId = _NextFontId++;
            }

            _Fonts.Add(fontId, newFont);

            if (_Initialized)
                newFont.LoadContent();

            return fontId;
        }
Exemple #3
0
        /// <summary>
        /// Add a font of type ICutlassFont.
        /// </summary>
        /// <param name="newTexture"></param>
        public static FontId AddFont(ICutlassFont newFont)
        {
            FontId fontId;

            lock (_FontIdLock)
            {
                fontId = _NextFontId++;
            }

            _Fonts.Add(fontId, newFont);

            if (_Initialized)
            {
                newFont.LoadContent();
            }

            return(fontId);
        }
        /// <summary>
        /// Set the default font for the game.
        /// </summary>
        /// <param name="defaultFont"></param>
        public static void SetDefaultFont(ICutlassFont defaultFont)
        {
            if (!defaultFont.IsLoaded)
                defaultFont.LoadContent();

            _DefaultFont = defaultFont.Font;
        }