本文整理汇总了C++中mygui::Button::getStateSelected方法的典型用法代码示例。如果您正苦于以下问题:C++ Button::getStateSelected方法的具体用法?C++ Button::getStateSelected怎么用?C++ Button::getStateSelected使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mygui::Button
的用法示例。
在下文中一共展示了Button::getStateSelected方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _simpleDataCheckChange
/*BOOL型数据改变 Check
*/
static void _simpleDataCheckChange(MyGUI::Widget* _sender){
MyGUI::Button* sender = _sender->castType<MyGUI::Button>(false);
if( sender ){
SimpleData* psd = sender->getUserData<SimpleData>(false);
sender->setStateSelected(!sender->getStateSelected());
if( psd ){
if( psd->type==SimpleData::BOOL ){
psd->b = sender->getStateSelected();
}
if( psd->change )
psd->change->invoke(psd);
}
}
}
示例2:
void RigEditorCommands2Panel::CallbackClick_NeedsEngineChekckbox(MyGUI::Widget* sender)
{
// Clear "mixed values" state
m_needs_engine_checkbox->setTextColour(m_text_color_default);
m_data.SetNeedsEngineIsUniform(true);
// Update data
MyGUI::Button* button = sender->castType<MyGUI::Button>();
m_data.SetBoolNeedsEngine(button->getStateSelected());
}
示例3: notifyMouseButtonClick
void KeyboardPanel::notifyMouseButtonClick(MyGUI::Widget* _sender)
{
MyGUI::Button* button = _sender->castType<MyGUI::Button>();
bool selected = button->getStateSelected();
if (selected)
{
button->setStateSelected(false);
CommandManager::getInstance().execiteCommand("KeyboardClick", std::string(mMainWidget->getUserString("Command")));
}
else
{
mButtonEngine->setStateSelected(false);
mButtonGun->setStateSelected(false);
mButtonAmmo->setStateSelected(false);
mButtonArmor->setStateSelected(false);
button->setStateSelected(true);
CommandManager::getInstance().execiteCommand("KeyboardClick", std::string(button->getUserString("Command")));
}
}
示例4: onMyGUIMouseButtonClickForCheckboxToggle
void PropertyGridManager::onMyGUIMouseButtonClickForCheckboxToggle(MyGUI::Widget *button)
{
MyGUI::Button *checkbox = button->castType<MyGUI::Button>();
PropertyGridProperty *const property = *(button->getUserData<PropertyGridProperty *>());
if(nullptr == property)
{
Debug::error(STEEL_METH_INTRO, "no property linked to control ", button->getParent()).endl().breakHere();
return;
}
bool const currentState = checkbox->getStateSelected();
if(PropertyGridPropertyValueType::Bool == property->valueType())
property->write(!currentState);
else
Debug::error(STEEL_METH_INTRO, "got a checkbox event for property ", *property, ". Skipping event.").endl();
}
示例5: notifyMouseButtonClick
void CameraPanel::notifyMouseButtonClick(MyGUI::Widget* _sender)
{
MyGUI::Button* button = _sender->castType<MyGUI::Button>();
bool pressed = button->getStateSelected();
if(!pressed)
{
mBtnFixed->setStateSelected(false);
mBtnManipulable->setStateSelected(false);
mBtnTracking->setStateSelected(false);
button->setStateSelected(!pressed);
std::string btName = button->getName();
if(btName == "RBCamFixed")
mCamMode = 0;
else if(btName == "RBCamFixed")
mCamMode = 1;
else
mCamMode = 2;
}
}
示例6: notifyMouseButtonClick
void SettingsGeneralControl::notifyMouseButtonClick(MyGUI::Widget* _sender)
{
MyGUI::Button* button = _sender->castType<MyGUI::Button>(false);
if (button != nullptr)
button->setStateSelected(!button->getStateSelected());
}