fix Label->Atlas4

This commit is contained in:
Huabing.Xu 2013-12-25 15:05:49 +08:00
parent cfb06722d5
commit 19522152d5
2 changed files with 10 additions and 0 deletions

View File

@ -525,6 +525,14 @@ Atlas4::Atlas4()
}
void Atlas4::draw()
{
CustomCommand *cmd = CustomCommand::getCommandPool().generateCommand();
cmd->init(0, _vertexZ);
cmd->func = CC_CALLBACK_0(Atlas4::onDraw, this);
Director::getInstance()->getRenderer()->addCommand(cmd);
}
void Atlas4::onDraw()
{
auto s = Director::getInstance()->getWinSize();
DrawPrimitives::drawLine( Point(0, s.height/2), Point(s.width, s.height/2) );

View File

@ -104,6 +104,8 @@ public:
virtual std::string title() const override;
virtual std::string subtitle() const override;
protected:
void onDraw();
};
class Atlas5 : public AtlasDemo