Minigames.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #ifndef MiniGames_H
  2. #define MiniGames_H
  3. #include <Fenster.h>
  4. #include <Animation.h>
  5. #include "MiniGame.h"
  6. #include <Thread.h>
  7. #include <Knopf.h>
  8. #include <MiniGameV.h>
  9. using namespace Framework;
  10. class MiniGames; // aus dieser Datei
  11. class MGSuchen : private Thread
  12. {
  13. private:
  14. MiniGames* mGames;
  15. public:
  16. // Konstruktor
  17. MGSuchen(MiniGames* mGames);
  18. // Destruktor
  19. ~MGSuchen();
  20. // nicht constant
  21. void thread() override;
  22. };
  23. class MGLaden : public Thread
  24. {
  25. private:
  26. Text* name;
  27. MiniGameV* game;
  28. public:
  29. // Konstruktor
  30. MGLaden(const char* name);
  31. // Destruktor
  32. ~MGLaden();
  33. // nicht constant
  34. void thread();
  35. // constant
  36. bool fertig() const;
  37. MiniGameV* zGame() const;
  38. };
  39. class MiniGames : public Zeichnung, MinigameAPI
  40. {
  41. private:
  42. Punkt begPos;
  43. Punkt begGröße;
  44. Punkt pos1;
  45. Punkt größe1;
  46. Punkt pos2;
  47. Punkt größe2;
  48. Punkt bildschirmGröße;
  49. LRahmen* rahmen;
  50. Animation2D* laden;
  51. TextFeld* suchFilter;
  52. TextFeld* suchName;
  53. Knopf* suchen;
  54. RCArray< MiniGame >* games;
  55. MGLaden* mgl;
  56. bool mgInitialized;
  57. int dg;
  58. bool aktuell;
  59. bool gefiltert;
  60. int animation;
  61. int alpha;
  62. bool sichtbar;
  63. int prozent1;
  64. int prozent2;
  65. double tickVal;
  66. bool fullscreen;
  67. int alpha2;
  68. int slo;
  69. unsigned char minAlpha;
  70. public:
  71. // Konstruktor
  72. MiniGames(Fenster* zNachLoginFenster, int x);
  73. // Destruktor
  74. ~MiniGames();
  75. // nicht constant
  76. void setSichtbar(bool sicht);
  77. void addMiniGame(MiniGame* mg);
  78. void setAktuell(bool aktuell, int dg = 0);
  79. void setFullScreenMode(bool enabled) override;
  80. void showLoadingOverlay(unsigned char minAlpha) override;
  81. void hideLoadingOverlay() override;
  82. Bild* loadBild(const char* path) override;
  83. void filter();
  84. void doPublicMausEreignis(MausEreignis& me) override;
  85. void doTastaturEreignis(TastaturEreignis& te) override;
  86. bool tick(double z) override;
  87. void render(Bild& zRObj) override;
  88. // constant
  89. bool istAnimiert() const;
  90. bool istSichtbar() const;
  91. };
  92. #endif