-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhealth.cpp
31 lines (27 loc) · 879 Bytes
/
health.cpp
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
/**@file health.cpp
* @brief Contains the implementation for the Health class
*/
#include "health.h"
#include "game.h"
//external global varaible Game* game
extern Game* game;
/**This constructor sets the Pixmap for Health
* @brief Health::Health sets the Pixmap for a Health object.
* @param parent makes QLabel a parent of Health
*/
Health::Health(QLabel *parent) : QLabel(parent)
{
setPixmap(QPixmap(":/new/prefix1/Pokeball.PNG"));
setStyleSheet("QLabel {background-color: rgba(0,0,0,0%)}");
setScaledContents(true);
setMaximumSize(40,40);
setMinimumSize(40,40);
}
/**This function displays the window after winning the game.
* @brief Game::win() creates a panel to obscure the background and places a message on the screen along with quit and retry buttons.
*/
void Health::removed(){
// hide them from the scene
hide();
return;
}