Menü.h 4.0 KB

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