after some days without post here, I show you the PLabel class...
PLabel: PGraphicObject
private: unsigned int FDisplayList; GLYPHMETRICSFLOAT FGlyphs[256]; HFONT FFont; SColor* FColor; std::string FCaption; std::string FFontName; int FSize; int FWeight; bool FWireFrame; bool FItalic; bool FUnderline; bool FStrikeOut; int GetCaptionWidth(void); int GetCaptionHeight(void);public: PLabel(std::string ACaption, std::string AFontName, int AFontSize, SCoord* ACoord); ~PLabel(void); std::string GetCaption(void); void SetCaption(std::string AValue); SColor* GetColor(void); void SetColor(SColor* AValue); std::string GetFontName(void); void SetFontName(std::string AValue); bool GetWireFrame(void); void SetWireFrame(bool AValue); int GetSize(void); void SetSize(int AValue); int GetWeight(void); void SetWeight(int AValue); bool GetItalic(void); void SetItalic(bool AValue); bool GetUnderline(void); void SetUnderline(bool AValue); bool GetStrikeOut(void); void SetStrikeOut(bool AValue); void BuildFont(void); void Draw(void);
This class is quite simple, some properties...
the BuildFont Method, have to be called before the Draw Method
Well, like the title says...I have made some changes in our mechanism...
Now, we have a PGraphicObjectCollection class, that have a list of PGraphicObjects (=P)...
protected: PList* FObjects; IVideoDriver* FVideoDriver;public: PGraphicObjectCollection(IVideoDriver* AVideoDriver); ~PGraphicObjectCollection(void); virtual void Sync(void);
the sync method, just distribute the FVideoDriver component(that is unique) between its FObjects...
The Sync Method, must to be called after all objects are inserted and before call methods that uses the FVideoDriver of them.
Okay, I'll try to be more fast and keep on posting everyday...
See ya...