diff --git a/JGE/include/qt/corewrapper.h b/JGE/include/qt/corewrapper.h index 0599d0a22..250f58a8e 100644 --- a/JGE/include/qt/corewrapper.h +++ b/JGE/include/qt/corewrapper.h @@ -67,6 +67,7 @@ public: m_engine->ReleaseKey(m_buttonQueue.front()); m_buttonQueue.pop(); } + m_engine->ResetInput(); }; Q_INVOKABLE void pixelInput(int x, int y); Q_INVOKABLE qint64 getTick() { diff --git a/projects/mtg/include/Player.h b/projects/mtg/include/Player.h index 4f0824ff1..78dae78ba 100644 --- a/projects/mtg/include/Player.h +++ b/projects/mtg/include/Player.h @@ -75,6 +75,11 @@ public: return 0; } + bool isHuman() + { + return (playMode == MODE_HUMAN); + } + Player * opponent(); int getId(); JQuadPtr getIcon(); diff --git a/projects/mtg/src/ActionStack.cpp b/projects/mtg/src/ActionStack.cpp index b8372ba1c..1e63178bd 100644 --- a/projects/mtg/src/ActionStack.cpp +++ b/projects/mtg/src/ActionStack.cpp @@ -835,7 +835,8 @@ void ActionStack::Update(float dt) { //This is a hack to avoid updating the stack while tuto messages are being shown //Ideally, the tuto messages should be moved to a layer above this one - if (getCurrentTutorial()) + //No need for Tuto when no human in game + if (getCurrentTutorial() && (observer->players[0]->isHuman() || observer->players[1]->isHuman() ) ) return; askIfWishesToInterrupt = NULL; diff --git a/projects/mtg/src/GameStateShop.cpp b/projects/mtg/src/GameStateShop.cpp index 4d8a1f11a..c9545e76c 100644 --- a/projects/mtg/src/GameStateShop.cpp +++ b/projects/mtg/src/GameStateShop.cpp @@ -28,7 +28,6 @@ float GameStateShop::_y4[] = { 169, 188, 250, 182, 182, 168, 220, 208, 198, 259, namespace { - float kGamepadIconSize = 0.5f; std::string kOtherCardsString(": Other cards"); std::string kCreditsString("Credits: "); } diff --git a/projects/mtg/wagic-qt.pro b/projects/mtg/wagic-qt.pro index 52ad40b0d..d23b377e9 100644 --- a/projects/mtg/wagic-qt.pro +++ b/projects/mtg/wagic-qt.pro @@ -101,6 +101,7 @@ SOURCES += \ src/GuiPlay.cpp\ src/GuiStatic.cpp\ src/IconButton.cpp\ + src/InteractiveButton.cpp\ src/ManaCost.cpp\ src/ManaCostHybrid.cpp\ src/MenuItem.cpp\ @@ -126,6 +127,7 @@ SOURCES += \ src/PriceList.cpp\ src/ReplacementEffects.cpp\ src/Rules.cpp\ + src/SimpleButton.cpp\ src/SimpleMenu.cpp\ src/SimpleMenuItem.cpp\ src/SimplePad.cpp\ @@ -268,6 +270,8 @@ HEADERS += \ include/DeckManager.h\ include/SimplePopup.h\ include/SimpleMenu.h\ + include/SimpleButton.h\ + include/InteractiveButton.h\ include/ObjectAnalytics.h # JGE, could probably be moved outside