本文整理汇总了C++中cegui::Window::setInheritsAlpha方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::setInheritsAlpha方法的具体用法?C++ Window::setInheritsAlpha怎么用?C++ Window::setInheritsAlpha使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::Window
的用法示例。
在下文中一共展示了Window::setInheritsAlpha方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createChild
CGUIStatistics::CGUIStatistics(Window *pRoot)
: m_iSelectedSlot(0) {
CInputListenerManager::getSingleton().addInputListener(this);
// create cegui windows/buttons
Window *pStatisticsRoot = pRoot->createChild("DefaultWindow", "GUIStatisticsRoot");
pStatisticsRoot->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0), CEGUI::UDim(0, 0)));
pStatisticsRoot->setSize(CEGUI::USize(CEGUI::UDim(1, 0), CEGUI::UDim(1, 0)));
pStatisticsRoot->setInheritsAlpha(false);
pStatisticsRoot->setAlpha(1);
pStatisticsRoot->setRiseOnClickEnabled(false);
pStatisticsRoot->moveToBack();
m_pStatisticsRoot = pStatisticsRoot;
CEGUI::Window *pBackground = pStatisticsRoot->
createChild("OgreTray/StaticImage", "Background");
pBackground->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0), CEGUI::UDim(0, 0)));
pBackground->setSize(CEGUI::USize(CEGUI::UDim(1, 0), CEGUI::UDim(1, 0)));
pBackground->setInheritsAlpha(false);
pBackground->setAlpha(1);
pBackground->setProperty("Image", "main_menu_background/full");
pBackground->setProperty("FrameEnabled", "False");
pBackground->setProperty("BackgroundEnabled", "True");
pBackground->setRiseOnClickEnabled(false);
CEGUI::Window *pButtonContainer = pStatisticsRoot->createChild("DefaultWindow", "ButtonContainer");
pButtonContainer->setPosition(UVector2(UDim(0, 0), UDim(0, 0)));
pButtonContainer->setSize(USize(UDim(1, 0), UDim(1, 0)));
CEGUI::Window *pFinishedText = pButtonContainer->createChild("OgreTray/Titlebar", "text");
pFinishedText->setFont("dejavusans20");
pFinishedText->setText("unset");
pFinishedText->setPosition(UVector2(UDim(0.05,0), UDim(0.05,0)));
pFinishedText->setSize(USize(UDim(0.9, 0), UDim(0.1, 0)));
CEGUI::Window *pStatisticsGroup = pButtonContainer->createChild("OgreTray/Group", "statisticsgroup");
pStatisticsGroup->setFont("dejavusans16");
pStatisticsGroup->setText(XMLResources::GLOBAL.getCEGUIString("Statistics"));
pStatisticsGroup->setPosition(UVector2(UDim(0.1, 0), UDim(0.2, 0)));
pStatisticsGroup->setSize(USize(UDim(0.8, 0), UDim(0.5, 0)));
CEGUI::Window *pRetryButton = pButtonContainer->createChild("OgreTray/Button", "Retry");
pRetryButton->setPosition(UVector2(UDim(0.1, 0), UDim(0.8, 0)));
pRetryButton->setSize(USize(UDim(0.3, 0), UDim(0.15, 0)));
pRetryButton->setFont("dejavusans16");
pRetryButton->setText(XMLResources::GLOBAL.getCEGUIString("Retry"));
m_pButtons[BT_RETRY] = pRetryButton;
pRetryButton->subscribeEvent(
CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&CGUIStatistics::onRetryClicked, this));
CEGUI::Window *pToMenuButton = pButtonContainer->createChild("OgreTray/Button", "ToMenu");
pToMenuButton->setPosition(UVector2(UDim(0.6, 0), UDim(0.8, 0)));
pToMenuButton->setSize(USize(UDim(0.3, 0), UDim(0.15, 0)));
pToMenuButton->setFont("dejavusans16");
pToMenuButton->setText(XMLResources::GLOBAL.getCEGUIString("To level selection"));
pToMenuButton->subscribeEvent(
CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&CGUIStatistics::onToMenuClicked, this));
m_pButtons[BT_TO_MENU] = pToMenuButton;
for (int i = 0; i < L_COUNT; i++) {
createLabel(i, pStatisticsGroup, false);
createLabel(i, pStatisticsGroup, true);
}
hide();
}