![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Light level slider. More...
#include <LightSlider.hpp>
Public Types | |
using | Ptr = std::shared_ptr< LightSlider > |
using | ChangeCb = std::function< void()> |
Public Member Functions | |
std::uint8_t | getLightLevel () const |
Returns the currently selected light level. More... | |
void | setLightLevel (std::uint8_t level) |
Sets the selected light level. More... | |
void | setPrompt (const std::string &prompt) |
Sets the text prompt that is displayed. More... | |
Static Public Member Functions | |
static Ptr | create (const std::string &prompt, const ChangeCb &onChange) |
Create a new light level slider. More... | |
Light level slider.
Definition at line 17 of file LightSlider.hpp.
using editor::component::LightSlider::ChangeCb = std::function<void()> |
Definition at line 20 of file LightSlider.hpp.
using editor::component::LightSlider::Ptr = std::shared_ptr<LightSlider> |
Definition at line 19 of file LightSlider.hpp.
|
static |
Create a new light level slider.
prompt | Text to display next to the slider |
onChange | Function to call when changed |
Definition at line 9 of file LightSlider.cpp.
std::uint8_t editor::component::LightSlider::getLightLevel | ( | ) | const |
Returns the currently selected light level.
Definition at line 36 of file LightSlider.cpp.
void editor::component::LightSlider::setLightLevel | ( | std::uint8_t | level | ) |
Sets the selected light level.
Definition at line 40 of file LightSlider.cpp.
void editor::component::LightSlider::setPrompt | ( | const std::string & | prompt | ) |
Sets the text prompt that is displayed.
Definition at line 45 of file LightSlider.cpp.