public static void OnDrawTick() { GameLocation location = Game1.currentLocation; bool inCave = location is MineShaft || location is FarmCave; bool frozen = (CJBCheatsMenu.Config.FreezeTimeInside && !location.IsOutdoors && !inCave) || (CJBCheatsMenu.Config.FreezeTimeCaves && inCave); frozen = frozen || CJBCheatsMenu.Config.FreezeTime; if (frozen) { CJB.DrawTextBox(5, inCave ? 100 : 5, Game1.smallFont, "Time Frozen"); } }
public override void draw(SpriteBatch spriteBatch) { if (!Game1.options.showMenuBackground) { spriteBatch.Draw(Game1.fadeToBlackRect, Game1.graphics.GraphicsDevice.Viewport.Bounds, Color.Black * 0.4f); } Game1.drawDialogueBox(this.xPositionOnScreen, this.yPositionOnScreen, this.width, this.height, false, true); CJB.DrawTextBox(this.Title.bounds.X, this.Title.bounds.Y, Game1.borderFont, this.Title.name, 1); spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.NonPremultiplied, SamplerState.PointClamp, null, null); for (int index = 0; index < this.OptionSlots.Count; ++index) { if (this.CurrentItemIndex >= 0 && this.CurrentItemIndex + index < this.Options.Count) { this.Options[this.CurrentItemIndex + index].draw(spriteBatch, this.OptionSlots[index].bounds.X, this.OptionSlots[index].bounds.Y + 5); } } spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null); if (!GameMenu.forcePreventClose) { for (int i = 0; i < this.Tabs.Count; i++) { ClickableComponent tab = this.Tabs[i]; CJB.DrawTextBox(tab.bounds.X + tab.bounds.Width, tab.bounds.Y, Game1.smallFont, tab.name, 2, this.TabIndex == i ? 1F : 0.7F); } this.UpArrow.draw(spriteBatch); this.DownArrow.draw(spriteBatch); if (this.Options.Count > CheatsMenu.ItemsPerPage) { IClickableMenu.drawTextureBox(spriteBatch, Game1.mouseCursors, new Rectangle(403, 383, 6, 6), this.ScrollbarRunner.X, this.ScrollbarRunner.Y, this.ScrollbarRunner.Width, this.ScrollbarRunner.Height, Color.White, Game1.pixelZoom, false); this.Scrollbar.draw(spriteBatch); } } if (this.HoverText != "") { IClickableMenu.drawHoverText(spriteBatch, this.HoverText, Game1.smallFont); } if (!Game1.options.hardwareCursor) { spriteBatch.Draw(Game1.mouseCursors, new Vector2(Game1.getOldMouseX(), Game1.getOldMouseY()), Game1.getSourceRectForStandardTileSheet(Game1.mouseCursors, Game1.options.gamepadControls ? 44 : 0, 16, 16), Color.White, 0f, Vector2.Zero, Game1.pixelZoom + Game1.dialogueButtonScale / 150f, SpriteEffects.None, 1f); } }