1 #ifndef EDITOR_PAGES_SUBPAGES_LEVELS_HPP
2 #define EDITOR_PAGES_SUBPAGES_LEVELS_HPP
4 #include <BLIB/Interfaces/GUI.hpp>
18 using RenderFilterCb = std::function<void(
unsigned int level,
bool visible)>;
19 using ShiftCb = std::function<void(
unsigned int level,
bool up)>;
20 using AddCb = std::function<void()>;
37 void sync(
const std::vector<bool>& filter);
59 bl::gui::Box::Ptr row;
60 bl::gui::Label::Ptr name;
61 bl::gui::CheckButton::Ptr visibleToggle;
62 bl::gui::Button::Ptr upBut;
63 bl::gui::Button::Ptr downBut;
64 bl::gui::Button::Ptr delBut;
66 Item(
unsigned int i,
unsigned int mi,
bool visible,
const RenderFilterCb& filterCb,
73 bl::gui::Box::Ptr contentWrapper;
74 bl::gui::Box::Ptr content;
75 bl::gui::ComboBox::Ptr activeSelect;
76 bl::gui::ComboBox::Ptr firstYSortSelect;
77 bl::gui::ComboBox::Ptr firstTopSelect;
78 bl::gui::ScrollArea::Ptr itemArea;
79 std::vector<Item> rows;
All classes and functionality used for implementing the game editor.
Provides controls to add, move, remove, and toggle visibility for levels.
void unpack()
Hides the GUI content. Good for saving space when not active.
bl::gui::Box::Ptr getContent()
Returns the GUI content to pack.
Levels(const RenderFilterCb &filterCb, const ShiftCb &onShift, const AddCb &addCb)
Construct a new Levels subpage.
std::function< void(unsigned int level, bool up)> ShiftCb
void pack()
Packs the GUI content.
void sync(const std::vector< bool > &filter)
Syncs the number of levels and their visible status.
std::function< void()> AddCb
std::function< void(unsigned int level, bool visible)> RenderFilterCb