![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Provides controls to add, move, remove, and toggle visibility for layers. More...
#include <Layers.hpp>
Public Types | |
using | AppendCb = std::function< void(unsigned int level)> |
using | DeleteCb = std::function< void(unsigned int level, unsigned int layer)> |
using | ShiftCb = std::function< void(unsigned int level, unsigned int layer, bool up)> |
using | RenderFilterCb = std::function< void(unsigned int level, unsigned int layer, bool visible)> |
Public Member Functions | |
Layers (const AppendCb &bottomAddCb, const AppendCb &ysortAddCb, const AppendCb &topAddCb, const DeleteCb &delCb, const ShiftCb &shiftCb, const RenderFilterCb &filterCb) | |
Construct a new Layers subpage. More... | |
void | sync (const std::vector< core::map::LayerSet > &levels, const std::vector< std::vector< bool >> &filter) |
Syncs the GUI elements with the map layers that exist. 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 layers.
Definition at line 17 of file Layers.hpp.
using editor::page::Layers::AppendCb = std::function<void(unsigned int level)> |
Definition at line 19 of file Layers.hpp.
using editor::page::Layers::DeleteCb = std::function<void(unsigned int level, unsigned int layer)> |
Definition at line 20 of file Layers.hpp.
using editor::page::Layers::RenderFilterCb = std::function<void(unsigned int level, unsigned int layer, bool visible)> |
Definition at line 22 of file Layers.hpp.
using editor::page::Layers::ShiftCb = std::function<void(unsigned int level, unsigned int layer, bool up)> |
Definition at line 21 of file Layers.hpp.
editor::page::Layers::Layers | ( | const AppendCb & | bottomAddCb, |
const AppendCb & | ysortAddCb, | ||
const AppendCb & | topAddCb, | ||
const DeleteCb & | delCb, | ||
const ShiftCb & | shiftCb, | ||
const RenderFilterCb & | filterCb | ||
) |
Construct a new Layers subpage.
bottomAddCb | Called when a new bottom layer should be created |
ysortAddCb | Called when a new ysort layer should be created |
topAddCb | Called when a new top layer should be created |
delCb | Called when a layer should be deleted |
shiftCb | Called when a layer should be shifted |
filterCb | Called when layer visibility changes |
Definition at line 11 of file Layers.cpp.
Box::Ptr editor::page::Layers::getContent | ( | ) |
Returns the GUI content to pack.
Definition at line 40 of file Layers.cpp.
void editor::page::Layers::pack | ( | ) |
Packs the GUI content.
Definition at line 42 of file Layers.cpp.
void editor::page::Layers::sync | ( | const std::vector< core::map::LayerSet > & | levels, |
const std::vector< std::vector< bool >> & | filter | ||
) |
Syncs the GUI elements with the map layers that exist.
levels | The levels in the map |
filter | The current render filter |
Definition at line 25 of file Layers.cpp.
void editor::page::Layers::unpack | ( | ) |
Hides the GUI content. Good for saving space when not active.
Definition at line 44 of file Layers.cpp.