mirror of https://github.com/axmolengine/axmol.git
fix Label->LabelBMFontBounds
This commit is contained in:
parent
19522152d5
commit
7333a636c1
|
@ -1612,6 +1612,14 @@ std::string LabelBMFontBounds::subtitle() const
|
|||
}
|
||||
|
||||
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 origin = Director::getInstance()->getWinSize();
|
||||
|
|
|
@ -376,6 +376,8 @@ public:
|
|||
virtual void draw();
|
||||
virtual std::string title() const override;
|
||||
virtual std::string subtitle() const override;
|
||||
protected:
|
||||
void onDraw();
|
||||
private:
|
||||
LabelBMFont *label1;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue