36 lines
770 B
C
36 lines
770 B
C
|
#ifndef QWTEXTDIALOGUE_H
|
||
|
#define QWTEXTDIALOGUE_H
|
||
|
|
||
|
#include <QStringList>
|
||
|
#include "qw_abstractgamedialogue.h"
|
||
|
|
||
|
/* QWTextDialogue
|
||
|
* Provides text visual-novel-lide dialogue. */
|
||
|
|
||
|
class QWTextDialogue : public QWAbstractGameDialogue
|
||
|
{
|
||
|
protected:
|
||
|
QStringList list_pages;
|
||
|
QStringList::iterator it_current_page;
|
||
|
|
||
|
public:
|
||
|
QWTextDialogue(const QStringList &pages);
|
||
|
virtual ~QWTextDialogue() override {}
|
||
|
|
||
|
////////////////////////
|
||
|
|
||
|
bool toNextPage() noexcept;
|
||
|
void resetPage() noexcept;
|
||
|
|
||
|
void setPages(const QStringList &pages) noexcept;
|
||
|
QStringList pages() const noexcept;
|
||
|
|
||
|
QString currentText() const noexcept;
|
||
|
|
||
|
////////////////////////
|
||
|
|
||
|
virtual void writeToJson(QJsonObject &savejson) override;
|
||
|
};
|
||
|
|
||
|
#endif // QWTEXTDIALOGUE_H
|