1 #ifndef EDITOR_COMPONENTS_CATCHREGIONWINDOW_HPP
2 #define EDITOR_COMPONENTS_CATCHREGIONWINDOW_HPP
4 #include <BLIB/Interfaces/GUI.hpp>
49 using Callback = std::function<void(bl::gui::Element*)>;
51 bl::gui::Box::Ptr row;
53 bl::gui::TextEntry::Ptr minLevel;
54 bl::gui::TextEntry::Ptr maxLevel;
55 bl::gui::Slider::Ptr freqSlider;
56 bl::gui::Label::Ptr freqLabel;
57 bl::gui::CheckButton::Ptr lockBut;
58 bl::gui::Button::Ptr delBut;
60 Row(
const Callback& freqChange,
const Callback& del);
63 bl::gui::Window::Ptr window;
64 bl::gui::TextEntry::Ptr nameEntry;
65 bl::gui::ScrollArea::Ptr peopleScroll;
66 std::vector<Row> rows;
71 void remove(bl::gui::Element* e);
72 void freqChange(bl::gui::Element* e);
73 bool validate()
const;
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.
CatchRegionWindow(const TriggerCb &onSave)
Construct a new Catch Region Window.
std::function< void()> TriggerCb
Called when the region is saved.
const core::map::CatchRegion & getValue()
Returns the current region value as inputed by the user.
void open(bl::gui::GUI *gui, const core::map::CatchRegion ®ion)
Opens the window with the given region value.
std::shared_ptr< PeoplemonSelector > Ptr