Menü.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. LRahmen *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. bool beendet;
  38. int ref;
  39. public:
  40. // Konstruktor
  41. MenüSpiel( Schrift *zSchrift, Bildschirm *zScreen );
  42. // Destruktor
  43. ~MenüSpiel();
  44. // nicht constant
  45. void reset();
  46. void doMausEreignis( MausEreignis &me );
  47. void doTastaturEreignis( TastaturEreignis &te );
  48. bool tick( double tickVal );
  49. void render( Bild &zRObj );
  50. // constant
  51. bool istBeendet() const;
  52. // Reference Counting
  53. MenüSpiel *getThis();
  54. MenüSpiel *release();
  55. };
  56. class MenüStatistik
  57. {
  58. private:
  59. TextFeld *ansichtT;
  60. AuswahlBox *ansicht;
  61. KontrollKnopf *optionen;
  62. ObjTabelle *gesammtT;
  63. ObjTabelle *optionenT;
  64. LDiag *gesammtD;
  65. LDiag *optionenD;
  66. Knopf *releasen;
  67. Knopf *zurück;
  68. Schrift *schrift;
  69. bool beendet;
  70. int ref = 1;
  71. public:
  72. // Konstruktor
  73. MenüStatistik( Schrift *zSchrift, Bildschirm *zScreen );
  74. // Destruktor
  75. ~MenüStatistik();
  76. // nicht constant
  77. void reset();
  78. void doMausEreignis( MausEreignis &me );
  79. bool tick( double tickVal );
  80. void render( Bild &zRObj );
  81. // constant
  82. bool istBeendet() const;
  83. // Reference Counting
  84. MenüStatistik *getThis();
  85. MenüStatistik *release();
  86. };
  87. class MenüOptionen
  88. {
  89. private:
  90. TextFeld *breiteT;
  91. TextFeld *breite;
  92. TextFeld *höheT;
  93. TextFeld *höhe;
  94. TextFeld *zAnzahlT;
  95. TextFeld *zAnzahl;
  96. TextFeld *nAnzahlT;
  97. TextFeld *nAnzahl;
  98. TextFeld *tempoT;
  99. TextFeld *tempo;
  100. KontrollKnopf *fortsetzen;
  101. Knopf *abbrechen;
  102. Knopf *ok;
  103. bool beendet;
  104. int ref;
  105. public:
  106. // Konstruktor
  107. MenüOptionen( Schrift *zSchrift, Bildschirm *zScreen );
  108. // Destruktor
  109. ~MenüOptionen();
  110. // nicht constant
  111. void reset();
  112. void doMausEreignis( MausEreignis &me );
  113. void doTastaturEreignis( TastaturEreignis &te );
  114. bool tick( double tickVal );
  115. void render( Bild &zRObj );
  116. // constant
  117. bool istBeendet() const;
  118. // Reference Counting
  119. MenüOptionen *getThis();
  120. MenüOptionen *release();
  121. };
  122. class Menü
  123. {
  124. private:
  125. Knopf *spielen;
  126. MenüSpiel *spielenF;
  127. Knopf *optionen;
  128. MenüOptionen *optionenF;
  129. Knopf *statistik;
  130. MenüStatistik *statistikF;
  131. Knopf *beenden;
  132. Bild *hintergrund;
  133. LRahmen *ram;
  134. bool beendet;
  135. int status;
  136. int ref;
  137. public:
  138. // Konstruktor
  139. Menü( Schrift *zSchrift, Bildschirm *zScreen );
  140. // Destruktor
  141. ~Menü();
  142. // nicht constant#
  143. void reset();
  144. void doMausEreignis( MausEreignis &me );
  145. void doTastaturEreignis( TastaturEreignis &te );
  146. bool tick( double z );
  147. void render( Bild &zRObj );
  148. // constant
  149. bool istBeendet() const;
  150. // Reference Counting
  151. Menü *getThis();
  152. Menü *release();
  153. };
  154. #endif