Minigames.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. public:
  70. // Konstruktor
  71. MiniGames( Schrift *zSchrift, Fenster *zNachLoginFenster, int x );
  72. // Destruktor
  73. ~MiniGames();
  74. // nicht constant
  75. void setSichtbar( bool sicht );
  76. void addMiniGame( MiniGame *mg );
  77. void setAktuell( bool aktuell, int dg = 0 );
  78. void setFullScreenMode( bool enabled ) override;
  79. void filter();
  80. void doMausEreignis( MausEreignis &me ) override;
  81. void doTastaturEreignis( TastaturEreignis &te ) override;
  82. bool tick( double z ) override;
  83. void render( Bild &zRObj ) override;
  84. // constant
  85. bool istAnimiert() const;
  86. bool istSichtbar() const;
  87. };
  88. #endif