Menü.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. #ifndef Menü_H
  2. #define Menü_H
  3. #include <Knopf.h>
  4. #include <Tabelle.h>
  5. #include <Diagramm.h>
  6. #include <AuswahlBox.h>
  7. #include "Map.h"
  8. #include <Rahmen.h>
  9. using namespace Framework;
  10. class MenüVerloren
  11. {
  12. private:
  13. LRahmen *ram;
  14. TextFeld *verloren;
  15. Knopf *neu;
  16. Knopf *beenden;
  17. int ref;
  18. public:
  19. // Kontruktor
  20. MenüVerloren( Schrift *zSchrift );
  21. // Destruktor
  22. ~MenüVerloren();
  23. // nicht constant
  24. int doMausEreignis( MausEreignis &me );
  25. bool tick( double tickVal );
  26. void render( Bild &zRObj );
  27. // Reference Counting
  28. MenüVerloren *getThis();
  29. MenüVerloren *release();
  30. };
  31. class MenüSpiel
  32. {
  33. private:
  34. TextFeld *scoreT;
  35. Knopf *beenden;
  36. Map *map;
  37. MenüVerloren *verloren;
  38. double timePuffer;
  39. bool beendet;
  40. int ref;
  41. public:
  42. // Konstruktor
  43. MenüSpiel( Schrift *zSchrift, Bildschirm *zScreen, KSGClient::MinigameServerClient *klient );
  44. // Destruktor
  45. ~MenüSpiel();
  46. // nicht constant
  47. void reset();
  48. void doMausEreignis( MausEreignis &me );
  49. void doTastaturEreignis( TastaturEreignis &te );
  50. bool tick( double tickVal );
  51. void render( Bild &zRObj );
  52. // constant
  53. bool istBeendet() const;
  54. // Reference Counting
  55. MenüSpiel *getThis();
  56. MenüSpiel *release();
  57. };
  58. class MenüWiederhohlung
  59. {
  60. private:
  61. TextFeld *scoreT;
  62. Knopf *beenden;
  63. Map *map;
  64. Datei *datei;
  65. double nowTime;
  66. double nextTime;
  67. bool beendet;
  68. char tastenStände;
  69. double timePuffer;
  70. int ref;
  71. public:
  72. // Konstruktor
  73. MenüWiederhohlung( Schrift *zSchrift, Bildschirm *zScreen, Datei *datei, Text *zOptionen );
  74. // Destruktor
  75. ~MenüWiederhohlung();
  76. // nicht constant
  77. void doMausEreignis( MausEreignis &me );
  78. void doTastaturEreignis( TastaturEreignis &te );
  79. bool tick( double tickVal );
  80. void render( Bild &zRObj );
  81. // constant
  82. bool istBeendet() const;
  83. // Reference Counting
  84. MenüWiederhohlung *getThis();
  85. MenüWiederhohlung *release();
  86. };
  87. class MenüStatistik
  88. {
  89. private:
  90. TextFeld *ansichtT;
  91. AuswahlBox *ansicht;
  92. KontrollKnopf *optionen;
  93. ObjTabelle *gesammtT;
  94. ObjTabelle *optionenT;
  95. ObjTabelle *worldBestT;
  96. LDiag *gesammtD;
  97. LDiag *optionenD;
  98. Knopf *remove;
  99. Knopf *zurück;
  100. Schrift *schrift;
  101. KSGClient::MinigameServerClient *klient;
  102. MenüWiederhohlung *wiederH;
  103. Bildschirm *screen;
  104. bool asyncFinished;
  105. bool beendet;
  106. int ref = 1;
  107. public:
  108. // Konstruktor
  109. MenüStatistik( Schrift *zSchrift, Bildschirm *zScreen, KSGClient::MinigameServerClient *klient );
  110. // Destruktor
  111. ~MenüStatistik();
  112. // nicht constant
  113. void reset();
  114. void doMausEreignis( MausEreignis &me );
  115. bool tick( double tickVal );
  116. void render( Bild &zRObj );
  117. // constant
  118. bool istBeendet() const;
  119. bool istWiederhohlung() const;
  120. // Reference Counting
  121. MenüStatistik *getThis();
  122. MenüStatistik *release();
  123. };
  124. class MenüOptionen
  125. {
  126. private:
  127. TextFeld *breiteT;
  128. TextFeld *breite;
  129. TextFeld *höheT;
  130. TextFeld *höhe;
  131. TextFeld *aGrößeT;
  132. TextFeld *aGröße;
  133. TextFeld *timerT;
  134. TextFeld *timer;
  135. TextFeld *shipT;
  136. AuswahlBox *ship;
  137. KontrollKnopf *autoKam;
  138. KontrollKnopf *fortsetzen;
  139. Knopf *abbrechen;
  140. Knopf *ok;
  141. bool beendet;
  142. int ref;
  143. public:
  144. // Konstruktor
  145. MenüOptionen( Schrift *zSchrift, Bildschirm *zScreen );
  146. // Destruktor
  147. ~MenüOptionen();
  148. // nicht constant
  149. void reset();
  150. void doMausEreignis( MausEreignis &me );
  151. void doTastaturEreignis( TastaturEreignis &te );
  152. bool tick( double tickVal );
  153. void render( Bild &zRObj );
  154. // constant
  155. bool istBeendet() const;
  156. // Reference Counting
  157. MenüOptionen *getThis();
  158. MenüOptionen *release();
  159. };
  160. class Menü
  161. {
  162. private:
  163. Knopf *spielen;
  164. MenüSpiel *spielenF;
  165. Knopf *optionen;
  166. MenüOptionen *optionenF;
  167. Knopf *statistik;
  168. MenüStatistik *statistikF;
  169. Knopf *beenden;
  170. Bild *hintergrund;
  171. LRahmen *ram;
  172. bool beendet;
  173. int status;
  174. int ref;
  175. public:
  176. // Konstruktor
  177. Menü( Schrift *zSchrift, Bildschirm *zScreen, KSGClient::MinigameServerClient *klient );
  178. // Destruktor
  179. ~Menü();
  180. // nicht constant
  181. void reset();
  182. void doMausEreignis( MausEreignis &me );
  183. void doTastaturEreignis( TastaturEreignis &te );
  184. bool tick( double z );
  185. void render( Bild &zRObj );
  186. // constant
  187. bool istBeendet() const;
  188. // Reference Counting
  189. Menü *getThis();
  190. Menü *release();
  191. };
  192. #endif