VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::ChoiceRow< T > Struct Template Reference

#include <MenuBuilder.hpp>

Public Member Functions

MenuItem ToItem () const
 

Public Attributes

std::string Label
 
std::vector< Labeled< T > > Choices
 
std::function< void(int slot, const T &value)> Commit
 
std::optional< ChoiceIndex > Bind
 
int Index = 0
 
EnabledCondition Enabled
 
ChoiceApply Apply = ChoiceApply::AfterStep
 

Detailed Description

template<class T>
struct VoltMod::ChoiceRow< T >

A labeled choice list. A/D wraps through the values.

Definition at line 89 of file MenuBuilder.hpp.

Member Function Documentation

◆ ToItem()

Member Data Documentation

◆ Apply

Definition at line 100 of file MenuBuilder.hpp.

Referenced by VoltMod::ChoiceRow< T >::ToItem().

◆ Bind

template<class T >
std::optional<ChoiceIndex> VoltMod::ChoiceRow< T >::Bind

Optional external home for the selection; unset keeps it in the row.

Definition at line 96 of file MenuBuilder.hpp.

Referenced by VoltMod::ChoiceRow< T >::ToItem().

◆ Choices

template<class T >
std::vector<Labeled<T> > VoltMod::ChoiceRow< T >::Choices

Definition at line 92 of file MenuBuilder.hpp.

Referenced by VoltMod::ChoiceRow< T >::ToItem().

◆ Commit

template<class T >
std::function<void(int slot, const T& value)> VoltMod::ChoiceRow< T >::Commit

Runs on E, or shortly after the last step unless Apply says otherwise.

Definition at line 94 of file MenuBuilder.hpp.

Referenced by VoltMod::ChoiceRow< T >::ToItem().

◆ Enabled

template<class T >
EnabledCondition VoltMod::ChoiceRow< T >::Enabled

Definition at line 99 of file MenuBuilder.hpp.

Referenced by VoltMod::ChoiceRow< T >::ToItem().

◆ Index

template<class T >
int VoltMod::ChoiceRow< T >::Index = 0

Where an unbound row starts.

Definition at line 98 of file MenuBuilder.hpp.

Referenced by VoltMod::ChoiceRow< T >::ToItem().

◆ Label

template<class T >
std::string VoltMod::ChoiceRow< T >::Label

Definition at line 91 of file MenuBuilder.hpp.

Referenced by VoltMod::ChoiceRow< T >::ToItem().


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