1 #ifndef EDITOR_COMPONENTS_ANIMATIONWINDOW_HPP
2 #define EDITOR_COMPONENTS_ANIMATIONWINDOW_HPP
4 #include <BLIB/Graphics.hpp>
5 #include <BLIB/Interfaces/GUI.hpp>
21 using ChooseCb = std::function<void(
const std::string&)>;
42 void open(bl::gui::GUI* parent,
const std::string& path,
const std::string& file);
50 const bool characterMode;
54 bl::gui::Window::Ptr window;
56 bl::gui::Label::Ptr fileLabel;
57 bl::gui::Animation::Ptr animation;
58 bl::resource::Ref<bl::gfx::a2d::AnimationData> animSrc;
59 std::optional<bl::gui::FilePicker> filePicker;
61 void packAnim(
const std::string& f);
All classes and functionality used for implementing the game editor.
A basic window to choose and view animations.
std::function< void()> CloseCb
Called when the window is closed.
std::function< void(const std::string &)> ChooseCb
Called when an animation is chosen.
AnimationWindow(bool characterMode, const ChooseCb &chooseCb, const CloseCb &closeCb)
Construct a new Animation Window.
void open(bl::gui::GUI *parent, const std::string &path, const std::string &file)
Opens the animation picker window.
void hide()
Removes the window from view.