예제 #1
0
void GUIManager::windowResized(Ogre::RenderWindow* _rw)
{
	int width = (int)_rw->getWidth();
	int height = (int)_rw->getHeight();
	setInputViewSize(width, height);

	BeamFactory *bf = BeamFactory::getSingletonPtr();
	if(bf) bf->windowResized();

	Console *c = Console::getInstancePtrNoCreation();
	if(c) c->resized();
}
예제 #2
0
void GUIManager::windowResized(Ogre::RenderWindow* rw)
{
	int width = (int)rw->getWidth();
	int height = (int)rw->getHeight();
	setInputViewSize(width, height);

	BeamFactory *bf = BeamFactory::getSingletonPtr();
	if (bf) bf->windowResized();

	if (m_gui_GameMainMenu.get() != nullptr)
	{
		/* Adjust menu position */
		Ogre::Viewport* viewport = RoR::Application::GetOgreSubsystem()->GetRenderWindow()->getViewport(0);
		int margin = (viewport->getActualHeight() / 15);
		m_gui_GameMainMenu->SetPosition(
			margin, // left
			viewport->getActualHeight() - m_gui_GameMainMenu->GetHeight() - margin // top
			);
	}
}