KarteAuswahl.h 2.6 KB

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