private void UpdateGraphics() { Sigil.update(); Banner.update(); Banner_Bg.update(); Black_Fill.update(); Text.update(); if (AlternateTitle != null) { AlternateTitle.Update(); } }
public override void draw(SpriteBatch sprite_batch, Vector2 draw_offset = default(Vector2)) { if (texture != null) { if (visible) { // Background/Sigil sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null); Rectangle src_rect = this.src_rect; Vector2 offset = this.offset; if (mirrored) { offset.X = src_rect.Width - offset.X; } for (int y = 0; y < Loop; y++) { for (int x = 0; x < Loop; x++) { sprite_batch.Draw(texture, loc + draw_vector() + new Vector2(x * Bmp_Width, y * Bmp_Width), src_rect, tint, angle, offset, scale, mirrored ? SpriteEffects.FlipHorizontally : SpriteEffects.None, Z); } } Sigil.draw(sprite_batch); Banner_Bg.draw(sprite_batch); sprite_batch.End(); // Banner Effect text_shader = Global.effect_shader(); if (text_shader != null) { text_shader.CurrentTechnique = text_shader.Techniques["Technique2"]; text_shader.Parameters["color_shift"].SetValue(Banner_Color.ToVector4()); } sprite_batch.GraphicsDevice.ScissorRectangle = Scene_Map.fix_rect_to_screen(Text_Scissor_Rect); if (sprite_batch.GraphicsDevice.ScissorRectangle.Width > 0 && sprite_batch.GraphicsDevice.ScissorRectangle.Width > 0) { sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, Text_State, text_shader); Banner.draw(sprite_batch); sprite_batch.End(); } // Text if (text_shader != null) { text_shader.CurrentTechnique = text_shader.Techniques["Technique2"]; text_shader.Parameters["color_shift"].SetValue(Text_Color.ToVector4()); } sprite_batch.GraphicsDevice.ScissorRectangle = Scene_Map.fix_rect_to_screen(Text_Scissor_Rect); if (sprite_batch.GraphicsDevice.ScissorRectangle.Width > 0 && sprite_batch.GraphicsDevice.ScissorRectangle.Width > 0) { sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, Text_State, text_shader); Text.draw(sprite_batch); sprite_batch.End(); } // Alternate Title if (AlternateTitle != null) { AlternateTitle.Draw(sprite_batch); } sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null); // Black screen Black_Fill.draw(sprite_batch); sprite_batch.End(); } } }