Skip to content

Struct Engine::Opacity

ClassList > Engine > Opacity

Per-entity transparency multiplier applied at render time. More...

  • #include <Opacity.hpp>

Public Attributes

Type Name
float alpha = 1.0f
Transparency multiplier in [0.0, 1.0].
bool inheritToChildren = true
When true (default), this entity's opacity multiplies into descendants.

Public Static Functions

Type Name
Opacity Create (float alpha=1.0f, bool inheritToChildren=true)

Detailed Description

A value of 1.0 is fully opaque, 0.0 fully transparent. Sprite, shape and text renderers multiply their base alpha by the effective alpha: the entity's own value times every ancestor's value whose inheritToChildren is set. Inheritance is on by default; unchecking it keeps the entity's own opacity local to itself (descendants ignore that node only).

Public Attributes Documentation

variable alpha

Transparency multiplier in [0.0, 1.0].

float Engine::Opacity::alpha;


variable inheritToChildren

When true (default), this entity's opacity multiplies into descendants.

bool Engine::Opacity::inheritToChildren;


Public Static Functions Documentation

function Create

static inline Opacity Engine::Opacity::Create (
    float alpha=1.0f,
    bool inheritToChildren=true
) 


The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Components/Opacity.hpp