Cogs.Core
OverlayComponent.h
1#pragma once
2
3#include "Components/Core/SpriteRenderComponent.h"
4
5#include "Resources/Resources.h"
6#include "Resources/MaterialOptions.h"
7
8#include <glm/matrix.hpp>
9#include <glm/vec2.hpp>
10#include <glm/vec4.hpp>
11
12namespace Cogs
13{
14 namespace Core
15 {
20 {
21 public:
23 static void registerType();
24
27
29 glm::vec4 color = glm::vec4(1, 1, 1, 1);
30
32 glm::vec2 size = glm::vec2(0, 0);
33
36
39
42
54 glm::mat4 imageTransform = glm::mat4(1.0f);
55 };
56 }
57}
58
59template<> inline Cogs::StringView getName<Cogs::Core::OverlayComponent>() { return "OverlayComponent"; }
Base class for Component instances.
Definition: Component.h:143
BlendMode blendMode
Blend mode of the overlay.
SizeMode sizeMode
Size mode of the overlay.
glm::vec2 size
Size of the overlay.
PositionMode positionMode
Positioning mode of the overlay.
static void registerType()
Register the type in the type system.
glm::mat4 imageTransform
Image transform matrix that can be used to manipulate the appearance of the overlay without performin...
TextureHandle image
Image to display.
glm::vec4 color
Color to tint the overlay image with.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
PositionMode
Positioning mode.
@ Relative
Position given in normalized device coordinates, with [-1, -1] corresponding to the lower left of the...
BlendMode
Defines blending modes for rendering.
@ Blend
Render with regular alpha blending.
SizeMode
Sizing mode.
@ Relative
Size given in normalized device coordinates.
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
static const ResourceHandle_t NoHandle
Handle representing a default (or none if default not present) resource.