You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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