Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Types | Public Member Functions | Static Public Member Functions | List of all members
editor::component::LightSlider Class Reference

Light level slider. More...

#include <LightSlider.hpp>

+ Inheritance diagram for editor::component::LightSlider:

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...
 

Detailed Description

Light level slider.

Definition at line 17 of file LightSlider.hpp.

Member Typedef Documentation

◆ ChangeCb

using editor::component::LightSlider::ChangeCb = std::function<void()>

Definition at line 20 of file LightSlider.hpp.

◆ Ptr

Definition at line 19 of file LightSlider.hpp.

Member Function Documentation

◆ create()

LightSlider::Ptr editor::component::LightSlider::create ( const std::string &  prompt,
const ChangeCb onChange 
)
static

Create a new light level slider.

Parameters
promptText to display next to the slider
onChangeFunction to call when changed
Returns
Ptr The new slider

Definition at line 9 of file LightSlider.cpp.

◆ getLightLevel()

std::uint8_t editor::component::LightSlider::getLightLevel ( ) const

Returns the currently selected light level.

Definition at line 36 of file LightSlider.cpp.

◆ setLightLevel()

void editor::component::LightSlider::setLightLevel ( std::uint8_t  level)

Sets the selected light level.

Definition at line 40 of file LightSlider.cpp.

◆ setPrompt()

void editor::component::LightSlider::setPrompt ( const std::string &  prompt)

Sets the text prompt that is displayed.

Definition at line 45 of file LightSlider.cpp.


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