# HG changeset patch # User unc0rr # Date 1556313718 -7200 # Node ID ef9630519491cf574c87b8d24cd3eba8d6177d16 # Parent 111c4d750c6db21c6855ef24910b24d5fced9ee0 Fix some minor problems with new frontend code diff -r 111c4d750c6d -r ef9630519491 qmlfrontend/engine_instance.h --- a/qmlfrontend/engine_instance.h Fri Apr 26 23:21:27 2019 +0200 +++ b/qmlfrontend/engine_instance.h Fri Apr 26 23:21:58 2019 +0200 @@ -18,8 +18,6 @@ Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged) void sendConfig(const GameConfig& config); - void advance(quint32 ticks); - void moveCamera(const QPoint& delta); void renderFrame(); void setOpenGLContext(QOpenGLContext* context); QImage generatePreview(); @@ -30,6 +28,9 @@ void isValidChanged(bool isValid); public slots: + void advance(quint32 ticks); + void moveCamera(const QPoint& delta); + void controlEvent(bool isStart, int type); private: Engine::EngineInstance* m_instance; diff -r 111c4d750c6d -r ef9630519491 qmlfrontend/game_view.cpp --- a/qmlfrontend/game_view.cpp Fri Apr 26 23:21:27 2019 +0200 +++ b/qmlfrontend/game_view.cpp Fri Apr 26 23:21:58 2019 +0200 @@ -6,7 +6,8 @@ #include #include -GameView::GameView() : m_delta(0), m_windowChanged(true) { +GameView::GameView(QQuickItem* parent) + : QQuickItem(parent), m_delta(0), m_windowChanged(true) { connect(this, &QQuickItem::windowChanged, this, &GameView::handleWindowChanged); } diff -r 111c4d750c6d -r ef9630519491 qmlfrontend/game_view.h --- a/qmlfrontend/game_view.h Fri Apr 26 23:21:27 2019 +0200 +++ b/qmlfrontend/game_view.h Fri Apr 26 23:21:58 2019 +0200 @@ -35,7 +35,7 @@ setEngineInstance NOTIFY engineInstanceChanged) public: - explicit GameView(); + explicit GameView(QQuickItem* parent = nullptr); Q_INVOKABLE void tick(quint32 delta);