quest-wizard/models/dialogues/qw_abstractgamedialogue.h

39 lines
906 B
C
Raw Normal View History

2023-02-09 08:41:24 -05:00
#ifndef QWABSTRACTGAMEDIALOGUE_H
#define QWABSTRACTGAMEDIALOGUE_H
#include <memory>
#include "models/events/qw_abstractevent.h"
/* QWAbstractGameDialogue
* Interface for all in-game dialogues. */
class QWAbstractGameDialogue : public QWTagHolder
{
protected:
QList<QList<std::shared_ptr<QWAbstractEvent>>> list_events;
public:
QWAbstractGameDialogue();
virtual ~QWAbstractGameDialogue() override = 0;
virtual void onExit(int code);
virtual void setAllEvents(const QList<QList<std::shared_ptr<QWAbstractEvent>>> &evs);
virtual void addEventsList(const QList<std::shared_ptr<QWAbstractEvent>> &evs);
////////////////////////
virtual void writeToJson(QJsonObject &savejson) override = 0;
};
enum DIALOGUE_TYPE
{
// Pure visual-novel-like text
TEXT,
// External widget with inner logic described with qml
WIDGET
};
#endif // QWABSTRACTGAMEDIALOGUE_H