本文整理汇总了C++中TextStyle::getColour方法的典型用法代码示例。如果您正苦于以下问题:C++ TextStyle::getColour方法的具体用法?C++ TextStyle::getColour怎么用?C++ TextStyle::getColour使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextStyle
的用法示例。
在下文中一共展示了TextStyle::getColour方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hitbox
void TextField2::render(float dt)
{
if (!mVisible || mFont == NULL || !mFont->isLoaded())
{
return;
}
mCurrentLine = 0;
preRender(dt);
mFont->getAsset()->getTexture()->bindTexture();
glBegin(GL_QUADS);
while (mCurrentNode.get() != NULL)
{
if (mNewLineDirty)
{
Node::NodeHitboxList &list = mCurrentNode->getHitboxes();
list.clear();
Handle<NodeHitbox> hitbox(new NodeHitbox(mCurrentNode));
mTextHitboxes->addChild(hitbox.get());
hitbox->setPosition(mCurrXpos, mCurrYpos - mTextHitboxes->getPositionY());
hitbox->setHeight(mFont->getCharHeight());
hitbox->addEventListener(MOUSE_UP, this);
list.push_back(hitbox);
}
TextStyle currentStyle = mCurrentNode->getTextStyle();
GfxEngine::getEngine()->popColourStack();
if (currentStyle.hasColour())
{
GfxEngine::getEngine()->pushColourStack(currentStyle.getColour());
}
else
{
if (mGfxComponent)
{
GfxEngine::getEngine()->pushColourStack(mGfxComponent->getColour());
}
else
{
GfxEngine::getEngine()->pushColourStack(Colour::WHITE);
}
}
GfxEngine::getEngine()->applyColourStack();
renderText(mCurrentNode->getText());
mCurrentNode = mCurrentNode->nextSibling();
}
glEnd();
mScrollbar->setMaxValue(getTotalNumLines() - mDisplayNumLines - 1);
mNewLineDirty = false;
for (ChildList::iterator iter = mChildren.begin(); iter != mChildren.end(); ++iter)
{
if (mGfxComponent)
{
mGfxComponent->getColour().applyColour();
}
(*iter)->render(dt);
}
postRender(dt);
}