🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

News...and PLabel!!!

Published January 11, 2006
Advertisement
Hi...
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...
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Another Demo

1125 views

Link resolved....

1177 views

Update....

1149 views

Let's play... = )

1103 views

A little doubt

955 views

PLayer

991 views
Advertisement