KartenKaufen.h 3.0 KB

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