25 lines
1018 B
C++
25 lines
1018 B
C++
#ifndef SHARED_SCENES_HPP
|
|
#define SHARED_SCENES_HPP
|
|
|
|
#include "../../sdlpp/sdlpp_scene.hpp"
|
|
#include <functional>
|
|
|
|
struct SceneStruct {
|
|
std::shared_ptr<SDLPP::Scene> scene;
|
|
std::function<void(std::shared_ptr<SDLPP::Scene> &)> doInput;
|
|
std::function<void(std::shared_ptr<SDLPP::Scene> &)> additionalRender;
|
|
};
|
|
|
|
SceneStruct createYesNoScene(std::shared_ptr<SDLPP::Renderer> renderer,
|
|
const std::string &text,
|
|
std::function<void(bool)> finalizer);
|
|
SceneStruct createOkScene(std::shared_ptr<SDLPP::Renderer> renderer,
|
|
const std::string &text,
|
|
std::function<void()> finalizer);
|
|
SceneStruct createLoadScene(std::shared_ptr<SDLPP::Renderer> renderer,
|
|
const std::string &path,
|
|
std::function<void(const std::string &)> finalizer,
|
|
bool pop_at_finish = true,
|
|
bool transparent_bg = true);
|
|
|
|
#endif |