game/mario/scenes/shared_scenes.hpp

25 lines
1018 B
C++
Raw Normal View History

2022-09-19 20:56:50 +00:00
#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,
2022-09-22 18:40:09 +00:00
bool pop_at_finish = true,
bool transparent_bg = true);
2022-09-19 20:56:50 +00:00
#endif