Toast Engine
Loading...
Searching...
No Matches
value.hpp File Reference

Value type shared by triggers, modifiers and actionsg. More...

#include "keycodes.hpp"
#include <array>
#include <cmath>
#include <glm/glm.hpp>
Include dependency graph for value.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  input::Value
 A tagged value that may represent a bool, a float or a glm::vec2. More...
struct  input::SignalList
 Fixed-capacity buffer of discrete events fired in a single frame. More...
struct  input::InputSample
 One frame of raw input for a single keycode. More...
struct  input::EvalContext
 Per-frame context passed down to triggers and modifiers during evaluation. More...

Enumerations

enum class  input::ValueType : uint8_t { axis_0d , axis_1d , axis_2d }
 Value domain of an action or an input sample. More...
enum class  input::ActionEvent : uint8_t {
  start , hold , release , tries ,
  countdown , cancelled
}
 Discrete event an action can emit, carried alongside the action in an InputEvent. More...

Detailed Description

Value type shared by triggers, modifiers and actionsg.

Author
Xein
Date
21 Jun 2026

Enumeration Type Documentation

◆ ActionEvent

enum class input::ActionEvent : uint8_t
strong

Discrete event an action can emit, carried alongside the action in an InputEvent.

Enumerator
start 

the input went from off to on

hold 

the input is held; sent continuously or on a pulse

release 

the input went from on to off

tries 

the input was pressed but a countdown must elapse before it starts

countdown 

equivalent of hold while the start countdown is running

cancelled 

the input was released before the countdown finished

◆ ValueType

enum class input::ValueType : uint8_t
strong

Value domain of an action or an input sample.

Enumerator
axis_0d 

boolean

axis_1d 

float

axis_2d 

vector