12345678910111213141516171819202122232425262728293031323334 |
- /*
- * 2D Game Engine
- * TextLabel.h:
- * Based on pikuma.com 2D game engine in C++ and Lua course
- * Copyright (c) 2021 986-Studio. All rights reserved.
- *
- * Created by Manoël Trapier on 27/02/2021.
- */
- #ifndef GAMEENGINE_SOURCE_INCLUDE_COMPONENTS_TEXTLABEL_H
- #define GAMEENGINE_SOURCE_INCLUDE_COMPONENTS_TEXTLABEL_H
- #include <SDL.h>
- #include <glm/glm.hpp>
- #include <string>
- struct TextLabelComponent
- {
- glm::vec2 position;
- std::string text;
- std::string fontId;
- SDL_Color fgColor;
- bool isFixed;
- TextLabelComponent(glm::vec2 position = glm::vec2(0, 0),
- std::string text = "",
- std::string fontId = "",
- SDL_Color fgColor = {0, 0, 0, 0},
- bool isFixed = true) : position(position), text(text), fontId(fontId), fgColor(fgColor), isFixed(isFixed) {};
- };
- #endif /* GAMEENGINE_SOURCE_INCLUDE_COMPONENTS_TEXTLABEL_H */
|