From 17909d029c6a8872b2fddf4e171d7925bbbe9c5c Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 19:27:35 +0100 Subject: Initial commit --- Simulation/TextDisplay.hpp | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Simulation/TextDisplay.hpp (limited to 'Simulation/TextDisplay.hpp') diff --git a/Simulation/TextDisplay.hpp b/Simulation/TextDisplay.hpp new file mode 100644 index 0000000..b46cefb --- /dev/null +++ b/Simulation/TextDisplay.hpp @@ -0,0 +1,55 @@ +#ifndef __TEXTDISPLAY_HPP__ +#define __TEXTDISPLAY_HPP__ + +#include + +#include "Params.hpp" + +class SimBase; + +class TextDisplay +{ +public: + bool startup(SimBase *sim, SimStyle style); + void print(); + +private: + SimBase *hSim = nullptr; + SimStyle sStyle; + + sf::Font font; + sf::RectangleShape leftPanel; + + // ON LEFT PANEL + sf::Text simState; + sf::Text steps; + // Separator + sf::Text fps; + sf::Text gfx; + sf::Text vSync; + // Separator + sf::Text worldRad; + // Separator + sf::Text zapperCnt; + sf::Text pelletCnt; + sf::Text guppieCnt; + sf::Text corpseCnt; + // Separator + sf::Text simStyle; + // If sim. style == sel. by fitness + sf::Text currentPop; + sf::Text currentGen; + // Separator + sf::Text longestLife; + // Left panel separators + sf::RectangleShape sepLP[5]; + + friend class SimBase; + friend class SimFitness; + friend class Entity; + friend class Pellet; + friend class Guppie; + friend class Corpse; +}; + +#endif // __TEXTDISPLAY_HPP__ -- cgit v1.2.1