本文整理汇总了C++中ogre::TextAreaOverlayElement::setSpaceWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ TextAreaOverlayElement::setSpaceWidth方法的具体用法?C++ TextAreaOverlayElement::setSpaceWidth怎么用?C++ TextAreaOverlayElement::setSpaceWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::TextAreaOverlayElement
的用法示例。
在下文中一共展示了TextAreaOverlayElement::setSpaceWidth方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
void LogMessageWindow::initialize(void)
{
try
{
// always initialize after gkDebugScreen!
Ogre::OverlayManager& mgr = Ogre::OverlayManager::getSingleton();
m_over = mgr.create("<gkBuiltin/LogMessageWindow>");
m_textarea = mgr.createOverlayElement("TextArea", "<gkBuiltin/LogMessageWindow/Textarea>");
m_cont = (Ogre::OverlayContainer*)mgr.createOverlayElement("Panel", "<gkBuiltin/LogMessageWindow/Containter>");
m_cont->setMetricsMode(Ogre::GMM_PIXELS);
m_cont->setVerticalAlignment(Ogre::GVA_TOP);
m_cont->setHorizontalAlignment(Ogre::GHA_LEFT);
//m_cont->setLeft(-16 * PROP_SIZE);
//m_cont->setTop(10);
//m_cont->setWidth(1.0f);
//m_cont->setHeight(0.25f);
//m_cont->s>setDimensions(1.0,0.25);
m_textarea->setMetricsMode(Ogre::GMM_PIXELS);
m_textarea->setVerticalAlignment(Ogre::GVA_TOP);
m_textarea->setHorizontalAlignment(Ogre::GHA_LEFT);
//m_val->setMetricsMode(Ogre::GMM_PIXELS);
//m_val->setVerticalAlignment(Ogre::GVA_TOP);
//m_val->setHorizontalAlignment(Ogre::GHA_LEFT);
//m_val->setLeft(8 * PROP_SIZE);
m_font = Ogre::FontManager::getSingleton().create("WQYFont", MY_GROUP_NAME);
m_font ->setSource(FONT_TTF_WQY);
m_font ->setType(Ogre::FT_TRUETYPE);
m_font ->setTrueTypeSize( 20 );
m_font ->setTrueTypeResolution( 96 );
m_font ->addCodePointRange(Ogre::Font::CodePointRange(33,255));
m_font ->addCodePointRange(Ogre::Font::CodePointRange(19968,40869));
m_font ->load();
Ogre::TextAreaOverlayElement* textArea;
textArea = static_cast<Ogre::TextAreaOverlayElement*>(m_textarea);
//textArea->setFontName("<gkBuiltin/Font>");
textArea->setFontName("WQYFont");
textArea->setCharHeight(PROP_SIZE);
textArea->setSpaceWidth(PROP_SIZE);
textArea->setColour(Ogre::ColourValue::Green);
//textArea = static_cast<Ogre::TextAreaOverlayElement*>(m_val);
//textArea->setFontName("<gkBuiltin/Font>");
//textArea->setCharHeight(PROP_SIZE);
//textArea->setColour(Ogre::ColourValue::White);
m_over->setZOrder(498);
m_cont->addChild(m_textarea);
m_over->add2D(m_cont);
}
catch (Ogre::Exception& e)
{
gkPrintf("%s\n", e.getDescription().c_str());
return;
}
m_isInit = true;
}
示例2: textareaoverlayelement_set_space_width
//void setSpaceWidth( Real width );
void textareaoverlayelement_set_space_width(TextAreaOverlayElementHandle handle, coiReal width)
{
Ogre::TextAreaOverlayElement* toe = static_cast<Ogre::TextAreaOverlayElement*>(handle);
toe->setSpaceWidth(width);
}