![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Provides controls to add, move, remove, and toggle visibility for levels. More...
#include <Levels.hpp>
Public Types | |
using | RenderFilterCb = std::function< void(unsigned int level, bool visible)> |
using | ShiftCb = std::function< void(unsigned int level, bool up)> |
using | AddCb = std::function< void()> |
Public Member Functions | |
Levels (const RenderFilterCb &filterCb, const ShiftCb &onShift, const AddCb &addCb) | |
Construct a new Levels subpage. More... | |
void | sync (const std::vector< bool > &filter) |
Syncs the number of levels and their visible status. More... | |
bl::gui::Box::Ptr | getContent () |
Returns the GUI content to pack. More... | |
void | pack () |
Packs the GUI content. More... | |
void | unpack () |
Hides the GUI content. Good for saving space when not active. More... | |
Provides controls to add, move, remove, and toggle visibility for levels.
Definition at line 16 of file Levels.hpp.
using editor::page::Levels::AddCb = std::function<void()> |
Definition at line 20 of file Levels.hpp.
using editor::page::Levels::RenderFilterCb = std::function<void(unsigned int level, bool visible)> |
Definition at line 18 of file Levels.hpp.
using editor::page::Levels::ShiftCb = std::function<void(unsigned int level, bool up)> |
Definition at line 19 of file Levels.hpp.
editor::page::Levels::Levels | ( | const RenderFilterCb & | filterCb, |
const ShiftCb & | onShift, | ||
const AddCb & | addCb | ||
) |
Construct a new Levels subpage.
filterCb | Shows or hides a level |
shiftCb | Called when a layer is moved up or down |
addCb | Called when a level is created |
Definition at line 9 of file Levels.cpp.
Box::Ptr editor::page::Levels::getContent | ( | ) |
Returns the GUI content to pack.
Definition at line 28 of file Levels.cpp.
void editor::page::Levels::pack | ( | ) |
Packs the GUI content.
Definition at line 30 of file Levels.cpp.
void editor::page::Levels::sync | ( | const std::vector< bool > & | filter | ) |
Syncs the number of levels and their visible status.
filter | The current render filter for levels |
Definition at line 34 of file Levels.cpp.
void editor::page::Levels::unpack | ( | ) |
Hides the GUI content. Good for saving space when not active.
Definition at line 32 of file Levels.cpp.