-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f1670c
commit 31da25e
Showing
6 changed files
with
110 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
#include "PCGuiNode.hpp" | ||
PCGuiNode* PCGuiNode::create() | ||
{ | ||
auto pRet = new PCGuiNode(); | ||
if (pRet && pRet->init()) | ||
{ | ||
pRet->autorelease(); | ||
return pRet; | ||
} | ||
CC_SAFE_DELETE(pRet); | ||
return nullptr; | ||
} | ||
PCGuiNode::~PCGuiNode() | ||
{ | ||
this->release(); | ||
} | ||
PCGuiNode* PCGuiNode::get() | ||
{ | ||
if (!instance) | ||
{ | ||
instance = PCGuiNode::create(); | ||
instance->retain(); | ||
} | ||
return instance; | ||
} | ||
void PCGuiNode::visit() | ||
{ | ||
CCNode::visit(); | ||
} | ||
void PCGuiNode::draw() | ||
{ | ||
CCNode::draw(); | ||
ccGLBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||
//if (!Client::instance) | ||
// return; | ||
ccDrawSolidRect(ccp(0, 0), ccp(100, 100), ccc4f(drawScene ? 1 : 0, 0, 0, 1)); | ||
for (auto window : Client::instance->windows) | ||
{ | ||
//window->draw(); | ||
} | ||
} | ||
class $modify (CCEGLView) | ||
{ | ||
virtual void swapBuffers() | ||
{ | ||
PCGuiNode::get()->visit(); | ||
CCEGLView::swapBuffers(); | ||
} | ||
}; | ||
class $modify (CCDirector) | ||
{ | ||
void drawScene() | ||
{ | ||
CCDirector::drawScene(); | ||
PCGuiNode::get()->visit(); | ||
} | ||
};*/ |
Oops, something went wrong.