Menü.h 4.0 KB

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