Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by pidhash ( 8 years ago )
bool quitGame(const CEGUI::EventArgs &) {
std::cout << "Cliquei em Quit\n";
return true;
}
auto main() -> int
{
GameManager &gm = GameManager::getInstance();
gm.init("plugins.cfg", "ogre.cfg");
Root *root = gm.getRootSceneNode();
gm.initSceneManager();
RenderWindow *window = gm.getRenderWindow();
SceneManager *sceneMgr = gm.getSceneManager();
Camera *camera = sceneMgr->getCamera("MainCam");
CEGUI::OgreRenderer &ceguiRender = CEGUI::OgreRenderer::bootstrapSystem();
CEGUI::DefaultResourceProvider* rp = static_cast<CEGUI>(
CEGUI::System::getSingleton().getResourceProvider());
setResources();
CEGUI::SchemeManager::getSingleton().createFromFile("TaharezLook.scheme");
CEGUI::WindowManager &wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window* myRoot = wmgr.createWindow("DefaultWindow", "root");
CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow(myRoot);
myRoot->setMousePassThroughEnabled(true);
CEGUI::PushButton* fWnd = static_cast<CEGUI>(wmgr.createWindow("TaharezLook/Button", "testWindow"));
fWnd->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(quitGame));
fWnd->setText("ClickMe");
myRoot->addChild(fWnd);
fWnd->setAlwaysOnTop(true);
fWnd->setMousePassThroughEnabled(false);
Revise this Paste