SpielLaden.h 2.8 KB

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