forked from Dzejrou/tdt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameLog.hpp
More file actions
60 lines (52 loc) · 1.18 KB
/
Copy pathGameLog.hpp
File metadata and controls
60 lines (52 loc) · 1.18 KB
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
56
57
58
59
60
#pragma once
#include "GUIWindow.hpp"
/**
* Class representing the log window used to show messages to the player.
* (No space for gold, enemies attacking etc.)
* Note: For debug/technical etc messages, see the Console class.
*/
class GameLog : public GUIWindow
{
public:
/**
* Constructor.
*/
GameLog();
/**
* Destructor.
*/
~GameLog() {}
/**
* Brief: Clears the game's log by deleting all it's entries.
*/
void clear();
/**
* Brief: Prints a string to the game's log.
* Param: String to be printed.
*/
void print(const std::string&);
/**
* Brief: Sets the amount of entries kept in the game's log.
* Param: The new log history.
*/
void set_history(std::size_t);
/**
* Brief: Returns the amoung of entries kept in the game's log.
*/
std::size_t get_history() const;
protected:
/**
* Brief: Initializes the game log (called by parent's init).
*/
void init_();
private:
/**
* Number of entires kept in the game log.
*/
std::size_t log_history_;
/**
* Pointer to the log window for easy access (as it might get called quite
* often, this will avoid frequent lookups).
*/
CEGUI::Listbox* log_;
};