quest-wizard/models/events/qw_startdialogueevent.h

35 lines
909 B
C
Raw Permalink Normal View History

2023-02-09 14:41:24 +01:00
#ifndef QWSTARTDIALOGUEEVENT_H
#define QWSTARTDIALOGUEEVENT_H
#include "qw_abstractevent.h"
/* QWStartDialogueEvent
* Starts a game-freezing dialogue by moving QWScene from gameplay state. */
class QWAbstractDialogueManager;
class QWAbstractGameDialogue;
class QWStartDialogueEvent : public QWAbstractEvent
{
private:
QWAbstractDialogueManager *ptr_dialogue_manager;
std::shared_ptr<QWAbstractGameDialogue> ptr_dialogue;
public:
explicit QWStartDialogueEvent(const std::shared_ptr<QWAbstractGameDialogue> &dialogue);
virtual ~QWStartDialogueEvent() override {}
void execute() override;
////////////////////////
void setDialogueManager(QWAbstractDialogueManager *dialogman) noexcept;
QWAbstractDialogueManager *dialogueManager() const noexcept;
////////////////////////
void writeToJson(QJsonObject &event_data) override;
};
#endif // QWSTARTDIALOGUEEVENT_H