KartenKaufen.h 2.8 KB

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