• Advertisement
Sign in to follow this  
  • entries
    17
  • comments
    37
  • views
    8914

We can do something now =P

Sign in to follow this  

239 views

Hi my friends...

After this late in post here...

I bring some news...

The PLabel class supports the Outline Fonts, Bitmap Fonts and Texture mapped fonts..

the PPanel class is almost done, it's working now, except by some details that I'll implement tomorrow, like caption align, borders visible, etc...

the PGraphicObjectCollection is dead...it just brought me problems...

PPanel : PInputEventReceiver



private:
PLabel* FCaption;
SColor* FBackgroundColor;
SColor* FBorderColor;

std::string FTextureFileName;

unsigned int FTexture;
unsigned int FDisplayListRectWireFrame;
unsigned int FDisplayListRect;
unsigned int FDisplayListRectTexture;

int FBorderWidth;
int FRectType;
bool FFilled;
public:
PPanel(SRect* ABounds, int ARectType, IVideoDriver* AVideoDriver);
~PPanel(void);

PLabel* GetCaption(void);
void SetCaption(PLabel* AValue);

SColor* GetBackgroundColor(void);
void SetBackgroundColor(SColor* AValue);

SColor* GetBorderColor(void);
void SetBorderColor(SColor* AValue);

std::string GetTextureFileName(void);
void SetTextureFileName(std::string AValue);

int GetBorderWidth(void);
void SetBorderWidth(int AValue);

bool GetFilled(void);
void SetFilled(bool AValue);

void PrepareToDraw(void);

void Draw(void);



The IVideoDriver have some new methods too



virtual AUX_RGBImageRec* LoadBMPRec(std::string AFileName) = 0;

virtual void SetBlend(bool AValue) = 0;
virtual void SetTexture(bool AValue) = 0;

virtual unsigned int GenerateDisplayList(int AListSize) = 0;
virtual void CallDisplayList(unsigned int ADisplayList) = 0;
virtual void DestroyDisplayList(unsigned int ADisplayList, int ASize) = 0;

virtual void LoadTexture(std::string AFileName, unsigned int &ATextureBuffer, int ATextureType) = 0;
virtual void BindTexture(unsigned int ATextureBuffer) = 0;

virtual void DrawText(std::string AText, float ASize, SColor* AColor, SCoord* ACoord, unsigned int ADisplayList, int AFontType) = 0;

virtual unsigned int GenerateDisplayListRectWireFrame(SRect* ABounds, SColor* ABorderColor, int ABorderWidth) = 0;
virtual unsigned int GenerateDisplayListRect(SRect* ABounds, SColor* ABackgroundColor) = 0;
virtual unsigned int GenerateDisplayListRectTexture(SRect* ABounds, SColor* AColor) = 0;





I'm using display list for everything, if someone has any suggestion in how I can approach the performance...tell me...

I have made a little demo with two panels and one running label to show the use of layers and what we have until now:

Predator Engine Demo

well...I hope you like the system...

I think that our next step is make some buttons..right?

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