J :
* Clean carriage returns.
This commit is contained in:
@@ -26,90 +26,86 @@
|
||||
|
||||
class JGuiListener
|
||||
{
|
||||
public:
|
||||
virtual ~JGuiListener() {}
|
||||
virtual void ButtonPressed(int controllerId, int controlId) = 0;
|
||||
public:
|
||||
virtual ~JGuiListener() {}
|
||||
virtual void ButtonPressed(int controllerId, int controlId) = 0;
|
||||
};
|
||||
|
||||
|
||||
class JGuiObject
|
||||
{
|
||||
protected:
|
||||
static JGE* mEngine;
|
||||
protected:
|
||||
static JGE* mEngine;
|
||||
|
||||
private:
|
||||
int mId;
|
||||
private:
|
||||
int mId;
|
||||
|
||||
|
||||
public:
|
||||
JGuiObject(int id);
|
||||
virtual ~JGuiObject();
|
||||
public:
|
||||
JGuiObject(int id);
|
||||
virtual ~JGuiObject();
|
||||
|
||||
virtual void Render() = 0;
|
||||
virtual void Update(float dt);
|
||||
virtual void Render() = 0;
|
||||
virtual void Update(float dt);
|
||||
|
||||
virtual void Entering(); // when focus is transferring to this obj
|
||||
virtual bool Leaving(u32 key); // when focus is transferring away from this obj, true to go ahead
|
||||
virtual bool ButtonPressed(); // action button pressed, return false to ignore
|
||||
virtual void Entering(); // when focus is transferring to this obj
|
||||
virtual bool Leaving(u32 key); // when focus is transferring away from this obj, true to go ahead
|
||||
virtual bool ButtonPressed(); // action button pressed, return false to ignore
|
||||
|
||||
int GetId();
|
||||
int GetId();
|
||||
};
|
||||
|
||||
|
||||
class JGuiController
|
||||
{
|
||||
protected:
|
||||
static JGE* mEngine;
|
||||
protected:
|
||||
static JGE* mEngine;
|
||||
|
||||
int mId;
|
||||
bool mActive;
|
||||
int mId;
|
||||
bool mActive;
|
||||
|
||||
|
||||
u32 mActionButton;
|
||||
int mCurr;
|
||||
int mStyle;
|
||||
u32 mActionButton;
|
||||
int mCurr;
|
||||
int mStyle;
|
||||
|
||||
JSprite* mCursor;
|
||||
bool mShowCursor;
|
||||
int mCursorX;
|
||||
int mCursorY;
|
||||
JSprite* mCursor;
|
||||
bool mShowCursor;
|
||||
int mCursorX;
|
||||
int mCursorY;
|
||||
|
||||
int mBgX;
|
||||
int mBgY;
|
||||
const JTexture* mBg;
|
||||
PIXEL_TYPE mShadingColor;
|
||||
Rect* mShadingBg;
|
||||
int mBgX;
|
||||
int mBgY;
|
||||
const JTexture* mBg;
|
||||
PIXEL_TYPE mShadingColor;
|
||||
Rect* mShadingBg;
|
||||
|
||||
JGuiListener* mListener;
|
||||
u32 mLastKey;
|
||||
//int mKeyHoldTime;
|
||||
float mKeyRepeatDelay;
|
||||
JGuiListener* mListener;
|
||||
//int mKeyHoldTime;
|
||||
|
||||
bool KeyRepeated(u32 key, float dt);
|
||||
public:
|
||||
JGuiObject* mObjects[MAX_GUIOBJECT];
|
||||
int mCount;
|
||||
|
||||
public:
|
||||
JGuiObject* mObjects[MAX_GUIOBJECT];
|
||||
int mCount;
|
||||
JGuiController(int id, JGuiListener* listener);
|
||||
~JGuiController();
|
||||
|
||||
JGuiController(int id, JGuiListener* listener);
|
||||
~JGuiController();
|
||||
virtual void Render();
|
||||
virtual void Update(float dt);
|
||||
|
||||
virtual void Render();
|
||||
virtual void Update(float dt);
|
||||
void Add(JGuiObject* ctrl);
|
||||
void Remove(int id);
|
||||
void Remove(JGuiObject* ctrl);
|
||||
|
||||
void Add(JGuiObject* ctrl);
|
||||
void Remove(int id);
|
||||
void Remove(JGuiObject* ctrl);
|
||||
void SetActionButton(u32 button);
|
||||
void SetStyle(int style);
|
||||
void SetCursor(JSprite* cursor);
|
||||
|
||||
void SetActionButton(u32 button);
|
||||
void SetStyle(int style);
|
||||
void SetCursor(JSprite* cursor);
|
||||
bool IsActive();
|
||||
void SetActive(bool flag);
|
||||
|
||||
bool IsActive();
|
||||
void SetActive(bool flag);
|
||||
|
||||
//void SetImageBackground(const JTexture* tex, int x, int y);
|
||||
//void SetShadingBackground(int x, int y, int width, int height, PIXEL_TYPE color);
|
||||
//void SetImageBackground(const JTexture* tex, int x, int y);
|
||||
//void SetShadingBackground(int x, int y, int width, int height, PIXEL_TYPE color);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user