renderbug-cpp/src/Sequencer.h

32 lines
624 B
C
Raw Normal View History

2021-03-28 01:19:55 +00:00
#pragma once
2021-03-29 08:10:55 +00:00
#include <Figment.h>
2021-03-28 01:19:55 +00:00
#include <vector>
class Sequencer: public Task {
public:
class Scene {
public:
const char* name;
std::vector<const char*> patterns;
void start();
void stop();
2021-03-28 01:19:55 +00:00
};
Sequencer();
2021-03-28 01:19:55 +00:00
void loop() override;
void onStart() override;
2021-03-28 01:19:55 +00:00
void handleEvent(const InputEvent& evt) override;
void setScenes(std::vector<Scene> &&scenes);
2021-03-28 01:19:55 +00:00
const char* currentSceneName();
const std::vector<Scene> scenes() const;
const std::vector<Command>& commands() const override;
2021-03-28 01:19:55 +00:00
private:
int m_idx;
2021-03-28 01:19:55 +00:00
std::vector<Scene> m_scenes;
};