void _setOverlay(void) { mOverlayMgr = OverlayManager::getSingletonPtr(); mTextOverlay = mOverlayMgr->create("TextOverlay"); mPanel = static_cast<Ogre::OverlayContainer*>(mOverlayMgr->createOverlayElement("Panel", "container1")); mPanel->setDimensions(1, 1); mPanel->setPosition(-0.3f, 0.5f); OverlayElement* textBox = mOverlayMgr->createOverlayElement("TextArea", "TextID"); textBox->setMetricsMode(Ogre::GMM_PIXELS); textBox->setPosition(10, 10); textBox->setWidth(100); textBox->setHeight(20); textBox->setParameter("font_name", "Font/NanumBold18"); textBox->setParameter("char_height", "40"); textBox->setColour(Ogre::ColourValue::White); textBox->setCaption(L"한국산업기술대학교 이대현 선수"); mPanel->addChild(textBox); mTextOverlay->add2D(mPanel); mTextOverlay->show(); mLogoOverlay = OverlayManager::getSingleton().getByName("Overlay/KPU_LOGO"); mLogoOverlay->show(); mLogoOverlay = OverlayManager::getSingleton().getByName("Overlay/Information"); mLogoOverlay->show(); }
void LogoState::createOverlays() { OverlayManager& omgr = OverlayManager::getSingleton(); mCurrentOverlay = -1; mOverlayGuys = (Overlay*)omgr.getByName("Marbles/Guys"); OverlayElement* Guys = omgr.getOverlayElement("Marbles/GuysPanel"); Guys->setPosition(mViewport->getActualWidth()/2 - 430, mViewport->getActualHeight()/2 - 320); mOverlay4Guys = (Overlay*)omgr.getByName("Marbles/4Guys"); OverlayElement* FourGuys = omgr.getOverlayElement("Marbles/4GuysPanel"); FourGuys->setPosition(mViewport->getActualWidth()/2 - 430, mViewport->getActualHeight()/2 + 145); mOverlay4G = (Overlay*)omgr.getByName("Marbles/4G"); OverlayElement* FourG = omgr.getOverlayElement("Marbles/4GPanel"); FourG->setPosition(mViewport->getActualWidth()/2 - 430, mViewport->getActualHeight()/2 + 145); mOverlayGirl = (Overlay*)omgr.getByName("Marbles/Girl"); OverlayElement* Girl = omgr.getOverlayElement("Marbles/GirlPanel"); Girl->setPosition(mViewport->getActualWidth()/2 - 190, mViewport->getActualHeight()/2 - 320); mOverlay1Girl = (Overlay*)omgr.getByName("Marbles/1Girl"); OverlayElement* OneGirl = omgr.getOverlayElement("Marbles/1GirlPanel"); OneGirl->setPosition(mViewport->getActualWidth()/2 - 190, mViewport->getActualHeight()/2 + 145); mOverlay1G = (Overlay*)omgr.getByName("Marbles/1G"); OverlayElement* OneG = omgr.getOverlayElement("Marbles/1GPanel"); OneG->setPosition(mViewport->getActualWidth()/2 - 190, mViewport->getActualHeight()/2 + 145); mOverlayGame = (Overlay*)omgr.getByName("Marbles/Game"); OverlayElement* Game = omgr.getOverlayElement("Marbles/GamePanel"); Game->setPosition(mViewport->getActualWidth()/2 - 450, mViewport->getActualHeight()/2 - 320); mOverlay1Game = (Overlay*)omgr.getByName("Marbles/1Game"); OverlayElement* OneGame = omgr.getOverlayElement("Marbles/1GamePanel"); OneGame->setPosition(mViewport->getActualWidth()/2 + 20, mViewport->getActualHeight()/2 + 145); mOverlay1Gsq = (Overlay*)omgr.getByName("Marbles/1Gsq"); OverlayElement* OneGsq = omgr.getOverlayElement("Marbles/1GsqPanel"); OneGsq->setPosition(mViewport->getActualWidth()/2 - 236, mViewport->getActualHeight()/2 + 145); mOverlaypresents = (Overlay*)omgr.getByName("Marbles/presents"); OverlayElement* presents = omgr.getOverlayElement("Marbles/presentsPanel"); presents->setPosition(mViewport->getActualWidth()/2 + 120, mViewport->getActualHeight()/2 + 190); mOverlayplugins = (Overlay*)omgr.getByName("Marbles/plugins"); OverlayElement* plugins = omgr.getOverlayElement("Marbles/pluginsPanel"); plugins->setPosition(mViewport->getActualWidth()/2 - 512, mViewport->getActualHeight()/2 - 393); mOverlayskip = (Overlay*)omgr.getByName("Marbles/skip"); OverlayElement* skip = omgr.getOverlayElement("Marbles/skipPanel"); skip->setPosition(mViewport->getActualWidth()/2 - 186, mViewport->getActualHeight() -75); }