aboutsummaryrefslogtreecommitdiff
path: root/Simulation/TextDisplay.hpp
blob: b46cefb8d04f4f26f590ad070b20b9337442a31e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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__