public override void Draw(float t) { base.Draw(t); this.drawOutline(); this.drawTarget("app:"); if (this.effect == null) { this.effect = new FlyoutEffect(this.spriteBatch.GraphicsDevice, this.os.content, this.bounds.Width - 2, this.bounds.Height - 2); } float num = 1f; if ((double)this.elapsedTime < 6.0) { num = this.elapsedTime / 6f; } Rectangle contentAreaDest = this.GetContentAreaDest(); if (contentAreaDest.Height <= 2) { return; } if (this.isExiting) { ++this.framesFlashed; } this.effect.Draw((float)this.os.lastGameTime.ElapsedGameTime.TotalSeconds, contentAreaDest, this.spriteBatch, 50f * num, 3, 100f * Utils.QuadraticOutCurve(1f - num), this.os.highlightColor, false, this.isExiting && this.framesFlashed % 30 <= 3); }
public override void Draw(float t) { base.Draw(t); this.drawOutline(); this.drawTarget("app:"); Rectangle contentAreaDest = this.GetContentAreaDest(); if (this.flyoutEffect == null) { this.flyoutEffect = new FlyoutEffect(GuiData.spriteBatch.GraphicsDevice, this.os.content, contentAreaDest.Width, contentAreaDest.Height); } this.flyoutEffect.Draw((float)this.os.lastGameTime.ElapsedGameTime.TotalSeconds, contentAreaDest, this.spriteBatch, (Action <SpriteBatch, Rectangle>)((sb, innerDest) => ZoomingDotGridEffect.Render(innerDest, sb, this.os.timer, this.ThemeColorDark))); this.spriteBatch.Draw(Utils.white, contentAreaDest, Color.Black * 0.6f); if (this.isExiting) { return; } Rectangle rectangle = new Rectangle(contentAreaDest.X + 8, contentAreaDest.Y + contentAreaDest.Height - 30 - 8, contentAreaDest.Width - 16, 30); if (Button.doButton(383023811 + this.PID, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, LocaleTerms.Loc("Exit"), new Color?(this.os.lockedColor))) { this.isExiting = true; } rectangle.Y -= rectangle.Height + 8; if (Button.doButton(383023822 + this.PID, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, this.DisplayOverrideIsActive ? LocaleTerms.Loc("Close Main Display") : LocaleTerms.Loc("Re-Open Main Display"), new Color?(this.ThemeColorMain))) { this.DisplayOverrideIsActive = !this.DisplayOverrideIsActive; } }
public void Draw2(Rectangle bounds, SpriteBatch spriteBatch, float totalTime, float timeRemaining, float extraTime = 0.0f, float dt = 0.0f) { if (this.flyout == null) { this.flyout = new FlyoutEffect(GuiData.spriteBatch.GraphicsDevice, OS.currentInstance.content, bounds.Width, bounds.Height); } this.flyout.Draw(dt, bounds, spriteBatch, (Action <SpriteBatch, Rectangle>)((sb, dest) => this.DrawLoading(timeRemaining, totalTime, dest, sb, OS.currentInstance.highlightColor, extraTime))); }