Shkyera Engine
Easy to use, game engine for Python
Loading...
Searching...
No Matches
shkyera::EnumSelector< EnumType > Class Template Reference

#include <EnumSelector.hpp>

Public Member Functions

 EnumSelector (const std::string &title, EnumType value, const std::map< EnumType, std::string > &options)
 
void setUpdateCallback (std::function< void(EnumType value)> callback)
 
void draw ()
 

Private Attributes

std::string _title
 
EnumType _value
 
std::map< EnumType, std::string > _options
 
std::function< void(EnumType value)> _updateCallback
 

Constructor & Destructor Documentation

◆ EnumSelector()

template<typename EnumType >
shkyera::EnumSelector< EnumType >::EnumSelector ( const std::string &  title,
EnumType  value,
const std::map< EnumType, std::string > &  options 
)
inline

Member Function Documentation

◆ draw()

template<typename EnumType >
void shkyera::EnumSelector< EnumType >::draw ( )
inline

◆ setUpdateCallback()

template<typename EnumType >
void shkyera::EnumSelector< EnumType >::setUpdateCallback ( std::function< void(EnumType value)>  callback)
inline

Member Data Documentation

◆ _options

template<typename EnumType >
std::map<EnumType, std::string> shkyera::EnumSelector< EnumType >::_options
private

◆ _title

template<typename EnumType >
std::string shkyera::EnumSelector< EnumType >::_title
private

◆ _updateCallback

template<typename EnumType >
std::function<void(EnumType value)> shkyera::EnumSelector< EnumType >::_updateCallback
private

◆ _value

template<typename EnumType >
EnumType shkyera::EnumSelector< EnumType >::_value
private

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