示例#1
0
        private void Preload(ZipArchive archive)
        {
            if (IsPreLoaded)
            {
                return;
            }

            LoadMeta(archive);

            // First load the font, then we can render the splash screen!
            LoadFont(archive);

            IsPreLoaded = true;

            PreloadCallback?.Invoke(FontBitmap, BitmapFontCharacters.ToCharArray().ToList());
        }
示例#2
0
        private void Preload(ZipArchive archive)
        {
            if (IsPreLoaded)
            {
                return;
            }

            LoadMeta(archive);

            // First load the font, then we can render the splash screen!
            LoadFont(archive);

            IsPreLoaded = true;

            PreloadCallback?.Invoke(Font);
        }
示例#3
0
        private void LoadBitmapFont(ZipArchiveEntry entry)
        {
            var match = IsFontTextureResource.Match(entry.FullName);

            var fontBitmap = LoadBitmap(entry, match);

            LoadTexture(entry, match);

            FontBitmap = fontBitmap;

            if (!DidPreload)
            {
                DidPreload = true;

                PreloadCallback?.Invoke(FontBitmap, BitmapFontCharacters.ToCharArray().ToList());
            }

            //Log.Info($"Font pixelformat: {fontBitmap.PixelFormat} | RawFormat: {fontBitmap.RawFormat}");
            //Font = new BitmapFont(Graphics, fontBitmap, 16, BitmapFontCharacters.ToCharArray().ToList());
        }