Peoplemon  0.1.0
Peoplemon 3 game source documentation
Classes | Public Types | Public Member Functions | List of all members
editor::page::Levels Class Reference

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

Detailed Description

Provides controls to add, move, remove, and toggle visibility for levels.

Definition at line 16 of file Levels.hpp.

Member Typedef Documentation

◆ AddCb

using editor::page::Levels::AddCb = std::function<void()>

Definition at line 20 of file Levels.hpp.

◆ RenderFilterCb

using editor::page::Levels::RenderFilterCb = std::function<void(unsigned int level, bool visible)>

Definition at line 18 of file Levels.hpp.

◆ ShiftCb

using editor::page::Levels::ShiftCb = std::function<void(unsigned int level, bool up)>

Definition at line 19 of file Levels.hpp.

Constructor & Destructor Documentation

◆ Levels()

editor::page::Levels::Levels ( const RenderFilterCb filterCb,
const ShiftCb onShift,
const AddCb addCb 
)

Construct a new Levels subpage.

Parameters
filterCbShows or hides a level
shiftCbCalled when a layer is moved up or down
addCbCalled when a level is created

Definition at line 9 of file Levels.cpp.

Member Function Documentation

◆ getContent()

Box::Ptr editor::page::Levels::getContent ( )

Returns the GUI content to pack.

Definition at line 28 of file Levels.cpp.

◆ pack()

void editor::page::Levels::pack ( )

Packs the GUI content.

Definition at line 30 of file Levels.cpp.

◆ sync()

void editor::page::Levels::sync ( const std::vector< bool > &  filter)

Syncs the number of levels and their visible status.

Parameters
filterThe current render filter for levels

Definition at line 34 of file Levels.cpp.

◆ unpack()

void editor::page::Levels::unpack ( )

Hides the GUI content. Good for saving space when not active.

Definition at line 32 of file Levels.cpp.


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