Toast Engine
Loading...
Searching...
No Matches
input::ReleaseTrigger Class Reference

Fires once when the input goes from on to off. More...

#include <trigger.hpp>

Inheritance diagram for input::ReleaseTrigger:
Collaboration diagram for input::ReleaseTrigger:

Public Member Functions

 ReleaseTrigger (const toml::table &t, ValueType vt)
auto evaluate (const InputSample &sample, const EvalContext &) -> Result override
 Evaluates the trigger against the current input sample.
auto name () const -> std::string_view override
Public Member Functions inherited from input::ITrigger
 ITrigger (const ITrigger &)=default
auto operator= (const ITrigger &) -> ITrigger &=default

Additional Inherited Members

Static Public Member Functions inherited from input::ITrigger
static auto fromToml (const toml::table &table, ValueType vt) -> std::shared_ptr< ITrigger >
 Builds a trigger from a TOML table keyed by its "name" field.

Detailed Description

Fires once when the input goes from on to off.

Member Function Documentation

◆ evaluate()

auto input::ReleaseTrigger::evaluate ( const InputSample & sample,
const EvalContext & ctx ) -> Result
inlineoverridevirtual

Evaluates the trigger against the current input sample.

Parameters
sampleRaw input for the bound keycode this frame
ctxFrame context including delta time and viewport metrics
Returns
The contributed value and any discrete events fired

Implements input::ITrigger.

◆ name()

auto input::ReleaseTrigger::name ( ) const -> std::string_view
inlinenodiscardoverridevirtual

Implements input::ITrigger.


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