SpielAuswahl.h 2.3 KB

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