Include missing JGE files from my last commit

This commit is contained in:
Xawotihs
2011-11-14 18:43:51 +00:00
parent f68c106e7e
commit ae3d97dbeb
2 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ public:
class JGuiController class JGuiController
{ {
protected: protected:
static JGE* mEngine; JGE* mEngine;
int mId; int mId;
bool mActive; bool mActive;
@@ -101,7 +101,7 @@ public:
vector<JGuiObject*> mObjects; vector<JGuiObject*> mObjects;
int mCount; int mCount;
JGuiController(int id, JGuiListener* listener); JGuiController(JGE* jge, int id, JGuiListener* listener);
~JGuiController(); ~JGuiController();
virtual void Render(); virtual void Render();
+9 -9
View File
@@ -13,8 +13,6 @@
JGE* JGuiObject::mEngine = NULL; JGE* JGuiObject::mEngine = NULL;
JGE* JGuiController::mEngine = NULL;
JGuiObject::JGuiObject(int id) : JGuiObject::JGuiObject(int id) :
mId(id) mId(id)
{ {
@@ -55,11 +53,9 @@ ostream& operator<<(ostream &out, const JGuiObject &j)
return j.toString(out); return j.toString(out);
} }
JGuiController::JGuiController(int id, JGuiListener* listener) : JGuiController::JGuiController(JGE* jge, int id, JGuiListener* listener) :
mId(id), mListener(listener) mEngine(jge), mId(id), mListener(listener)
{ {
mEngine = JGE::GetInstance();
mBg = NULL; mBg = NULL;
mShadingBg = NULL; mShadingBg = NULL;
@@ -189,10 +185,14 @@ bool JGuiController::CheckUserInput(JButton key)
void JGuiController::Update(float dt) void JGuiController::Update(float dt)
{ {
for (int i = 0; i < mCount; i++) for (int i = 0; i < mCount; i++)
if (mObjects[i] != NULL) mObjects[i]->Update(dt); if (mObjects[i] != NULL)
mObjects[i]->Update(dt);
JButton key = mEngine->ReadButton(); if(mEngine)
CheckUserInput(key); {
JButton key = mEngine->ReadButton();
CheckUserInput(key);
}
} }
void JGuiController::Add(JGuiObject* ctrl) void JGuiController::Add(JGuiObject* ctrl)