本文整理汇总了C++中ToggleButton::setSelected方法的典型用法代码示例。如果您正苦于以下问题:C++ ToggleButton::setSelected方法的具体用法?C++ ToggleButton::setSelected怎么用?C++ ToggleButton::setSelected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ToggleButton
的用法示例。
在下文中一共展示了ToggleButton::setSelected方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: set_light
void vis_settings_panel_impl::set_light(bool on)
{
CEGUI::GUIContext& context = CEGUI::System::getSingleton().getDefaultGUIContext();
CEGUI::Window* root = context.getRootWindow();
if (root->isChild(setting_dlg + "/Settings/chkLights"))
{
ToggleButton* button = static_cast<ToggleButton*>(root->getChild(setting_dlg + "/Settings/chkLights"));
return button->setSelected(on);
}
}
示例2: onCapture
void onCapture()
{
if (m_start.isSelected()) {
m_start.setText(L"Start");
m_start.setSelected(false);
}
else {
m_webcam.setDriver(m_driver.getSelectedItem());
}
m_webcam.capture();
}
示例3: createCheckboxShowRealFPS
/*************************************************************************
Creates a checkbox to let the user choose to display randomised or real FPS value
*************************************************************************/
void CustomShapesDrawingSample::createCheckboxShowRealFPS()
{
WindowManager& winMgr = WindowManager::getSingleton();
// We create a button and subscribe to its click events
ToggleButton* checkboxShowRealFPS = static_cast<CEGUI::ToggleButton*>(winMgr.createWindow("WindowsLook/Checkbox"));
checkboxShowRealFPS->setSize(CEGUI::USize(cegui_reldim(0.25f), cegui_reldim(0.035f)));
checkboxShowRealFPS->setHorizontalAlignment(HA_CENTRE);
checkboxShowRealFPS->setPosition(CEGUI::UVector2(cegui_reldim(0.0f), cegui_reldim(0.13f)));
checkboxShowRealFPS->setText("Show randomly generated FPS values");
checkboxShowRealFPS->subscribeEvent(ToggleButton::EventSelectStateChanged, Event::Subscriber(&CustomShapesDrawingSample::handleToggleButtonShowRandomisedFpsSelectionChanged, this));
checkboxShowRealFPS->setSelected(true);
d_root->addChild(checkboxShowRealFPS);
}