fix Label->LabelBMFontBounds

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

View File

@ -1612,6 +1612,14 @@ std::string LabelBMFontBounds::subtitle() const
} }
void LabelBMFontBounds::draw() void LabelBMFontBounds::draw()
{
CustomCommand *cmd = CustomCommand::getCommandPool().generateCommand();
cmd->init(0, _vertexZ);
cmd->func = CC_CALLBACK_0(LabelBMFontBounds::onDraw, this);
Director::getInstance()->getRenderer()->addCommand(cmd);
}
void LabelBMFontBounds::onDraw()
{ {
auto labelSize = label1->getContentSize(); auto labelSize = label1->getContentSize();
auto origin = Director::getInstance()->getWinSize(); auto origin = Director::getInstance()->getWinSize();

View File

@ -376,6 +376,8 @@ public:
virtual void draw(); virtual void draw();
virtual std::string title() const override; virtual std::string title() const override;
virtual std::string subtitle() const override; virtual std::string subtitle() const override;
protected:
void onDraw();
private: private:
LabelBMFont *label1; LabelBMFont *label1;
}; };