Gruppe.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. #ifndef Gruppe_H
  2. #define Gruppe_H
  3. #include <Klient.h>
  4. #include <Thread.h>
  5. #include <Array.h>
  6. #include <Knopf.h>
  7. #include <Scroll.h>
  8. #include <Fenster.h>
  9. #include <KSGScript.h>
  10. #include <Rahmen.h>
  11. using namespace Framework;
  12. using namespace KSGScript;
  13. class GruppeEinladungAccount : public virtual ReferenceCounter
  14. {
  15. private:
  16. LRahmen *rahmen;
  17. AlphaFeld *auswahl;
  18. TextFeld *name;
  19. Knopf *nachrichtSenden;
  20. Knopf *erneutSenden;
  21. Knopf *einladungAbbrechen;
  22. int status;
  23. int br;
  24. int knopfX;
  25. double tickVal;
  26. bool mausIn;
  27. bool remove;
  28. int accountId;
  29. int gruppeId;
  30. int admin;
  31. int höhe;
  32. int animation;
  33. bool rend;
  34. public:
  35. // Konstruktor
  36. GruppeEinladungAccount();
  37. // Destruktor
  38. ~GruppeEinladungAccount();
  39. // nicht constant
  40. void setGruppeId( int gruppeId );
  41. void setAccountId( int id );
  42. void setSize( int br );
  43. void setAbgelehnt();
  44. void setAngenommen();
  45. void setRemove();
  46. void setAdmin( int admin );
  47. bool tick( double tickVal );
  48. void doPublicMausEreignis( MausEreignis &me );
  49. void render( int yOff, Bild &zrObj );
  50. // constant
  51. bool getRemove() const;
  52. int getAccountId() const;
  53. int getHeight() const;
  54. };
  55. class GruppeEinladungListe : public virtual ReferenceCounter
  56. {
  57. private:
  58. Punkt pos;
  59. Punkt gr;
  60. LRahmen *rahmen;
  61. TextFeld *einladenName;
  62. Knopf *einladen;
  63. VScrollBar *scroll;
  64. RCArray< GruppeEinladungAccount > *accounts;
  65. int einladungHöhe;
  66. double tickVal;
  67. int anzahl;
  68. int gruppeId;
  69. int admin;
  70. bool rend;
  71. public:
  72. // Konstruktor
  73. GruppeEinladungListe();
  74. // Destruktor
  75. ~GruppeEinladungListe();
  76. // nicht constant
  77. void reset();
  78. void setGruppeId( int gruppeId );
  79. void addAccount( int id );
  80. void setAbgelehnt( int id );
  81. void setAngenommen( int id );
  82. void remove( int id );
  83. void setAdmin( int admin );
  84. bool tick( double tickVal );
  85. void doPublicMausEreignis( MausEreignis &me );
  86. void doTastaturEreignis( TastaturEreignis &te );
  87. void render( Bild &zRObj );
  88. };
  89. class GruppeAccountDaten : public virtual ReferenceCounter
  90. {
  91. private:
  92. LRahmen *rahmen;
  93. AlphaFeld *auswahl;
  94. TextFeld *name;
  95. TextFeld *punkte;
  96. Knopf *nachrichtSenden;
  97. Knopf *accountAnsehen;
  98. Knopf *freundEinladung;
  99. Knopf *kick;
  100. int br;
  101. double tickVal;
  102. bool mausIn;
  103. bool remove;
  104. int gruppeId;
  105. int accountId;
  106. int admin;
  107. int höhe;
  108. int animation;
  109. bool rend;
  110. public:
  111. // Konstruktor
  112. GruppeAccountDaten();
  113. // Destruktor
  114. ~GruppeAccountDaten();
  115. // nicht constant
  116. void setGruppeId( int gruppeId );
  117. void setAccountId( int id );
  118. void setAdmin( int admin );
  119. void setSize( int x );
  120. void entfernen();
  121. bool tick( double tickVal );
  122. void doPublicMausEreignis( MausEreignis &me );
  123. void render( int y, Bild &zrObj );
  124. // constant
  125. bool getRemove() const;
  126. int getAccountId() const;
  127. int getHeight() const;
  128. };
  129. class GruppeAccountListe : public virtual ReferenceCounter
  130. {
  131. private:
  132. Punkt pos;
  133. Punkt gr;
  134. LRahmen *rahmen;
  135. VScrollBar *scroll;
  136. RCArray< GruppeAccountDaten > *accounts;
  137. int anzahl;
  138. int gruppeId;
  139. int admin;
  140. bool rend;
  141. public:
  142. // Konstruktor
  143. GruppeAccountListe();
  144. // Destruktor
  145. ~GruppeAccountListe();
  146. // nicht constant
  147. void reset();
  148. void setGruppeId( int gruppeId );
  149. void addAccount( int id );
  150. void removeAccount( int id );
  151. void setAdmin( int admin );
  152. bool tick( double tickVal );
  153. void doPublicMausEreignis( MausEreignis &me );
  154. void render( Bild &zRObj );
  155. };
  156. class GruppeChat : public virtual ReferenceCounter
  157. {
  158. private:
  159. Punkt pos;
  160. Punkt gr;
  161. LRahmen *rahmen;
  162. TextFeld *nachricht;
  163. Knopf *senden;
  164. TextFeld *verlauf;
  165. int gruppeId;
  166. bool rend;
  167. public:
  168. // Konstruktor
  169. GruppeChat();
  170. // Destruktor
  171. ~GruppeChat();
  172. // nicht constant
  173. void reset();
  174. void setGruppeId( int gruppeId );
  175. void gruppeNachricht( const char *nachricht );
  176. bool tick( double tickVal );
  177. void doPublicMausEreignis( MausEreignis &me );
  178. void doTastaturEreignis( TastaturEreignis &te );
  179. void render( Bild &zRObj );
  180. };
  181. class GruppeAnmeldung : public virtual ReferenceCounter
  182. {
  183. private:
  184. Punkt pos;
  185. Punkt gr;
  186. LRahmen *rahmen;
  187. KontrollKnopf *spielerHinzufügen;
  188. KontrollKnopf *angemeldet;
  189. TextFeld *zeit;
  190. Knopf *gruppeVerlassen;
  191. int admin;
  192. double time;
  193. int gruppeId;
  194. bool rend;
  195. public:
  196. // Konstruktor
  197. GruppeAnmeldung();
  198. // Destruktor
  199. ~GruppeAnmeldung();
  200. // nicht constant
  201. void reset();
  202. void setGruppeId( int gruppeId );
  203. void setSpielerHinzufügen( bool spielerHinzufügen );
  204. void setAngemeldet( bool angemeldet );
  205. void zurückInWarteschlange( int stunden, int minuten, int sekunden );
  206. void spielGefunden();
  207. void setAdmin( int admin );
  208. bool tick( double tickVal );
  209. void doPublicMausEreignis( MausEreignis &me );
  210. void render( Bild &zRObj );
  211. };
  212. class GruppeKarte : public Thread
  213. {
  214. private:
  215. Punkt pos;
  216. Punkt gr;
  217. LRahmen *rahmen;
  218. Bild *hintergrund;
  219. KSGScriptObj *info;
  220. HINSTANCE ksgs;
  221. TextFeld *fehler;
  222. TextRenderer *tr;
  223. unsigned char alpha1;
  224. unsigned char alpha2;
  225. double tickVal;
  226. double ladenZeit;
  227. int ladeBild;
  228. int karteId;
  229. int gruppeId;
  230. bool exit;
  231. bool geladen;
  232. bool rend;
  233. public:
  234. // Konstruktor
  235. GruppeKarte();
  236. // Destruktor
  237. ~GruppeKarte();
  238. // nicht constant
  239. void reset();
  240. void ksgsAktion( RCArray< KSGSVariable > *parameter, KSGSVariable **retVal );
  241. void setGruppeId( int gruppeId );
  242. bool tick( double tickVal );
  243. void doPublicMausEreignis( MausEreignis &me );
  244. void render( Bild &zrObj );
  245. virtual void thread();
  246. // constant
  247. int getKarteId() const;
  248. };
  249. class GruppeSpielGefunden : public virtual ReferenceCounter
  250. {
  251. private:
  252. Punkt pos;
  253. Punkt gr;
  254. Fenster *spielGefunden;
  255. TextFeld *zeit;
  256. TextFeld *warte;
  257. Knopf *annehmen;
  258. unsigned char alpha;
  259. double time;
  260. double tickVal;
  261. bool sichtbar;
  262. bool rend;
  263. public:
  264. // Konstruktor
  265. GruppeSpielGefunden();
  266. // Destruktor
  267. ~GruppeSpielGefunden();
  268. // nicht constant
  269. void reset();
  270. void setSichtbar( bool sichtbar );
  271. void setVerbleibendeZeit( int sekunden );
  272. bool tick( double tickVal );
  273. void doPublicMausEreignis( MausEreignis &me );
  274. void render( Bild &zRObj );
  275. // constant
  276. bool istSichtbar() const;
  277. };
  278. class GruppeFenster : public virtual ReferenceCounter
  279. {
  280. private:
  281. Punkt pos;
  282. Punkt gr;
  283. GruppeAnmeldung *anmeldung;
  284. GruppeChat *chat;
  285. GruppeAccountListe *accounts;
  286. GruppeEinladungListe *einladungen;
  287. GruppeKarte *karte;
  288. GruppeSpielGefunden *spiel;
  289. bool sichtbar;
  290. unsigned char alpha;
  291. int gruppeId;
  292. double tickVal;
  293. bool rend;
  294. public:
  295. // Konstruktor
  296. GruppeFenster();
  297. // Destruktor
  298. ~GruppeFenster();
  299. // nicht constant
  300. void setGruppeId( int id );
  301. void setSichtbar( bool sichtbar );
  302. void chatNachricht( const char *nachricht );
  303. void neuerSpieler( int accountId );
  304. void spielerVerlässt( int accountId );
  305. void neueEinladung( int accountId );
  306. void einladungEntfernt( int accountId );
  307. void einladungAbgelehnt( int accountId );
  308. void setSpielerHinzufügen( bool sh );
  309. void setAngemeldet( bool angemeldet );
  310. void spielGefunden();
  311. void verbleibendeZeit( int sekunden );
  312. void spielGefundenAbbruch();
  313. void zurückInWarteschlange( int stunden, int minuten, int sekunden );
  314. void setAdmin( int accountId );
  315. void kick();
  316. void reset();
  317. bool tick( double tickVal );
  318. void doPublicMausEreignis( MausEreignis &me );
  319. void doTastaturEreignis( TastaturEreignis &te );
  320. void render( Bild &zRObj );
  321. // constant
  322. int getGruppeId() const;
  323. int getKarteId() const;
  324. };
  325. #endif