1 #ifndef EDITOR_PAGES_SUBPAGES_CATCHABLES_HPP
2 #define EDITOR_PAGES_SUBPAGES_CATCHABLES_HPP
4 #include <BLIB/Interfaces/GUI.hpp>
38 void setGUI(bl::gui::GUI* gui);
56 static sf::Color
getColor(std::uint8_t index);
68 bl::gui::Box::Ptr content;
69 bl::gui::ScrollArea::Ptr scrollRegion;
70 bl::gui::RadioButton::Ptr noCatchBut;
71 std::vector<bl::gui::Box::Ptr> rows;
75 enum RowAction { Edit, Remove, Select };
76 using RowSelect = std::function<void(
const bl::gui::Box*, RowAction)>;
79 bl::gui::RadioButton::Group* group);
80 void rowClicked(
const bl::gui::Box* row, RowAction action);
All classes and functionality used for implementing the game editor.
Represents a class of catchable peoplemon.
Window that opens to edit a catch region in maps.
Wrapper over the core::Map class that is directly usable in a bl::gui::GUI.
Editor subpage for selecting catch tiles to place.
void setGUI(bl::gui::GUI *gui)
Sets the parent GUI object.
void refresh()
Refreshes GUI elements.
Catchables(component::EditMap &map)
Construct a new Catchables GUI.
static sf::Color getColor(std::uint8_t index)
Returns the color to use for the given catch region.
std::uint8_t selected() const
Returns the currently selected catch type.
bl::gui::Element::Ptr getContent()
Returns the GUI element to pack.