123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- #ifndef FreundesListe_H
- #define FreundesListe_H
- #include <Klient.h>
- #include <Zeichnung.h>
- #include <Fenster.h>
- #include <Array.h>
- #include <Knopf.h>
- #include <Thread.h>
- #include <Rahmen.h>
- using namespace Framework;
- class FreundData : public Thread
- {
- private:
- LRahmen* rahmen;
- AlphaFeld* auswahlBuffer;
- TextFeld* name;
- TextFeld* status;
- Knopf* entfernen;
- Knopf* ansehen;
- Knopf* nachricht;
- Knopf* einladen;
- int accountId;
- bool einladenSichtbar;
- bool online;
- bool ausgewählt;
- int höhe;
- int animation;
- unsigned char auswahlAlpha;
- double tickVal;
- bool rend;
- public:
- // Konstruktor
- FreundData(int accountId, LRahmen* rahmen, AlphaFeld* auswahlBuffer);
- // Destruktor
- ~FreundData();
- // nicht constant
- void thread();
- void setName(const char* txt);
- void setStatus(const char* txt);
- void setOnline(bool online);
- void setAusgewählt(bool ausw);
- void remove();
- void zeigeEinladeKnopf(bool zeigen);
- void doPublicMausEreignis(MausEreignis& me);
- bool tick(double tickVal);
- void render(int yPos, Bild& zRObj);
- // constant
- bool istOnline() const;
- bool istAusgewählt() const;
- const char* zName() const;
- Text* getName() const;
- const char* zStatus() const;
- Text* getStatus() const;
- int getAccountId() const;
- int getHeight() const;
- };
- class FreundesListeObj : public Zeichnung
- {
- private:
- RCArray< FreundData >* members;
- LRahmen* memberRahmen;
- AlphaFeld* auswahlBuffer;
- VScrollBar* vsb;
- Punkt bildschirmGröße;
- bool einladenSichtbar;
- int memberNummer;
- public:
- // Konstruktor
- FreundesListeObj();
- // Destruktor
- ~FreundesListeObj();
- // nicht constant
- void addMember(int accountId);
- void removeMember(int accountId);
- void removeMember(FreundData* member);
- void removeAll();
- void setName(int accountId, const char* txt);
- void setStatus(int accountId, const char* txt);
- void setOnline(int accountId, bool online);
- void zeigeEinladeKnopf(bool zeigen);
- bool tick(double tickVal) override;
- void doPublicMausEreignis(MausEreignis& me) override;
- void render(Bild& zRObj) override;
- // constant
- bool istFreund(int accId) const;
- };
- class FreundesListe : public Thread
- {
- private:
- Fenster* fenster;
- TextFeld* überschrift;
- TextFeld* accountName;
- Knopf* minMax;
- Knopf* neuerFreund;
- Knopf* neuerChat;
- FreundesListeObj* freundesListe;
- Punkt bildschirmGröße;
- Fenster* neuerFreundFenster;
- TextFeld* neuerFreundSpielerName;
- Knopf* neuerFreundFertig;
- Fenster* neuerChatFenster;
- TextFeld* neuerChatName;
- Knopf* neuerChatFertig;
- TextFeld* neuesChatroomName;
- Knopf* neuesChatroomFertig;
- Bild* minimierenBild;
- Bild* maximierenBild;
- int animation;
- double tickVal;
- bool neuerFreundSichtbar;
- bool neuerChatSichtbar;
- bool rend;
- public:
- // Konstruktor
- FreundesListe(Fenster* zNachLoginFenster);
- // Destruktor
- ~FreundesListe();
- // nicht constant
- void addMember(int accountId);
- void removeMember(int accountId);
- void removeMember(FreundData* member);
- void removeAll();
- void setName(int accountId, const char* txt);
- void setStatus(int accountId, const char* txt);
- void setOnline(int accountId, bool online);
- void setAnimation(int animation);
- void thread();
- void zeigeEinladeKnopf(bool zeigen);
- bool tick(double tickVal);
- bool druckMinMax(MausEreignis& me);
- bool druckName(TastaturEreignis& te);
- bool druckNeuerFreund(MausEreignis& me);
- bool druckNeuerChat(MausEreignis& me);
- bool druckNeuerFreundSpielerName(TastaturEreignis& te);
- bool druckNeuerFreundFertig(MausEreignis& me);
- bool druckNeuerChatName(TastaturEreignis& te);
- bool druckNeuerChatFertig(MausEreignis& me);
- bool druckNeuesChatroomName(TastaturEreignis& te);
- bool druckNeuesChatroomFertig(MausEreignis& me);
- // constant
- bool istFreund(int accId) const;
- };
- // Nachrichten
- bool freundesListeMinMaxME(void* p, void* obj, MausEreignis me);
- bool freundesListeNameTE(void* p, void* obj, TastaturEreignis te);
- bool freundesListeNeuerFreundME(void* p, void* obj, MausEreignis me);
- bool freundesListeNeuerChatME(void* p, void* obj, MausEreignis me);
- bool freundesListeNeuerFreundSpielerNameTE(void* p, void* obj, TastaturEreignis te);
- bool freundesListeNeuerFreundFertigME(void* p, void* obj, MausEreignis me);
- bool freundesListeNeuerChatNameTE(void* p, void* obj, TastaturEreignis te);
- bool freundesListeNeuerChatFertigME(void* p, void* obj, MausEreignis me);
- bool freundesListeNeuesChatroomNameTE(void* p, void* obj, TastaturEreignis te);
- bool freundesListeNeuesChatroomFertigME(void* p, void* obj, MausEreignis me);
- #endif
|