vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
ui_shape.h
1#pragma once
2
3#include <glm/glm.hpp>
4
5#include "core/reflect.h"
6
7namespace Vkm::Engine {
8
15struct UIShape {
16 float cornerRadius = 0.0f;
18 float borderWidth = 0.0f;
19 glm::vec4 borderColor = {1.0f, 1.0f, 1.0f, 1.0f};
21 bool gradient = false;
23 glm::vec4 bottomColor = {1.0f, 1.0f, 1.0f, 1.0f};
24};
25
26} // namespace Vkm::Engine
27
28VKM_REFLECT_BEGIN(::Vkm::Engine::UIShape)
29 VKM_F(cornerRadius)
30 VKM_F(borderWidth)
31 VKM_F(borderColor)
32 VKM_F(gradient)
33 VKM_F(bottomColor)
34VKM_REFLECT_END()
How a filled quad is drawn beyond its flat tint: corners, an edge, a fade.
Definition ui_shape.h:15
float cornerRadius
Definition ui_shape.h:16
bool gradient
Fade the fill toward bottomColor at the bottom edge.
Definition ui_shape.h:21
float borderWidth
Edge stroke inside the rect, reference pixels; 0 = none.
Definition ui_shape.h:18
glm::vec4 borderColor
Definition ui_shape.h:19
glm::vec4 bottomColor
The fill at the bottom edge when gradient is set.
Definition ui_shape.h:23