ST_engine  0.3-ALPHA
text.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 TEXT_OBJECT_DEF
11 #define TEXT_OBJECT_DEF
12 
13 #include <cstdint>
14 #include <SDL_pixels.h>
15 #include <string>
16 
17 namespace ST {
18 
20 
23  struct text {
24 
25  text(int32_t x, int32_t y, SDL_Color color, const std::string &text_string, uint16_t font);
26 
27  //32 bytes
28  std::string text_string;
29 
30  //8 bytes
31  int32_t x, y;
32 
33  //4 bytes
34  SDL_Color color{};
35 
36  //2 bytes
37  uint16_t font;
38 
39  //1 byte
40  bool is_visible = true;
41 
42  //1 byte padding
43  uint8_t padding{};
44  };
45 }
46 
47 #endif
This struct represents text objects in the game.
Definition: text.hpp:23
text(int32_t x, int32_t y, SDL_Color color, const std::string &text_string, uint16_t font)
Definition: text.cpp:20