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

View File

@@ -73,7 +73,7 @@ public:
class JGuiController
{
protected:
static JGE* mEngine;
JGE* mEngine;
int mId;
bool mActive;
@@ -101,7 +101,7 @@ public:
vector<JGuiObject*> mObjects;
int mCount;
JGuiController(int id, JGuiListener* listener);
JGuiController(JGE* jge, int id, JGuiListener* listener);
~JGuiController();
virtual void Render();

View File

@@ -13,8 +13,6 @@
JGE* JGuiObject::mEngine = NULL;
JGE* JGuiController::mEngine = NULL;
JGuiObject::JGuiObject(int id) :
mId(id)
{
@@ -55,11 +53,9 @@ ostream& operator<<(ostream &out, const JGuiObject &j)
return j.toString(out);
}
JGuiController::JGuiController(int id, JGuiListener* listener) :
mId(id), mListener(listener)
JGuiController::JGuiController(JGE* jge, int id, JGuiListener* listener) :
mEngine(jge), mId(id), mListener(listener)
{
mEngine = JGE::GetInstance();
mBg = NULL;
mShadingBg = NULL;
@@ -189,10 +185,14 @@ bool JGuiController::CheckUserInput(JButton key)
void JGuiController::Update(float dt)
{
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();
CheckUserInput(key);
if(mEngine)
{
JButton key = mEngine->ReadButton();
CheckUserInput(key);
}
}
void JGuiController::Add(JGuiObject* ctrl)