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( 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. Schrift *schrift;
  57. bool mgInitialized;
  58. int dg;
  59. bool aktuell;
  60. bool gefiltert;
  61. int animation;
  62. int alpha;
  63. bool sichtbar;
  64. int prozent1;
  65. int prozent2;
  66. double tickVal;
  67. bool fullscreen;
  68. int alpha2;
  69. int slo;
  70. unsigned char minAlpha;
  71. public:
  72. // Konstruktor
  73. MiniGames( Schrift *zSchrift, Fenster *zNachLoginFenster, int x );
  74. // Destruktor
  75. ~MiniGames();
  76. // nicht constant
  77. void setSichtbar( bool sicht );
  78. void addMiniGame( MiniGame *mg );
  79. void setAktuell( bool aktuell, int dg = 0 );
  80. void setFullScreenMode( bool enabled ) override;
  81. void showLoadingOverlay( unsigned char minAlpha ) override;
  82. void hideLoadingOverlay() override;
  83. void filter();
  84. void doMausEreignis( 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