vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::UIShape Struct Reference

How a filled quad is drawn beyond its flat tint: corners, an edge, a fade. More...

#include <ui_shape.h>

Public Attributes

float cornerRadius = 0.0f
float borderWidth = 0.0f
 Edge stroke inside the rect, reference pixels; 0 = none.
glm::vec4 borderColor = {1.0f, 1.0f, 1.0f, 1.0f}
bool gradient = false
 Fade the fill toward bottomColor at the bottom edge.
glm::vec4 bottomColor = {1.0f, 1.0f, 1.0f, 1.0f}
 The fill at the bottom edge when gradient is set.

Detailed Description

How a filled quad is drawn beyond its flat tint: corners, an edge, a fade.

Defaults draw the flat rectangle. A radius past half the shorter side is clamped there. The gradient runs from the quad's own colour (a button's state colour) down.

Member Data Documentation

◆ cornerRadius

float Vkm::Engine::UIShape::cornerRadius = 0.0f

Reference pixels.

◆ borderColor

glm::vec4 Vkm::Engine::UIShape::borderColor = {1.0f, 1.0f, 1.0f, 1.0f}

The stroke's straight RGBA.


The documentation for this struct was generated from the following file: