game/mario/scenes/shared_scenes.hpp
zv0n 6211e8c756
All checks were successful
continuous-integration/drone/push Build is passing
Formatting
2022-09-22 20:40:09 +02:00

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