guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
guillaume::components::Scrim Class Reference

A translucent veil drawn over the whole bound of its entity, to dim what is behind a modal surface. More...

#include <headers/guillaume/components/scrim.hpp>

Inheritance diagram for guillaume::components::Scrim:
Collaboration diagram for guillaume::components::Scrim:

Public Member Functions

 Scrim (void)=default
 Create a half-transparent black scrim.
 ~Scrim (void)=default
 Default destructor.
utility::graphic::Color32Bit getColor (void) const
 Get the color of the veil.
Scrim & setColor (const utility::graphic::Color32Bit &color)
 Set the color of the veil.
Public Member Functions inherited from guillaume::ecs::Component
bool hasChanged (void) const
 Tell whether a value of the component changed since the flags were last reset (the end of the previous frame).
void setHasChanged (bool hasChanged)
 Raise or lower the changed flag.
 Component (void)=default
 Create a component that is not marked as changed.
virtual ~Component (void)=default
 Virtual destructor, so components can be destroyed through the base class.

Detailed Description

A translucent veil drawn over the whole bound of its entity, to dim what is behind a modal surface.

systems::ScrimRender reads it in the Render phase and draws one quad of this color covering the entity's Transform and Bound. On a backdrop entity, systems::Backdrop overwrites the color every frame to fade the veil in and out.

See also
systems::ScrimRender, components::Backdrop

Definition at line 43 of file scrim.hpp.

Member Function Documentation

◆ getColor()

utility::graphic::Color32Bit guillaume::components::Scrim::getColor ( void ) const

Get the color of the veil.

Returns
The color; its alpha is the strength of the dimming (0 is invisible, 255 hides what is behind).

Definition at line 27 of file scrim.cpp.

◆ setColor()

Scrim & guillaume::components::Scrim::setColor ( const utility::graphic::Color32Bit & color)

Set the color of the veil.

Marks the component changed only when the color differs.

Parameters
colorThe new color; its alpha is the strength of the dimming.
Returns
This component, for chaining.

Definition at line 32 of file scrim.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: