KartenKaufen.h 3.1 KB

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