SpielLaden.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #ifndef SpielLaden_H
  2. #define SpielLaden_H
  3. #include <Klient.h>
  4. #include <Thread.h>
  5. #include <Bild.h>
  6. #include <TextFeld.h>
  7. #include <Fortschritt.h>
  8. #include "..\..\..\Strukturen\Strukturen.h"
  9. #include <Rahmen.h>
  10. using namespace Framework;
  11. class SpielLadenListeSpieler
  12. {
  13. private:
  14. int accountId;
  15. TextFeld *name;
  16. TextFeld *team;
  17. TextFeld *ping;
  18. FBalken *fortschritt;
  19. LRahmen *rahmen;
  20. Text *teamName;
  21. int p;
  22. int spielerFarbe;
  23. int teamFarbe;
  24. bool rend;
  25. int ref;
  26. public:
  27. // Konstruktor
  28. SpielLadenListeSpieler( int accountId, Schrift *zSchrift );
  29. // Destruktor
  30. ~SpielLadenListeSpieler();
  31. // nicht constant
  32. void setFortschritt( int prozent );
  33. void setPing( int ping );
  34. void setTeamName( Text *zName );
  35. void setSpielerFarbe( int farbe );
  36. void setTeamFarbe( int farbe );
  37. bool tick( double tickVal );
  38. void render( int y, Bild &zRObj );
  39. // constant
  40. int getAccountId() const;
  41. // Reference Counting
  42. SpielLadenListeSpieler *getThis();
  43. SpielLadenListeSpieler *release();
  44. };
  45. class SpielLadenListe
  46. {
  47. private:
  48. int spielerAnzahl;
  49. int höhe;
  50. int breite;
  51. double tickVal;
  52. TextFeld *spielerName;
  53. TextFeld *spielerFarbe;
  54. TextFeld *teamName;
  55. TextFeld *teamFarbe;
  56. TextFeld *ping;
  57. TextFeld *fortschritt;
  58. LRahmen *rahmen;
  59. AlphaFeld *titel;
  60. RCArray < SpielLadenListeSpieler > *spieler;
  61. SpielerTeamStruktur *sts;
  62. Schrift *schrift;
  63. Punkt bildschirmGröße;
  64. unsigned char alpha;
  65. int animation;
  66. bool rend;
  67. int ref;
  68. public:
  69. // Konstruktor
  70. SpielLadenListe( Schrift *zSchrift );
  71. // Destruktor
  72. ~SpielLadenListe();
  73. // nicht constant
  74. void setSTS( SpielerTeamStruktur *sts );
  75. void setSichtbar( bool sichtbar );
  76. void addSpieler( int accountId, int spielerNummer );
  77. void setSpielerFortschritt( int accountId, int prozent );
  78. void setSpielerPing( int accountId, int ping );
  79. bool tick( double tickval );
  80. void render( Bild &zRObj );
  81. // constant
  82. int getHeight() const;
  83. int getAlpha() const;
  84. // Reference Counting
  85. SpielLadenListe *getThis();
  86. SpielLadenListe *release();
  87. };
  88. class SpielLaden : public Thread
  89. {
  90. private:
  91. int karteId;
  92. Punkt bildschirmGröße;
  93. Bild *hintergrundBild;
  94. unsigned char ladenAlpha;
  95. unsigned char hintergrundAlpha;
  96. int ladenBild;
  97. double tickVal;
  98. bool geladen;
  99. SpielLadenListe *liste;
  100. int animation;
  101. bool ende;
  102. bool rend;
  103. public:
  104. // Konstruktor
  105. SpielLaden( Schrift *zSchrift );
  106. // Destruktor
  107. ~SpielLaden();
  108. // nicht constant
  109. void setSpielerTeamStruktur( SpielerTeamStruktur *sts );
  110. void setKarte( int karteId );
  111. void setSichtbar( bool sichtbar );
  112. void thread() override;
  113. void addSpieler( int accountId, int spielerNummer );
  114. void setSpielerFortschritt( int accountId, int prozent );
  115. void setSpielerPing( int accountId, int ping );
  116. bool tick( double tickVal );
  117. void render( Bild &zRObj );
  118. // constant
  119. int getAlpha() const;
  120. };
  121. #endif