当前位置: 首页>>代码示例>>C++>>正文


C++ Button::getStateSelected方法代码示例

本文整理汇总了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);
		}
	}
}
开发者ID:JohnCrash,项目名称:iRobot,代码行数:16,代码来源:SimpleUI.cpp

示例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());
}
开发者ID:uvbs,项目名称:rigs-of-rods,代码行数:10,代码来源:GUI_RigEditorCommands2Panel.cpp

示例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")));
		}
	}
开发者ID:Anomalous-Software,项目名称:mygui,代码行数:19,代码来源:KeyboardPanel.cpp

示例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();
    }
开发者ID:onze,项目名称:Steel,代码行数:19,代码来源:PropertyGridManager.cpp

示例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;
	}
}
开发者ID:dtbinh,项目名称:AncelApp,代码行数:21,代码来源:CameraPanel.cpp

示例6: notifyMouseButtonClick

	void SettingsGeneralControl::notifyMouseButtonClick(MyGUI::Widget* _sender)
	{
		MyGUI::Button* button = _sender->castType<MyGUI::Button>(false);
		if (button != nullptr)
			button->setStateSelected(!button->getStateSelected());
	}
开发者ID:2asoft,项目名称:MMO-Framework,代码行数:6,代码来源:SettingsGeneralControl.cpp


注:本文中的mygui::Button::getStateSelected方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。