1 #ifndef EDITOR_COMPONENTS_SCRIPTSELECTOR_HPP
2 #define EDITOR_COMPONENTS_SCRIPTSELECTOR_HPP
4 #include <BLIB/Interfaces/GUI.hpp>
20 using OnSelect = std::function<void(
const std::string&)>;
39 void open(bl::gui::GUI* parent,
const std::string& value = {});
44 bl::gui::Window::Ptr window;
45 bl::gui::TextEntry::Ptr scriptInput;
46 bl::gui::Label::Ptr errorLabel;
48 bl::gui::FilePicker picker;
50 void onPick(
const std::string& s);
All classes and functionality used for implementing the game editor.
GUI component for selecting or writing scripts. Performs syntax validation as well.
std::function< void()> OnCancel
Called when the window is closed without a selection.
void open(bl::gui::GUI *parent, const std::string &value={})
Opens the dialog to select a script.
std::function< void(const std::string &)> OnSelect
Callback type for when a script is chosen.
ScriptSelector(const OnSelect &onSelect, const OnCancel &onCancel)
Construct a new Script Selector dialog.