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


C++ Window::show方法代码示例

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


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

示例1: handleDSActivation

bool GUIManager::handleDSActivation ( CEGUI::EventArgs const & e )
{
  CEGUI::Window *tab =
    static_cast<CEGUI::WindowEventArgs const &>(e).window->getParent();
  CEGUI::Listbox *lb = static_cast<CEGUI::Listbox *>(tab->getChild(0));
  ListboxItem *item = static_cast<ListboxItem *>(lb->getFirstSelectedItem());
  if (item != NULL) {
    DataManager *dm = static_cast<DataManager *>(item->getUserData());
    CEGUI::Scrollbar *sb = static_cast<CEGUI::Scrollbar *>(tab->getChild(2));
    std::vector<unsigned int> const & dims = dm->getDimensions();
    unsigned int dim = dims[int(sb->getScrollPosition()*(dims.size()-1))];
    float scrollPos = sb->getScrollPosition();
    dm->activate(dim);
    // Enable global scrollbar
    CEGUI::WindowManager & wm = CEGUI::WindowManager::getSingleton();
    sb = static_cast<CEGUI::Scrollbar *>(wm.getWindow("Sheet/DimensionSlider"));
    sb->enable();
    CEGUI::WindowEventArgs w(sb);
    sb->fireEvent(CEGUI::Scrollbar::EventScrollPositionChanged, w);
    // Set the global scrollbar to the right position.
    sb->setScrollPosition(scrollPos);
    CEGUI::Window *desc = wm.getWindow("Sheet/DimensionText");
    desc->show();
  }
  // TODO handle else-error
  return true;
}
开发者ID:Nvveen,项目名称:Revolution,代码行数:27,代码来源:GUIManager.cpp

示例2: handleOptionsVisibility

bool GUIManager::handleOptionsVisibility ( CEGUI::EventArgs const & )
{
  CEGUI::Window *dsFrame = CEGUI::WindowManager::getSingleton().getWindow(
      "Sheet/DatasetFrame");
  std::string prop = dsFrame->getProperty("Visible").c_str();
  if (prop == "False")
    dsFrame->show();
  else
    dsFrame->hide();
  return true;
}
开发者ID:Nvveen,项目名称:Revolution,代码行数:11,代码来源:GUIManager.cpp

示例3: Refresh

/***********************************************************
refreshthe gui
***********************************************************/
void GameGUI::Refresh()
{
	_cb.Show();_cb.Show();
	_comb.Show();_comb.Show();
	_telb.Show();_telb.Show();
	_invb.Show();_invb.Show();
	_shortb.Show();_shortb.Show();

	_containerb.Refresh();
	_invb.Refresh();
	_shortb.Refresh();

	CEGUI::Window * win = CEGUI::WindowManager::getSingleton().getWindow("PlayerName");
	win->hide();
	win->show();
}
开发者ID:leloulight,项目名称:lbanet,代码行数:19,代码来源:GameGUI.cpp

示例4: loadWindow

//-----------------------------------------------------------------------------  
bool MyGUIManager::loadWindow(const std::string& layoutName)  
{  
    CEGUI::Window *guiSheet;  
    // 检测给定layout的文件是否加载,没有加载则加载  
    if(!getGUIWindowManager()->isWindowPresent(layoutName))  
    {  
        // 从 .layout脚本文件读取一个UI布局设计,并将其放置到GUI资源组中。  
        guiSheet = getGUIWindowManager()->loadWindowLayout(layoutName + ".layout");  
    }  
    else  
    {     
        // 如果已经加载则直接显示  
        guiSheet = getGUIWindowManager()->getWindow(layoutName);  
    }  
    // 接下来我们告诉CEGUI显示哪份UI布局。当然我们可以随时更换显示的UI布局。  
    mGUISystem->setGUISheet(guiSheet);  
    //显示UI布局  
    guiSheet->show();  
    return true;  
}  
开发者ID:coneo,项目名称:TankWar,代码行数:21,代码来源:MyGUIManager.cpp

示例5: CreateText

CEGUI::Window* TestAARHUD::CreateText(const std::string& name, CEGUI::Window* parent, const std::string& text,
                                 float x, float y, float width, float height)
{
   CEGUI::WindowManager* wm = CEGUI::WindowManager::getSingletonPtr();

   // create base window and set our default attribs
   CEGUI::Window* result = wm->createWindow("WindowsLook/StaticText", name);
   parent->addChildWindow(result);
   result->setText(text);
   result->setPosition(CEGUI::UVector2(cegui_absdim(x), cegui_absdim(y)));
   result->setSize(CEGUI::UVector2(cegui_absdim(width), cegui_absdim(height)));
   result->setProperty("FrameEnabled", "false");
   result->setProperty("BackgroundEnabled", "false");
   result->setHorizontalAlignment(CEGUI::HA_LEFT);
   result->setVerticalAlignment(CEGUI::VA_TOP);
   // set default color to white
   result->setProperty("TextColours", 
      CEGUI::PropertyHelper::colourToString(CEGUI::colour(1.0f, 1.0f, 1.0f)));
   result->show();

   return result;
}
开发者ID:VRAC-WATCH,项目名称:deltajug,代码行数:22,代码来源:testaarhud.cpp

示例6: keyPressed

bool GameInputHandler::keyPressed(const OIS::KeyEvent &evt)
{
	CEGUIInputHandler::keyPressed(evt);
	
	handleCommonKeyboardEvents(evt);
	
	if (game.getSubState() != SUBST_EDITOR)
		return true;
	
	OIS::KeyCode ch = evt.key;

	if (ch == OIS::KC_P)
	{
		// Switch to player mode
		game.createPlayer(camera->getDerivedPosition());
	}
	else if (ch == OIS::KC_I)
	{
		// Blend interface in/out
		CEGUI::Window* guiPage = windowManager.getPage("Editor");
		if (guiPage->isVisible())
			guiPage->hide();
		else
			guiPage->show();
	}
	else if (ch == OIS::KC_M)
	{
		// Output camera position and orientation to log
		/*string str = "INFO:   position=\"" + StringConverter::toString(game.cameraNode->getPosition()) + "\"" +
					" yawOrientation=\"" + StringConverter::toString(game.cameraYawNode->getOrientation()) + "\"" +
					" pitchOrientation=\"" + StringConverter::toString(game.cameraPitchNode->getOrientation()) + "\"";
		*/
		string str = "INFO:   position=\"" + StringConverter::toString(game.cameraNode->getPosition()) + "\"" +
		" yaw=\"" + StringConverter::toString(game.cameraYawNode->getOrientation().getYaw(false)) + "\"" +
		" pitch=\"" + StringConverter::toString(game.cameraPitchNode->getOrientation().getPitch(false)) + "\"" +
		" roll=\"" + StringConverter::toString(game.cameraRollNode->getOrientation().getRoll(false)) + "\"";
		
		LogManager::getSingleton().logMessage(str.c_str(), LML_CRITICAL);
	}
	else if (ch == OIS::KC_E)
	{
		// Place objects
		game.spawnObject(CEGUI::EventArgs());
	}
	else if (evt.key == OIS::KC_O)
	{
		// Toggle polygon mode
		camera->setPolygonMode((PolygonMode)((camera->getPolygonMode() % 3) + 1));
		if (camera->getPolygonMode() == PM_SOLID)
			vp->setClearEveryFrame(true, FBT_DEPTH);
		else
			vp->setClearEveryFrame(true, FBT_COLOUR | FBT_DEPTH);
	}
	
	if (objectManager.getEditObjects())
	{
		if (ch == OIS::KC_G)
			objectManager.setEditMode(EDITMODE_GRAB);
		else if (ch == OIS::KC_R)
			objectManager.setEditMode(EDITMODE_ROTATE);
		else if (ch == OIS::KC_T)
			objectManager.setEditMode(EDITMODE_SCALE);
		else if (ch == OIS::KC_X)
			objectManager.setEditDirection(Vector3(1, 0, 0));
		else if (ch == OIS::KC_Y)
			objectManager.setEditDirection(Vector3(0, 1, 0));
		else if (ch == OIS::KC_Z)
			objectManager.setEditDirection(Vector3(0, 0, 1));
	}

	return true;
}
开发者ID:Kanbyen,项目名称:ForeverEngine,代码行数:72,代码来源:stateGameInputHandler.cpp


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