Exemplo n.º 1
0
        private void ShowSplashScreen()
        {
            // Do nothing when we're on DEBUG builds.
            // The splash is just annoying.
            const int SIZE_X = 600;
            const int SIZE_Y = 300;
            var       Size   = new Vector2i(SIZE_X, SIZE_Y);
            // Size of the NT logo in the bottom right.
            const float NT_SIZE_X = SIZE_X / 10f;
            const float NT_SIZE_Y = SIZE_Y / 10f;
            var         NTSize    = new Vector2(NT_SIZE_X, NT_SIZE_Y);
            var         window    = CluwneLib.ShowSplashScreen(new VideoMode(SIZE_X, SIZE_Y)).Graphics;

            var logo = _resourceCache.GetSprite("ss14_logo");

            logo.Position = Size / 2 - logo.TextureRect.Size / 2;

            var background = _resourceCache.GetSprite("ss14_logo_background");

            background.Scale = (Vector2)Size / background.TextureRect.Size;

            var nanotrasen = _resourceCache.GetSprite("ss14_logo_nt");

            nanotrasen.Scale    = NTSize / nanotrasen.TextureRect.Size;
            nanotrasen.Position = Size - NTSize - 5;
            nanotrasen.Color    = Color.White.WithAlpha(64);

            window.Draw(background);
            window.Draw(logo);
            window.Draw(nanotrasen);
            window.Display();
        }
Exemplo n.º 2
0
        private void ShowSplashScreen()
        {
            // Do nothing when we're on DEBUG builds.
            // The splash is just annoying.
#if !DEBUG
            const uint SIZE_X = 600;
            const uint SIZE_Y = 300;
            // Size of the NT logo in the bottom left.
            const float  NT_SIZE_X = SIZE_X / 10f;
            const float  NT_SIZE_Y = SIZE_Y / 10f;
            CluwneWindow window    = CluwneLib.ShowSplashScreen(new VideoMode(SIZE_X, SIZE_Y));

            var logoTexture = new Texture(_resourceManager.ContentFileRead(@"Textures/Logo/logo.png"));
            var logo        = new SFML.Graphics.Sprite(logoTexture);
            var logoSize    = logoTexture.Size;
            logo.Position = new Vector2f(SIZE_X / 2 - logoSize.X / 2, SIZE_Y / 2 - logoSize.Y / 2);

            var backgroundTexture = new Texture(_resourceManager.ContentFileRead(@"Textures/Logo/background.png"));
            var background        = new SFML.Graphics.Sprite(backgroundTexture);
            var backgroundSize    = backgroundTexture.Size;
            background.Scale = new Vector2f((float)SIZE_X / backgroundSize.X, (float)SIZE_Y / backgroundSize.Y);

            var nanotrasenTexture = new Texture(_resourceManager.ContentFileRead(@"Textures/Logo/nanotrasen.png"));
            var nanotrasen        = new SFML.Graphics.Sprite(nanotrasenTexture);
            var nanotrasenSize    = nanotrasenTexture.Size;
            nanotrasen.Scale    = new Vector2f(NT_SIZE_X / nanotrasenSize.X, NT_SIZE_Y / nanotrasenSize.Y);
            nanotrasen.Position = new Vector2f(SIZE_X - NT_SIZE_X - 5, SIZE_Y - NT_SIZE_Y - 5);
            nanotrasen.Color    = new Color(255, 255, 255, 64);

            window.Draw(background);
            window.Draw(logo);
            window.Draw(nanotrasen);
            window.Display();
#endif
        }
Exemplo n.º 3
0
        private void ShowSplashScreen()
        {
            // Do nothing when we're on DEBUG builds.
            // The splash is just annoying.
            const uint SIZE_X = 600;
            const uint SIZE_Y = 300;
            // Size of the NT logo in the bottom right.
            const float NT_SIZE_X = SIZE_X / 10f;
            const float NT_SIZE_Y = SIZE_Y / 10f;
            var         window    = CluwneLib.ShowSplashScreen(new VideoMode(SIZE_X, SIZE_Y)).Graphics;

            var logo = _resourceCache.GetSprite("ss14_logo");

            logo.Position = new Vector2f(SIZE_X / 2 - logo.TextureRect.Width / 2, SIZE_Y / 2 - logo.TextureRect.Height / 2);

            var background = _resourceCache.GetSprite("ss14_logo_background");

            background.Scale = new Vector2f((float)SIZE_X / background.TextureRect.Width, (float)SIZE_Y / background.TextureRect.Height);

            var nanotrasen = _resourceCache.GetSprite("ss14_logo_nt");

            nanotrasen.Scale    = new Vector2f(NT_SIZE_X / nanotrasen.TextureRect.Width, NT_SIZE_Y / nanotrasen.TextureRect.Height);
            nanotrasen.Position = new Vector2f(SIZE_X - NT_SIZE_X - 5, SIZE_Y - NT_SIZE_Y - 5);
            nanotrasen.Color    = new Color(255, 255, 255, 64);

            window.Draw(background);
            window.Draw(logo);
            window.Draw(nanotrasen);
            window.Display();
        }
Exemplo n.º 4
0
        private void ShowSplashScreen()
        {
            // Do nothing when we're on DEBUG builds.
            // The splash is just annoying.
#if !DEBUG
            const uint SIZE_X = 600;
            const uint SIZE_Y = 300;
            // Size of the NT logo in the bottom left.
            const float  NT_SIZE_X = SIZE_X / 10f;
            const float  NT_SIZE_Y = SIZE_Y / 10f;
            CluwneWindow window    = CluwneLib.ShowSplashScreen(new VideoMode(SIZE_X, SIZE_Y));

            var assembly = Assembly.GetExecutingAssembly();

            var logoTexture = new Texture(assembly.GetManifestResourceStream("SS14.Client._EmbeddedBaseResources.Logo.logo.png"));
            var logo        = new SFML.Graphics.Sprite(logoTexture);
            var logoSize    = logoTexture.Size;
            logo.Position = new Vector2f(SIZE_X / 2 - logoSize.X / 2, SIZE_Y / 2 - logoSize.Y / 2);

            var backgroundTexture = new Texture(assembly.GetManifestResourceStream("SS14.Client._EmbeddedBaseResources.Logo.background.png"));
            var background        = new SFML.Graphics.Sprite(backgroundTexture);
            var backgroundSize    = backgroundTexture.Size;
            background.Scale = new Vector2f((float)SIZE_X / backgroundSize.X, (float)SIZE_Y / backgroundSize.Y);

            var nanotrasenTexture = new Texture(assembly.GetManifestResourceStream("SS14.Client._EmbeddedBaseResources.Logo.nanotrasen.png"));
            var nanotrasen        = new SFML.Graphics.Sprite(nanotrasenTexture);
            var nanotrasenSize    = nanotrasenTexture.Size;
            nanotrasen.Scale    = new Vector2f(NT_SIZE_X / nanotrasenSize.X, NT_SIZE_Y / nanotrasenSize.Y);
            nanotrasen.Position = new Vector2f(SIZE_X - NT_SIZE_X - 5, SIZE_Y - NT_SIZE_Y - 5);
            nanotrasen.Color    = new Color(255, 255, 255, 64);

            window.Draw(background);
            window.Draw(logo);
            window.Draw(nanotrasen);
            window.Display();
#endif
        }