Exemple #1
0
        public override void Draw(GameTime gameTime, GraphicsDevice graphicsDevice, SpriteBatch spriteBatch)
        {
            graphicsDevice.SetRenderTarget(theaterRenderTexture);
            Theater.Draw(spriteBatch);

            graphicsDevice.SetRenderTarget(mainRenderTexture);
            graphicsDevice.Clear(Color.Gray);
            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, null);

            Canvas.Draw(spriteBatch);

            Rectangle theaterDestRect = new Rectangle(Point.Zero, (new Vector2(1080, 462)).ToPoint());

            if (Theater.Active)
            {
                spriteBatch.Draw(theaterRenderTexture, theaterDestRect, Color.White);
            }

            spriteBatch.End();


            graphicsDevice.SetRenderTarget(null);
            graphicsDevice.Clear(Color.Black);
            Rectangle mainDestRect = new Rectangle(renderTextureOffset.ToPoint(), (new Vector2(1080, 1920) * renderTextureScale).ToPoint());

            spriteBatch.Begin();
            spriteBatch.Draw(mainRenderTexture, mainDestRect, MainTextureTintColor);
            spriteBatch.DrawString(ContentLibrary.GetFont(FontList.Sans_serif), "karim2989.itch.io & wassim tounsi", Vector2.Zero, new Color(100, 100, 100, 20), 0, Vector2.Zero, .3f, SpriteEffects.None, 0);
            spriteBatch.End();
        }
Exemple #2
0
 public MessageBox(Element parent, Sprite sprite, Point position, Point size, string[] bodyMessage, string bottomMessage, bool centralizeText = false) : base(parent, sprite, position, size, GamePlayScreen.renderTextureScale)
 {
     smallfont           = ContentLibrary.GetFont(FontList.Sans_serif);
     largefont           = ContentLibrary.GetFont(FontList.Sans_serif_large);
     this.bodyMessage    = bodyMessage;
     this.bottomMessage  = bottomMessage;
     this.centralizeText = centralizeText;
 }