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


C++ FrameWindow::getWidth方法代码示例

本文整理汇总了C++中cegui::FrameWindow::getWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameWindow::getWidth方法的具体用法?C++ FrameWindow::getWidth怎么用?C++ FrameWindow::getWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cegui::FrameWindow的用法示例。


在下文中一共展示了FrameWindow::getWidth方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

/***********************************************************
destructor
***********************************************************/
LetterViewerBox::~LetterViewerBox()
{
	{
		CEGUI::FrameWindow * frw = static_cast<CEGUI::FrameWindow *> (
			CEGUI::WindowManager::getSingleton().getWindow("LetterViewerWIndowFrame"));

		CEGUI::UVector2 vec = frw->getPosition();
		ConfigurationManager::GetInstance()->SetFloat("Gui.LetterViewerFrame.PosX", vec.d_x.d_scale);
		ConfigurationManager::GetInstance()->SetFloat("Gui.LetterViewerFrame.PosY", vec.d_y.d_scale);
		ConfigurationManager::GetInstance()->SetFloat("Gui.LetterViewerFrame.SizeX", frw->getWidth().d_scale);
		ConfigurationManager::GetInstance()->SetFloat("Gui.LetterViewerFrame.SizeY", frw->getHeight().d_scale);
		ConfigurationManager::GetInstance()->SetFloat("Gui.LetterViewerFrame.OffsetPosX", vec.d_x.d_offset);
		ConfigurationManager::GetInstance()->SetFloat("Gui.LetterViewerFrame.OffsetPosY", vec.d_y.d_offset);
		ConfigurationManager::GetInstance()->SetFloat("Gui.LetterViewerFrame.OffsetSizeX", frw->getWidth().d_offset);
		ConfigurationManager::GetInstance()->SetFloat("Gui.LetterViewerFrame.OffsetSizeY", frw->getHeight().d_offset);
	}
}
开发者ID:leloulight,项目名称:lbanet,代码行数:20,代码来源:LetterViewerBox.cpp

示例2: SaveGUISizes

/***********************************************************
save size of windows to be restored after resize of the application
***********************************************************/
void JournalBox::SaveGUISizes(int oldscreenX, int oldscreenY)
{
	CEGUI::FrameWindow * frw = static_cast<CEGUI::FrameWindow *> (
		CEGUI::WindowManager::getSingleton().getWindow("JournalFrame"));

	CEGUI::UVector2 vec = frw->getPosition();
	_savedPosX = vec.d_x.asRelative((float)oldscreenX);
	_savedPosY = vec.d_y.asRelative((float)oldscreenY);
	_savedSizeX = frw->getWidth().asRelative((float)oldscreenX);
	_savedSizeY = frw->getHeight().asRelative((float)oldscreenY);
}
开发者ID:Rincevent,项目名称:lbanet,代码行数:14,代码来源:JournalBox.cpp

示例3:

/***********************************************************
destructor
***********************************************************/
CommunityBox::~CommunityBox()
{
	try
	{
		CEGUI::FrameWindow * frw = static_cast<CEGUI::FrameWindow *> (
			CEGUI::WindowManager::getSingleton().getWindow("CommunityFrame"));

		CEGUI::UVector2 vec = frw->getPosition();
		ConfigurationManager::GetInstance()->SetFloat("Gui.Communitybox.PosX", vec.d_x.d_scale);
		ConfigurationManager::GetInstance()->SetFloat("Gui.Communitybox.PosY", vec.d_y.d_scale);
		ConfigurationManager::GetInstance()->SetFloat("Gui.Communitybox.SizeX", frw->getWidth().d_scale);
		ConfigurationManager::GetInstance()->SetFloat("Gui.Communitybox.SizeY", frw->getHeight().d_scale);
		ConfigurationManager::GetInstance()->SetFloat("Gui.Communitybox.OffsetPosX", vec.d_x.d_offset);
		ConfigurationManager::GetInstance()->SetFloat("Gui.Communitybox.OffsetPosY", vec.d_y.d_offset);
		ConfigurationManager::GetInstance()->SetFloat("Gui.Communitybox.OffsetSizeX", frw->getWidth().d_offset);
		ConfigurationManager::GetInstance()->SetFloat("Gui.Communitybox.OffsetSizeY", frw->getHeight().d_offset);
		ConfigurationManager::GetInstance()->SetBool("Gui.Communitybox.Visible", frw->isVisible());
	}
	catch(CEGUI::Exception &ex)
	{
		LogHandler::getInstance()->LogToFile(std::string("Exception destructor community box: ") + ex.getMessage().c_str());
	}
}
开发者ID:leloulight,项目名称:lbanet,代码行数:26,代码来源:CommunityBox.cpp

示例4:

/***********************************************************
destructor
***********************************************************/
JournalBox::~JournalBox()
{
	try
	{
		CEGUI::FrameWindow * frw = static_cast<CEGUI::FrameWindow *> (
			CEGUI::WindowManager::getSingleton().getWindow("JournalFrame"));

		int resX, resY; 
		bool fullscreen;
		OsgHandler::getInstance()->GetScreenAttributes(resX, resY, fullscreen);

		CEGUI::UVector2 vec = frw->getPosition();
		ConfigurationManager::GetInstance()->SetValue("Gui.JournalBox.PosX", vec.d_x.asRelative((float)resX));
		ConfigurationManager::GetInstance()->SetValue("Gui.JournalBox.PosY", vec.d_y.asRelative((float)resY));
		ConfigurationManager::GetInstance()->SetValue("Gui.JournalBox.SizeX", frw->getWidth().asRelative((float)resX));
		ConfigurationManager::GetInstance()->SetValue("Gui.JournalBox.SizeY", frw->getHeight().asRelative((float)resY));
		ConfigurationManager::GetInstance()->SetValue("Gui.JournalBox.Visible", frw->isVisible());

		{
			std::string qtreedown;
			std::string selected;
			std::map<std::string, CEGUI::TreeItem *>::iterator itm =	_mapquestarea.begin();
			std::map<std::string, CEGUI::TreeItem *>::iterator endm =	_mapquestarea.end();
			for(; itm != endm; ++itm)
			{
				if(itm->second->getIsOpen())
				{
					qtreedown += "##" + itm->first;
				}

				std::vector<CEGUI::TreeItem*> items = itm->second->getItemList();
				for(size_t i=0; i<items.size(); ++i)
				{
					if(items[i]->isSelected())
						selected = items[i]->getText().c_str();
				}
			}

			ConfigurationManager::GetInstance()->SetValue("Gui.JournalBox.QuestTreeOpen", qtreedown);
			ConfigurationManager::GetInstance()->SetValue("Gui.JournalBox.QuestTreeSelected", selected);
		}

		{
			std::string qtreedown;
			std::string selected;
			std::map<std::string, CEGUI::TreeItem *>::iterator itm =	_mapquestdonearea.begin();
			std::map<std::string, CEGUI::TreeItem *>::iterator endm =	_mapquestdonearea.end();
			for(; itm != endm; ++itm)
			{
				if(itm->second->getIsOpen())
				{
					qtreedown += "##" + itm->first;
				}

				std::vector<CEGUI::TreeItem*> items = itm->second->getItemList();
				for(size_t i=0; i<items.size(); ++i)
				{
					if(items[i]->isSelected())
						selected = items[i]->getText().c_str();
				}
			}

			ConfigurationManager::GetInstance()->SetValue("Gui.JournalBox.QuestDoneTreeOpen", qtreedown);
			ConfigurationManager::GetInstance()->SetValue("Gui.JournalBox.QuestDoneTreeSelected", selected);
		}


	}
	catch(CEGUI::Exception &ex)
	{
		LogHandler::getInstance()->LogToFile(std::string("Exception destructor Inventorybox: ") + ex.getMessage().c_str());
	}
}
开发者ID:Rincevent,项目名称:lbanet,代码行数:76,代码来源:JournalBox.cpp


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