public void Draw(SpriteBatch sb_) { if (isActive) { for (int i = 0; i < texts.Count; i++) { currentHeight = drawer.DrawText("aaa", texts[i], new Rectangle(10, (int)Math.Round(poses[i]), virtualDims.X * 2 / 5 - 12, 666), sb_).Height; } } }
void DrawUI() { scenes.SelectScene("UI"); scenes.SetupScene(spriteBatch, GraphicsDevice); uis[currentUInb].Draw(spriteBatch); if (gameState == GameState.Dead) { fdrawer.DrawText("realfont", score.ToString(), new Rectangle(124, 60, 224, 160), spriteBatch); scoretex.Draw(spriteBatch, new Vector2(44, 60)); } spriteBatch.End(); }
} //draw to game scene void DrawMenu() { scenes.SelectScene("menu"); scenes.SetupScene(spriteBatch, GraphicsDevice); if (currentState == GameState.Game) { mm.SetCompletion((float)GameData.madness / 100); mm.Draw(spriteBatch, new Vector2(10, 165)); dd.SetCompletion(gameTick.timer / gameTick.time); dd.Draw(spriteBatch, new Vector2(260, 165)); DrawMeter(GameData.madness / 2, new Vector2(10, 165)); //if (GameData.cultExists) // DrawMeter(GameData.daysUntilDoom * 5, new Vector2(135, 165)); DrawMeter((int)((gameTick.timer / gameTick.time) * 50), new Vector2(260, 165)); } if (currentSubState == GameSubState.Pause) { pauseBG.Draw(spriteBatch, Vector2.Zero); fdrawer.DrawText("font", "Pause", new Rectangle(140, 10, 40, 11), spriteBatch); } //DRAW currentUI.Draw(spriteBatch); fdrawer.DrawText("font", tooltipText, new Rectangle((int)tooltipPos.X, (int)tooltipPos.Y, 320 - (int)tooltipPos.X, 180), spriteBatch); spriteBatch.End(); } //draw to menu scene