KartenKaufen.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. #ifndef KartenKaufen_H
  2. #define KartenKaufen_H
  3. #include <Schrift.h>
  4. #include <Knopf.h>
  5. #include <KSGScript.h>
  6. #include <Array.h>
  7. #include <Scroll.h>
  8. #include <Animation.h>
  9. #include <Thread.h>
  10. #include <AuswahlBox.h>
  11. #include <Rahmen.h>
  12. using namespace Framework;
  13. using namespace KSGScript;
  14. class KartenKaufenAuswahl : private Thread
  15. {
  16. private:
  17. int karteId;
  18. unsigned char alpha;
  19. KSGScriptObj *fenster;
  20. Framework::Animation2D *laden;
  21. Punkt pos;
  22. LRahmen *ram;
  23. HINSTANCE ksgs;
  24. bool aktion;
  25. int ref;
  26. public:
  27. // Konstruktor
  28. KartenKaufenAuswahl( Schrift *zSchrift );
  29. // Destruktor
  30. ~KartenKaufenAuswahl();
  31. // nicht constant
  32. void ladeKarteSeite( int id );
  33. void reset();
  34. virtual void thread();
  35. void ksgsAktion( RCArray< KSGSVariable > *parameter, KSGSVariable **retVal );
  36. void doMausEreignis( MausEreignis &me );
  37. void doTastaturEreignis( TastaturEreignis &te );
  38. bool tick( double zeit );
  39. void render( Bild &zRObj );
  40. // constant
  41. // Reference Counting
  42. KartenKaufenAuswahl *getThis();
  43. KartenKaufenAuswahl *release();
  44. };
  45. class KartenKaufenListeEintrag
  46. {
  47. private:
  48. int karteId;
  49. Knopf *auswählen;
  50. Bild *hintergrund;
  51. AlphaFeld *ausgewählt;
  52. LRahmen *ram;
  53. bool ausw;
  54. bool rend;
  55. int ref;
  56. public:
  57. // Konstruktor
  58. KartenKaufenListeEintrag( int id, Schrift *schrift );
  59. // Destruktor
  60. ~KartenKaufenListeEintrag();
  61. // nicht constant
  62. void resetAuswahl();
  63. bool doMausEreignis( MausEreignis &me );
  64. bool tick( double zeit );
  65. void render( int yOff, Bild &zRObj );
  66. // constant
  67. int getKarteId() const;
  68. // Reference Counting
  69. KartenKaufenListeEintrag *getThis();
  70. KartenKaufenListeEintrag *release();
  71. };
  72. class KartenKaufenListe
  73. {
  74. private:
  75. Schrift *s;
  76. LRahmen *ram;
  77. Punkt pos;
  78. RCArray< KartenKaufenListeEintrag > *einträge;
  79. VScrollBar *vScroll;
  80. bool rend;
  81. int ref;
  82. Critical cs;
  83. public:
  84. // Konstruktor
  85. KartenKaufenListe( Schrift *schrift );
  86. // Destruktor
  87. ~KartenKaufenListe();
  88. // nicht constant
  89. void ladeKarten( Array< int > *karten );
  90. void leeren();
  91. int doMausEreignis( MausEreignis &me );
  92. bool tick( double zeit );
  93. void render( Bild &zRObj );
  94. // constant
  95. int getEintragAnzahl();
  96. // Reference Counting
  97. KartenKaufenListe *getThis();
  98. KartenKaufenListe *release();
  99. };
  100. class KartenKaufen : private Thread
  101. {
  102. private:
  103. unsigned char alpha;
  104. bool sichtbar;
  105. Text *suchText;
  106. LRahmen *ram;
  107. AuswahlBox *spielArt;
  108. TextFeld *suchFilterT;
  109. TextFeld *suchFilter;
  110. Knopf *suchen;
  111. TextFeld *seiten;
  112. Knopf *weiter;
  113. Knopf *zurück;
  114. Punkt pos;
  115. KartenKaufenListe *liste;
  116. KartenKaufenAuswahl *auswahl;
  117. Framework::Animation2D *laden;
  118. double tickVal;
  119. int seite;
  120. int maxSeite;
  121. int aktion;
  122. bool rend;
  123. int ref;
  124. public:
  125. // Konstruktor
  126. KartenKaufen( Schrift *zSchrift );
  127. // Destruktor
  128. ~KartenKaufen();
  129. // nicht constant
  130. void setSichtbar( bool sicht );
  131. virtual void thread();
  132. void doMausEreignis( MausEreignis &me );
  133. void doTastaturEreignis( TastaturEreignis &te );
  134. bool tick( double zeit );
  135. void render( Bild &zRObj );
  136. // constant
  137. bool istSichtbar() const;
  138. // Reference Counting
  139. KartenKaufen *getThis();
  140. KartenKaufen *release();
  141. };
  142. #endif