PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Skinnable user interface

I'd like to come up with a way to have a customizable/skinnable interface for some projects I'm working on.

I'd like to have an external file that defines button size, location, color/bitmap, etc. I've searched a bit, but haven't really found anything decent about how to do something like this.

Anybody have any decent reference material you can point me to?

The best I've found so far is the PocketMVP source code.

Thanks,

Pam
hmm...Sounds a bit like what I did with gfDoom. In that I used a bitmap skin and a configuration script which defines the harware buttons and the size/position of the on-screen buttons.

Is that the sort of thing you had in mind?
Yeah, something like that. I was trying to come up with a somewhat generic format that I could use across several different projects.

I was looking through the PocketMVP source and made a class called SkinItem

Code:

class SkinItem
{
public:
SkinItem();
~SkinItem();
bool CheckRect(int x, int y);

protected:
int type; //0=button
int top;
int left;
int width;
int height;
int state; //0=not pushed 1=pushed
int index; //index into surface
Pixel ForeColor;
Pixel BackColor;
TCHAR m_string[64];
Surface *m_Surf;
Surface *m_PushedSurf;
};


and a Skin class that stores the various SkinItems, loads from a file, etc.

Pam