39 lines
906 B
C
39 lines
906 B
C
|
#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
|