Minigames.h 1.7 KB

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