Skip to content
This repository has been archived by the owner on Mar 1, 2021. It is now read-only.

Commit

Permalink
Forward parent object when applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzun committed Sep 13, 2018
1 parent a6d3098 commit 72b7acf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions source/Button/Button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ SOFTWARE.
#include "Scene/Scene.h"
#include "Sound/Sound.h"

void ButtonFuncs::about(Game *)
void ButtonFuncs::about(Game *game_instance)
{
QMessageBox::about(0, "About...", QString("Flappy Bird Qt by fuzun\nVersion: v%1\n\ngithub.com/fuzun/Flappy-Bird-Qt").arg(QCoreApplication::applicationVersion()));
QWidget *gameQObject = dynamic_cast<QWidget *>(game_instance);
QMessageBox::about(gameQObject, "About...", QString("Flappy Bird Qt by fuzun\nVersion: v%1\n\ngithub.com/fuzun/Flappy-Bird-Qt").arg(QCoreApplication::applicationVersion()));
}

void ButtonFuncs::play(Game *game_instance)
Expand Down
2 changes: 1 addition & 1 deletion source/Button/Button.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Game;
class ButtonFuncs
{
public:
static void about(Game *);
static void about(Game *game_instance);
static void play(Game *game_instance);
static void soundEnable(Game *game_instance);
static void soundDisable(Game *game_instance);
Expand Down

0 comments on commit 72b7acf

Please sign in to comment.