Minigames.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 : private Thread
  24. {
  25. private:
  26. Text *name;
  27. MiniGameV *game;
  28. int ref;
  29. public:
  30. // Konstruktor
  31. MGLaden( char *name );
  32. // Destruktor
  33. ~MGLaden();
  34. // nicht constant
  35. void thread();
  36. // constant
  37. bool fertig() const;
  38. MiniGameV *zGame() const;
  39. // Reference Counting
  40. MGLaden *getThis();
  41. MGLaden *release();
  42. };
  43. class MiniGames : public Zeichnung
  44. {
  45. private:
  46. Punkt begPos;
  47. Punkt begGröße;
  48. Punkt pos1;
  49. Punkt größe1;
  50. Punkt pos2;
  51. Punkt größe2;
  52. Punkt bildschirmGröße;
  53. LRahmen *rahmen;
  54. Animation2D *laden;
  55. TextFeld *suchFilter;
  56. TextFeld *suchName;
  57. Knopf *suchen;
  58. RCArray< MiniGame > *games;
  59. MGLaden *mgl;
  60. Schrift *schrift;
  61. int dg;
  62. bool aktuell;
  63. bool gefiltert;
  64. int animation;
  65. int alpha;
  66. bool sichtbar;
  67. int prozent1;
  68. int prozent2;
  69. double tickVal;
  70. int alpha2;
  71. int ref;
  72. public:
  73. // Konstruktor
  74. MiniGames( Schrift *zSchrift, Fenster *zNachLoginFenster, int x );
  75. // Destruktor
  76. ~MiniGames();
  77. // nicht constant
  78. void setSichtbar( bool sicht );
  79. void addMiniGame( MiniGame *mg );
  80. void setAktuell( bool aktuell, int dg = 0 );
  81. void filter();
  82. void doMausEreignis( MausEreignis &me ) override;
  83. void doTastaturEreignis( TastaturEreignis &te ) override;
  84. bool tick( double z ) override;
  85. void render( Bild &zRObj ) override;
  86. // constant
  87. bool istAnimiert() const;
  88. bool istSichtbar() const;
  89. // Reference Counting
  90. MiniGames *getThis();
  91. MiniGames *release();
  92. };
  93. #endif