Menü.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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 doPublicMausEreignis( 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 doPublicMausEreignis( 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 doPublicMausEreignis( 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. TextRenderer *tr;
  102. KSGClient::MinigameServerClient *klient;
  103. MenüWiederhohlung *wiederH;
  104. Bildschirm *screen;
  105. bool asyncFinished;
  106. bool beendet;
  107. int ref = 1;
  108. public:
  109. // Konstruktor
  110. MenüStatistik( Schrift *zSchrift, Bildschirm *zScreen, KSGClient::MinigameServerClient *klient );
  111. // Destruktor
  112. ~MenüStatistik();
  113. // nicht constant
  114. void reset();
  115. void doPublicMausEreignis( MausEreignis &me );
  116. bool tick( double tickVal );
  117. void render( Bild &zRObj );
  118. // constant
  119. bool istBeendet() const;
  120. bool istWiederhohlung() const;
  121. // Reference Counting
  122. MenüStatistik *getThis();
  123. MenüStatistik *release();
  124. };
  125. class MenüOptionen
  126. {
  127. private:
  128. TextFeld *breiteT;
  129. TextFeld *breite;
  130. TextFeld *höheT;
  131. TextFeld *höhe;
  132. TextFeld *aGrößeT;
  133. TextFeld *aGröße;
  134. TextFeld *timerT;
  135. TextFeld *timer;
  136. TextFeld *shipT;
  137. AuswahlBox *ship;
  138. KontrollKnopf *autoKam;
  139. KontrollKnopf *fortsetzen;
  140. Knopf *abbrechen;
  141. Knopf *ok;
  142. bool beendet;
  143. int ref;
  144. public:
  145. // Konstruktor
  146. MenüOptionen( Schrift *zSchrift, Bildschirm *zScreen );
  147. // Destruktor
  148. ~MenüOptionen();
  149. // nicht constant
  150. void reset();
  151. void doPublicMausEreignis( MausEreignis &me );
  152. void doTastaturEreignis( TastaturEreignis &te );
  153. bool tick( double tickVal );
  154. void render( Bild &zRObj );
  155. // constant
  156. bool istBeendet() const;
  157. // Reference Counting
  158. MenüOptionen *getThis();
  159. MenüOptionen *release();
  160. };
  161. class Menü
  162. {
  163. private:
  164. Knopf *spielen;
  165. MenüSpiel *spielenF;
  166. Knopf *optionen;
  167. MenüOptionen *optionenF;
  168. Knopf *statistik;
  169. MenüStatistik *statistikF;
  170. Knopf *beenden;
  171. Bild *hintergrund;
  172. LRahmen *ram;
  173. bool beendet;
  174. int status;
  175. int ref;
  176. public:
  177. // Konstruktor
  178. Menü( Schrift *zSchrift, Bildschirm *zScreen, KSGClient::MinigameServerClient *klient );
  179. // Destruktor
  180. ~Menü();
  181. // nicht constant
  182. void reset();
  183. void doPublicMausEreignis( MausEreignis &me );
  184. void doTastaturEreignis( TastaturEreignis &te );
  185. bool tick( double z );
  186. void render( Bild &zRObj );
  187. // constant
  188. bool istBeendet() const;
  189. // Reference Counting
  190. Menü *getThis();
  191. Menü *release();
  192. };
  193. #endif