mirror of https://github.com/axmolengine/axmol.git
fix Label->Atlas4
This commit is contained in:
parent
cfb06722d5
commit
19522152d5
|
@ -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) );
|
||||
|
|
|
@ -104,6 +104,8 @@ public:
|
|||
|
||||
virtual std::string title() const override;
|
||||
virtual std::string subtitle() const override;
|
||||
protected:
|
||||
void onDraw();
|
||||
};
|
||||
|
||||
class Atlas5 : public AtlasDemo
|
||||
|
|
Loading…
Reference in New Issue