12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #ifndef UpdateGUI_H
- #define UpdateGUI_H
- #include "../../Netzwerk/Patcher.h"
- #include <Fortschritt.h>
- #include <Knopf.h>
- #include <Array.h>
- #include <Thread.h>
- using namespace Framework;
- class UpdateGUI : private Thread
- {
- private:
- Patcher *p;
- TextFeld *updateStatus;
- Knopf *updateStarten;
- FBalken *updateFortschritt;
- bool updateAbbrechen;
- bool sichtbar;
- int alpha;
- int spielId;
- int dg;
- int ref;
- public:
- // Konstruktor
- UpdateGUI( Schrift *zSchrift, int spielId, int dg = 0 );
- // Destruktor
- ~UpdateGUI();
- // nicht constant
- void setSichtbar( bool sichtbar );
- void doMausEreignis( MausEreignis &me, Patcher *zP );
- bool tick( double zeit );
- void render( int xOff, int yOff, Bild &zRObj );
- void thread();
- // constant
- bool istGleich( int spielId, int dg = 0 );
- // Reference Counting
- UpdateGUI *getThis();
- UpdateGUI *release();
- };
- class UpdateHandler
- {
- private:
- Patcher *patcher;
- RCArray< UpdateGUI > *updates;
- Critical cs;
- int ref;
- // privat
- void lock();
- void unlock();
- public:
- // Konstruktor
- UpdateHandler();
- // Destruktor
- ~UpdateHandler();
- // nicht constant
- void erstellen( Schrift *zSchrift, int spiel, int dg = 0 );
- void setSichtbar( int spiel, bool sichtbar, int dg = 0 );
- void doMausEreignis( int spiel, MausEreignis &me, int dg = 0 );
- bool tick( int spiel, double zeit, int dg = 0 );
- void render( int spiel, int xOff, int yOff, Bild &zRObj, int dg = 0 );
- void remove( int spiel, int dg = 0 );
- bool hat( int spiel, int dg = 0 );
- // Reference Counting
- UpdateHandler *getThis();
- UpdateHandler *release();
- };
- #endif
|