本文整理汇总了C++中IrrlichtDevice::getEventReceiver方法的典型用法代码示例。如果您正苦于以下问题:C++ IrrlichtDevice::getEventReceiver方法的具体用法?C++ IrrlichtDevice::getEventReceiver怎么用?C++ IrrlichtDevice::getEventReceiver使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IrrlichtDevice
的用法示例。
在下文中一共展示了IrrlichtDevice::getEventReceiver方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Show
void Menu::Show()
{
using namespace gui;
using namespace scene;
// draw overlay menu
IrrlichtDevice* device = Device::Instance().IrrlichtDevice();
gui::IGUIEnvironment* guiEnvironment = device->getGUIEnvironment();
// change event receiver
irr::IEventReceiver* eventReceiverBackup = device->getEventReceiver();
device->setEventReceiver(this);
guiEnvironment->addButton(core::recti(10,10,100,30), 0, GUI_ID_CONTINUE, L"Continue");
guiEnvironment->addButton(core::recti(10,40,100,60), 0, GUI_ID_EXIT, L"Exit");
video::IVideoDriver* driver = Device::Instance().Driver();
ISceneManager* sceneManager = Device::Instance().SceneManager();
isShowing_ = true;
do
{
driver->beginScene(true, true, video::SColor(255,0,0,0));
sceneManager->drawAll();
guiEnvironment->drawAll();
driver->endScene();
}while(device->run() && isShowing_);
// return event receiver
device->setEventReceiver(eventReceiverBackup);
}