Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    17
  • comments
    37
  • views
    8951

News...and PLabel!!!

Sign in to follow this  
Kerkhoff

320 views

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...
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!