Civilization
PopUpWindow.hpp
1 // Generated by dia2code
2 #ifndef CLIENT__POPUPWINDOW__H
3 #define CLIENT__POPUPWINDOW__H
4 
5 #include <memory>
6 #include <SFML/Graphics.hpp>
7 #include <string>
8 #include <json/json.h>
9 #include <json/json.h>
10 
11 namespace client {
12  class Button;
13  class TextureDisplayer;
14  class GameWindow;
15 }
16 
17 #include "Button.hpp"
18 #include "TextureDisplayer.hpp"
19 
20 namespace client {
21 
23  class PopUpWindow {
24  // Attributes
25  public:
26  std::unique_ptr<Button> blackBackground;
27  std::unique_ptr<TextureDisplayer> littleBackground;
28  sf::Font font;
29  std::unique_ptr<Button> chooseNumberOfBoxesButton;
30  std::unique_ptr<TextureDisplayer> arrowLessTexture;
31  std::unique_ptr<TextureDisplayer> arrowMoreTexture;
32  bool isWindowActive = false;
33  std::unique_ptr<TextureDisplayer> doneTexture;
34  int priorityCardPlayed;
35  std::string priorityCardPlayedType;
36  std::unique_ptr<sf::Text> title;
37  GameWindow* gameWindow = nullptr;
38  int nbOfBoxesChosen;
39  int nbOfBoxesMax;
40  std::unique_ptr<sf::Text> body;
41  Json::Value data;
42  int windowLength;
43  int windowWidth;
44  // Operations
45  public:
46  PopUpWindow (int windowLength, int windowWidth, const Json::Value& data, bool isActive);
47  void drawValidateBoxesButtons (std::shared_ptr<sf::RenderWindow> window);
48  void drawWinnerWindow (std::shared_ptr<sf::RenderWindow> window);
49  void centerText ();
51  // Setters and Getters
52  };
53 
54 };
55 
56 #endif
class GameWindow -
Definition: GameWindow.hpp:38
class PopUpWindow -
Definition: PopUpWindow.hpp:23
void centerText()
Function to center the text on the winner window.
Definition: PopUpWindow.cpp:151
void drawValidateBoxesButtons(std::shared_ptr< sf::RenderWindow > window)
Function to draw the elements of the validate boxes window.
Definition: PopUpWindow.cpp:138
void drawWinnerWindow(std::shared_ptr< sf::RenderWindow > window)
Function to draw the elements of the winner window.
Definition: PopUpWindow.cpp:129
void setUpValidateBoxesWindow()
Function to set the window to choose the number of cases to use.
Definition: PopUpWindow.cpp:32
PopUpWindow(int windowLength, int windowWidth, const Json::Value &data, bool isActive)
Constructor Constructor of PopUpWindow class.
Definition: PopUpWindow.cpp:83