private void HudRenderer_RenderContent(On.Celeste.HudRenderer.orig_RenderContent orig, HudRenderer self, Monocle.Scene scene) { if (!Settings.Enabled) { orig(self, scene); return; } if (effectTime != Settings.EffectTime) { timerHelper.ChangeTimerIntervals(); effectTime = Settings.EffectTime; } Monocle.Draw.SpriteBatch.Begin(); if (Settings.EnableInfoPanel) { infoPanel.Update(); infoPanel.SetFont(Monocle.Draw.DefaultFont, Monocle.Draw.SpriteBatch.GraphicsDevice); infoPanel.Draw(Monocle.Draw.SpriteBatch); } if (Settings.ShowSeekerNames) { foreach (Seeker seeker in spawnHelper.spawnedSeekers) { SeekerName nameObj = seeker.Get <SeekerName>(); if (nameObj.Name != null) { string name = nameObj.Name; DrawTextOverObject(name, seeker.Position); } } } if (Settings.ShowSnowballNames) { foreach (Snowball snowball in spawnHelper.spawnedSnowballs) { SnowballName nameObj = snowball.Get <SnowballName>(); if (nameObj.Name != null) { string name = nameObj.Name; DrawTextOverObject(name, snowball.Position); } } } Monocle.Draw.SpriteBatch.End(); orig(self, scene); }
private void modRenderContent(On.Celeste.HudRenderer.orig_RenderContent orig, HudRenderer self, Scene scene) { orig(self, scene); if (ExtendedVariantsModule.Settings.ChangeVariantsRandomly && ExtendedVariantsModule.Settings.DisplayEnabledVariantsToScreen && !((scene as Level)?.Paused ?? false)) { Draw.SpriteBatch.Begin(); infoPanel.Render(); Draw.SpriteBatch.End(); } }
private static void HudRendererOnRenderContent(On.Celeste.HudRenderer.orig_RenderContent orig, HudRenderer self, Scene scene) { CenterTheCamera(() => orig(self, scene)); }