qmlfrontend/gameconfig.h
author unc0rr
Sun, 07 Jan 2018 01:21:42 +0100
branchqmlfrontend
changeset 12888 adb1fccc706a
parent 12868 fe16fa088b69
permissions -rw-r--r--
- ResizeWindow function to pass engine new window size - Remove TabBar to leave more space at the bottom of the screen - ifdef GL_ES in shaders

#ifndef GAMECONFIG_H
#define GAMECONFIG_H

#include <QList>
#include <QVector>

#include "team.h"

class GameConfig {
public:
    explicit GameConfig();

    const char** argv() const;
    int argc() const;
    const QList<QByteArray> config() const;

    void clear();
    void cmdSeed(const QByteArray& seed);
    void cmdTheme(const QByteArray& theme);
    void cmdMapgen(int mapgen);
    void cmdTeam(const Team& team);

    bool isPreview() const;
    void setPreview(bool isPreview);

private:
    mutable QVector<const char*> m_argv;
    QList<QByteArray> m_arguments;
    QList<QByteArray> m_cfg;
    QList<Team> m_teams;
    bool m_isPreview;

    void cfgAppend(const QByteArray& cmd);
};

#endif // GAMECONFIG_H