forked from stefanhendriks/Dune-II---The-Maker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConsole.hpp
38 lines (30 loc) · 811 Bytes
/
Console.hpp
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
#ifndef CONSOLE_HPP
#define CONSOLE_HPP
#include <SFGUI/SFGUI.hpp>
#include <map>
#include "Unit.hpp"
#include "Player.hpp"
class Console
{
public:
Console(MessageSystem& messages, const std::vector<Player>& players);
void update(sf::Time dt);
void handleEvent(sf::Event event);
void display(sf::RenderWindow& screen);
void toggle();
private:
sfg::SFGUI sfgui;
sfg::Desktop desktop;
sfg::Box::Ptr chatLayout;
sfg::Box::Ptr chatAreaLayout;
sfg::Entry::Ptr chatEntry;
sfg::ScrolledWindow::Ptr chatWindow;
sfg::Window::Ptr window;
MessageSystem& messages;
void dataReady();
void toConsole(std::string toWrite);
void autoscroll();
std::map<std::string, Unit::Type> unitMap;
const std::vector<Player>& players;
};
#endif // CONSOLE_HPP