-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.hpp
More file actions
57 lines (49 loc) · 1.34 KB
/
Copy pathgame.hpp
File metadata and controls
57 lines (49 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
#include <QMainWindow>
#include <QStackedLayout>
#include "log.hpp"
#include "items/treeItem.hpp"
#include "base/svgWid.hpp"
#include "scenes/gameScn.hpp"
#include "wids/svgBtn.hpp"
#include "wids/ovrlWrap.hpp"
class FlashCard; // Forward reference
struct spareStyls {
QString listWidCol;
QString dialogStyl;
QString logBgCol;
QString mdHlCol;
QString secretCol;
std::vector<QColor> pbcols;
};
class MainGame : public QMainWindow {
Q_OBJECT
public:
MainGame();
~MainGame() {
Log::Error("Game") << "The game just died! PANIC PANIC PANIC!";
}
void initScene();
void initStyles();
void styliseDialog(QDialog* dialog, const QString& xtraStyl = "");
void removeGame(bool force = false);
void changeScene(BaseScene* newScene, bool resume = false);
void changeBG(QString bgName);
bool handleEv(QKeyEvent* event);
void resizeEvent(QResizeEvent *event) override;
bool eventFilter(QObject *obj, QEvent *event) override;
void fixLogs();
int cardFin(FlashCard* card, int key, Tree* tree);
void editCard(FlashCard* card);
QVBoxLayout logLay;
OverlayWrapper logLayWrap;
BaseScene* curScene;
spareStyls styls;
public slots:
void nextFC();
void showFC();
private:
SvgWidget* bg;
QPointer<GameScene> curGame;
QWidget* sceneStash;
};