diff options
author | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 19:27:35 +0100 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 19:27:49 +0100 |
commit | 17909d029c6a8872b2fddf4e171d7925bbbe9c5c (patch) | |
tree | cbb08af84cd68d24acc362d593a2048b0fa79689 /Simulation/TextDisplay.hpp |
Diffstat (limited to 'Simulation/TextDisplay.hpp')
-rw-r--r-- | Simulation/TextDisplay.hpp | 55 |
1 files changed, 55 insertions, 0 deletions
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 <SFML/Graphics.hpp> + +#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__ |