本文整理汇总了C++中LabelRefPtr::setRolloverTextColor方法的典型用法代码示例。如果您正苦于以下问题:C++ LabelRefPtr::setRolloverTextColor方法的具体用法?C++ LabelRefPtr::setRolloverTextColor怎么用?C++ LabelRefPtr::setRolloverTextColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LabelRefPtr
的用法示例。
在下文中一共展示了LabelRefPtr::setRolloverTextColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createLeftPanelButtonPanel
ComponentRefPtr createLeftPanelButtonPanel(void)
{
// Create Label for this Panel
LabelRefPtr LeftPanelButtonPanelLabel = OSG::Label::create();
LeftPanelButtonPanelLabel->setTextColor(Color4f(1.0,1.0,1.0,1.0));
LeftPanelButtonPanelLabel->setRolloverTextColor(Color4f(1.0,1.0,1.0,1.0));
LeftPanelButtonPanelLabel->setBackground(createComplexBackground());
LeftPanelButtonPanelLabel->setPreferredSize(Vec2f(100, 50));
LeftPanelButtonPanelLabel->setText("Various Options");
LeftPanelButtonPanelLabel->setAlignment(Vec2f(0.5,0.5));
// Create and edit the Panel buttons
ButtonRefPtr LeftPanelButton1 = OSG::Button::create();
ButtonRefPtr LeftPanelButton2 = OSG::Button::create();
ButtonRefPtr LeftPanelButton3 = OSG::Button::create();
ButtonRefPtr LeftPanelButton4 = OSG::Button::create();
ButtonRefPtr LeftPanelButton5 = OSG::Button::create();
ButtonRefPtr LeftPanelButton6 = OSG::Button::create();
LeftPanelButton1->setText("This");
LeftPanelButton1->setPreferredSize(Vec2f(100,50));
LeftPanelButton2->setText("is");
LeftPanelButton2->setPreferredSize(Vec2f(100,50));
LeftPanelButton3->setText("an");
LeftPanelButton3->setPreferredSize(Vec2f(100,50));
LeftPanelButton4->setText("example");
LeftPanelButton4->setPreferredSize(Vec2f(100,50));
LeftPanelButton5->setText("user");
LeftPanelButton5->setPreferredSize(Vec2f(100,50));
LeftPanelButton6->setText("interface.");
LeftPanelButton6->setPreferredSize(Vec2f(100,50));
// Create and edit Panel layout
BoxLayoutRefPtr LeftPanelButtonPanelLayout = OSG::BoxLayout::create();
LeftPanelButtonPanelLayout->setOrientation(BoxLayout::VERTICAL_ORIENTATION);
// Create an edit Panel Background
ColorLayerRefPtr LeftPanelButtonPanelBackground = OSG::ColorLayer::create();
LeftPanelButtonPanelBackground->setColor(Color4f(0.93,0.93,0.93,1.0));
// Create Panel Border
LineBorderRefPtr LeftPanelBorder = OSG::LineBorder::create();
LeftPanelBorder->setColor(Color4f(0.0,0.0,0.0,1.0));
LeftPanelBorder->setWidth(1);
// Create and edit Panel
PanelRefPtr LeftPanelButtonPanel = OSG::Panel::create();
LeftPanelButtonPanel->setPreferredSize(Vec2f(180, 500));
LeftPanelButtonPanel->pushToChildren(LeftPanelButtonPanelLabel);
LeftPanelButtonPanel->pushToChildren(LeftPanelButton1);
LeftPanelButtonPanel->pushToChildren(LeftPanelButton2);
LeftPanelButtonPanel->pushToChildren(LeftPanelButton3);
LeftPanelButtonPanel->pushToChildren(LeftPanelButton4);
LeftPanelButtonPanel->pushToChildren(LeftPanelButton5);
LeftPanelButtonPanel->pushToChildren(LeftPanelButton6);
LeftPanelButtonPanel->setLayout(LeftPanelButtonPanelLayout);
LeftPanelButtonPanel->setBackgrounds(LeftPanelButtonPanelBackground);
LeftPanelButtonPanel->setBorders(LeftPanelBorder);
return LeftPanelButtonPanel;
}