SpielAuswahl.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #ifndef SpielAuswahl_H
  2. #define SpielAuswahl_H
  3. #include <Klient.h>
  4. #include <Bild.h>
  5. #include <Thread.h>
  6. #include <TextFeld.h>
  7. #include <Animation.h>
  8. #include <KSGScript.h>
  9. #include <Rahmen.h>
  10. using namespace Framework;
  11. using namespace KSGScript;
  12. class SpielDaten; // aus dieser Datei
  13. class SpielDaten : public virtual ReferenceCounter
  14. {
  15. private:
  16. class Loader : public Thread
  17. {
  18. private:
  19. SpielDaten *sd;
  20. bool beenden;
  21. int aktion;
  22. public:
  23. Loader( SpielDaten *sd, int aktion );
  24. void setBeenden();
  25. void thread() override;
  26. int getAktion() const;
  27. };
  28. Loader *loader;
  29. int spielId;
  30. Text *name;
  31. Bild *hintergrund;
  32. Animation2D *aAnimation;
  33. TextRenderer *tr;
  34. KSGScriptObj *beschreibung;
  35. HINSTANCE ksgs;
  36. LRahmen *rahmen;
  37. double tickVal;
  38. int animation;
  39. bool ausgewählt;
  40. Punkt pos;
  41. Punkt gr;
  42. int geladen;
  43. AlphaFeld *auswahl;
  44. int ladenBild;
  45. bool rend;
  46. bool erlaubt;
  47. unsigned char tAlpha;
  48. unsigned char alpha;
  49. public:
  50. // Konstruktor
  51. SpielDaten( const char *name, int id );
  52. // Destruktor
  53. ~SpielDaten();
  54. // nicht constant
  55. void ksgsAktion( RCArray< KSGSVariable > *parameter, KSGSVariable **retVal );
  56. void updateErlaubt();
  57. void setSichtbar( bool sichtbar );
  58. void setSichtbar();
  59. void setAuswahl( bool auswahl );
  60. void setPosition( int lPos );
  61. bool tick( double tickVal );
  62. void doPublicMausEreignis( MausEreignis &me );
  63. void render( Bild &zRObj );
  64. // constant
  65. int getSpielId() const;
  66. bool istausgewählt() const;
  67. Text *zName() const;
  68. bool istErlaubt() const;
  69. };
  70. class SpielAuswahlFenster : public Thread
  71. {
  72. private:
  73. int anzahl;
  74. int auswahl;
  75. RCArray< SpielDaten > *members;
  76. LRahmen *rahmen;
  77. TextRenderer *tr;
  78. double tickVal;
  79. int animation;
  80. Punkt pos;
  81. Punkt gr;
  82. int seite;
  83. bool rend;
  84. unsigned char alpha;
  85. public:
  86. // Konstruktor
  87. SpielAuswahlFenster();
  88. // Destruktor
  89. ~SpielAuswahlFenster();
  90. // nicht constant
  91. void setSichtbar( bool sichtbar );
  92. void blättern( bool oben );
  93. void updateListe();
  94. virtual void thread();
  95. bool tick( double tickVal );
  96. void doPublicMausEreignis( MausEreignis &me );
  97. void render( Bild &zrObj );
  98. // constant
  99. int getAnzahl() const;
  100. int getSeiteAnzahl() const;
  101. int getSeite() const;
  102. int getAnzahlAufSeite() const;
  103. bool hatAuswahl() const;
  104. SpielDaten *getAuswahl() const;
  105. SpielDaten *zAuswahl() const;
  106. bool istAuswahlErlubt() const;
  107. };
  108. #endif