ST_engine
0.3-ALPHA
ST_dev_console
src
main
console_log.hpp
1
/* This file is part of the "ST" project.
2
* You may use, distribute or modify this code under the terms
3
* of the GNU General Public License version 2.
4
* See LICENCE.txt in the root directory of the project.
5
*
6
* Author: Maxim Atanasov
7
* E-mail: maxim.atanasov@protonmail.com
8
*/
9
10
#ifndef CONSOLE_LOG_HPP
11
#define CONSOLE_LOG_HPP
12
13
14
#include <cstdint>
15
#include <string>
16
#include <SDL_pixels.h>
17
18
namespace
ST {
19
23
enum class
log_type : uint8_t {
24
ERROR = 0x01, SUCCESS = 0x02, INFO = 0x04
25
};
26
33
inline
log_type operator|(log_type a, log_type b) {
34
return
static_cast<
log_type
>
(
static_cast<
uint8_t
>
(a) |
static_cast<
uint8_t
>
(b));
35
}
36
38
41
class
console_log
{
42
public
:
43
ST::log_type type;
44
std::string
text
;
45
46
console_log
(log_type type,
const
std::string &
text
) {
47
this->type = type;
48
this->text =
text
;
49
}
50
};
51
}
52
53
54
#endif
ST::console_log
Represents a log message to be displayed in the console.
Definition:
console_log.hpp:41
ST::text
This struct represents text objects in the game.
Definition:
text.hpp:23
Generated by
1.9.1