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


C++ CInterfaceManager类代码示例

本文整理汇总了C++中CInterfaceManager的典型用法代码示例。如果您正苦于以下问题:C++ CInterfaceManager类的具体用法?C++ CInterfaceManager怎么用?C++ CInterfaceManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: execute

	virtual void execute (CCtrlBase * /* pCaller */, const std::string &Params)
	{
		CInterfaceManager *pIM = CInterfaceManager::getInstance();
		CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(Params));
		if (pGC != NULL)
		{
			pGC->setUseGlobalAlpha(false);
			pGC->setContainerAlpha((uint8) 0);
			pGC->setContentAlpha((uint8) 255);
			pGC->setRolloverAlphaContainer((uint8) 255);
			pGC->setRolloverAlphaContent((uint8) 0);
		}
	}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:13,代码来源:action_handler.cpp

示例2: execute

	virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
	{
		string sVDesk = getParam(Params,"vdesk");

		if (sVDesk.empty()) return;
		sint32 nVDesk;
		fromString(sVDesk, nVDesk);

		CInterfaceManager *pIM = CInterfaceManager::getInstance();
		pIM->resetMode((uint8)nVDesk);

		PeopleInterraction.refreshActiveUserChats();
	}
开发者ID:mixxit,项目名称:solinia,代码行数:13,代码来源:action_handler.cpp

示例3: addCtrl

// ***************************************************************************
void	CGroupTab::addTab(CCtrlTabButton * tabB)
{
	addCtrl(tabB);
	_Setuped = false;
	updateCoords();
	selectFromCtrl(tabB);

	if(_HideOutTabs && !_AHOnChange.empty())
	{
		CInterfaceManager *pIM = CInterfaceManager::getInstance();
		pIM->runActionHandler(_AHOnChange, this, _ParamsOnChange);
	}
}
开发者ID:mixxit,项目名称:solinia,代码行数:14,代码来源:group_tab.cpp

示例4: execute

	void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
	{
		// Param
		uint mode;
		fromString(getParam (sParams, "mode"), mode);
		ucstring text;
		text.fromUtf8 (getParam (sParams, "text"));
//		text = getParam (sParams, "text");

		// Parse any tokens in the text
		if ( ! CInterfaceManager::parseTokens(text))
		{
			return;
		}

		// Find the base group
		if ((mode<CChatGroup::nbChatMode) && !text.empty())
		{
			if(text[0] == '/')
			{
				string str = text.toUtf8();
				string cmdWithArgs = str.substr(1);

				// Get the command name from the string, can contain spaces
				string cmd = cmdWithArgs.substr(0, cmdWithArgs.find(' '));
				if (cmdWithArgs.find('"') == 0)
				{
					string::size_type pos = cmdWithArgs.find('"', 1);
					if (string::npos != pos)
					{
						cmd = cmdWithArgs.substr(1, pos - 1);
					}
				}

				if ( NLMISC::ICommand::exists( cmd ) )
				{
					NLMISC::ICommand::execute( cmdWithArgs, g_log );
				} 
				else
				{
					CInterfaceManager *im = CInterfaceManager::getInstance();
					im->displaySystemInfo (ucstring(cmd+": ")+CI18N::get ("uiCommandNotExists"));
				}
			}
			else
			{
				ChatMngr.setChatMode((CChatGroup::TGroupType)mode);
				ChatMngr.chat(text, mode == CChatGroup::team);
			}
		}
	}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:51,代码来源:client_chat_manager.cpp

示例5: execute

	virtual void execute(CCtrlBase *pCaller, const std::string &/* sParams */)
	{
		CInterfaceManager *im = CInterfaceManager::getInstance();
		CCtrlBaseButton *but = dynamic_cast<CCtrlBaseButton *>(pCaller);
		if (but)
		{
			im->getDbProp("UI:TEMP:R2_DRAW_ARRAY")->setValueBool(but->getPushed());
			CToolCreateEntity *tce = dynamic_cast<CToolCreateEntity *>(getEditor().getCurrentTool());
			if (tce)
			{
				im->runActionHandler("r2ed_create_entity", NULL, "PaletteId=" + tce->getPaletteId());
			}
		}
	}
开发者ID:mixxit,项目名称:solinia,代码行数:14,代码来源:tool_create_entity.cpp

示例6: prompt

//=============================================================================================================
void CChatTargetFilter::setTargetGroup(CChatGroup::TGroupType groupType, uint32 dynamicChannelDbIndex, bool allowUniverseWarning)
{
	_TargetPlayer.resize(0);
	if (_TargetPartyChat)
	{
		_TargetPartyChat->removeObserver(this);
		_TargetPartyChat = NULL;
	}
	_TargetGroup = groupType;
	_TargetDynamicChannelDbIndex = dynamicChannelDbIndex;

	if (_Chat)
	{
		// set the prompt
		const ucstring prompt("");
		_Chat->setPrompt(prompt + (ucchar) '>');

		// set the color
		string entry="UI:SAVE:CHAT:COLORS:";
		CInterfaceManager *pIM = CInterfaceManager::getInstance();
		const bool teamActive = pIM->getDbProp("SERVER:GROUP:0:NAME")->getValueBool();
		const bool guildActive = pIM->getDbProp("SERVER:GUILD:NAME")->getValueBool();
		switch(groupType)
		{
			case CChatGroup::dyn_chat: entry+="DYN:" + NLMISC::toString(dynamicChannelDbIndex); break;
			case CChatGroup::say:	entry+="SAY";	break;
			case CChatGroup::shout:	entry+="SHOUT";	break;
			case CChatGroup::team:	if(!teamActive) return; entry+="GROUP";	break;
			case CChatGroup::guild:	entry+="CLADE";	break;
			case CChatGroup::civilization:	entry+="CIVILIZATION";	break;
			case CChatGroup::territory:	entry+="TERRITORY";	break;
			case CChatGroup::universe:
				{
					entry+="UNIVERSE_NEW";
					if(allowUniverseWarning)
						pIM->getDbProp("UI:VARIABLES:UNIVERSE_CHANEL_WARNING_WANTED")->setValue64(1);
				}
				break;
			case CChatGroup::region:	entry+="REGION";	break;
			case CChatGroup::tell:	entry+="TELL";	break;
			case CChatGroup::system: return;	// return with no warning
			default:	nlwarning("unknown CChatGroup type");	return;
		}

		// read DB
		CInterfaceProperty prop;
		prop.readRGBA(entry.c_str()," ");
		_Chat->setPromptColor(prop.getRGBA());
	}
}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:51,代码来源:chat_filter.cpp

示例7: execute

	virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
	{
		CInterfaceManager *pIM = CInterfaceManager::getInstance();
		CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", Params));
		if (pGC == NULL)
		{
			nlwarning("%s is not a container", Params.c_str());
			return;
		}
		if (!isContainerAuthorized(pGC)) return;

		pGC->setActive(true);
		pIM->setTopWindow(pGC);
	}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:14,代码来源:action_handler_ui.cpp

示例8: splitString

// --------------------------------------------------------------------------------------------------------------------
bool CViewPointer::drawCustom(CCtrlBase* pCB)
{
	string texName;
	uint8 rot;
	NLMISC::CRGBA col;
	if (pCB->getMouseOverShape(texName, rot, col))
	{
		if (texName[0] == '@')
		{
			const string &tooltipInfos = texName.substr(1);
			string tooltip;
			vector<string> tooltipInfosList;
			splitString(tooltipInfos, "@", tooltipInfosList);
			texName = tooltipInfosList[0];
			tooltip = tooltipInfosList[1];
			nlinfo(tooltip.c_str());
			setString(ucstring(tooltip));
			CInterfaceManager *pIM = CInterfaceManager::getInstance();
			CViewRenderer &rVR = pIM->getViewRenderer();
			sint32 texId = rVR.getTextureIdFromName (texName);

			CInterfaceGroup *stringCursor = IsMouseCursorHardware() ? _StringCursorHardware : _StringCursor;
			if (stringCursor)
			{
				stringCursor->setX(_PointerX);
				stringCursor->setY(_PointerY);
				stringCursor->updateCoords();
				stringCursor->draw();
				// if in hardware mode, force to draw the default cursor no matter what..
				if (IsMouseCursorHardware())
					drawCursor(texId, col, 0);
			}
			else
			{
				drawCursor(texId, col, 0);
			}
			return true;
		}
		else
		{
			CInterfaceManager *pIM = CInterfaceManager::getInstance();
			CViewRenderer &rVR = pIM->getViewRenderer();
			sint32 texId = rVR.getTextureIdFromName (texName);
			drawCursor(texId, col, 0);
			return true;
		}
	}
	return false;
}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:50,代码来源:view_pointer.cpp

示例9: parse

// ----------------------------------------------------------------------------
bool COptionsContainerInsertion::parse(xmlNodePtr cur)
{
	if (!CInterfaceOptions::parse (cur))
		return false;

	CInterfaceManager *pIM = CInterfaceManager::getInstance();
	CViewRenderer &rVR = pIM->getViewRenderer();
	TxId_T_Arrow =  rVR.getTextureIdFromName (getValStr("arrow_top"));
	TxId_B_Arrow =  rVR.getTextureIdFromName (getValStr("arrow_down"));
	TxId_L_Arrow =  rVR.getTextureIdFromName (getValStr("arrow_left"));
	TxId_R_Arrow =  rVR.getTextureIdFromName (getValStr("arrow_right"));
	TxId_InsertionBar =  rVR.getTextureIdFromName (getValStr("insertion_bar"));

	return true;
}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:16,代码来源:interface_options.cpp

示例10:

//**********************************************************************************
void CDBGroupListSheetMission::CSheetChildMission::init(CDBGroupListSheetText *pFather, uint index)
{
	// init my parent
	CSheetChild::init(pFather, index);

	// init the link to the database requesites
	CInterfaceManager *pIM = CInterfaceManager::getInstance();
	CCDBNodeLeaf *pNL;
	string sTmp = Ctrl->getSheet()+":PREREQ_STATE";
	sTmp = "LOCAL:" + sTmp.substr(6,sTmp.size());
	pNL = pIM->getDbProp(sTmp, false);
	nlassert(pNL != NULL);
	CurrentPreReqState.link ( sTmp.c_str() );

}
开发者ID:mixxit,项目名称:solinia,代码行数:16,代码来源:dbgroup_list_sheet_mission.cpp

示例11: nldebug

// ****************************************************************************
void CSessionBrowserImpl::on_joinSessionResult(NLNET::TSockId /* from */, uint32 /* userId */, TSessionId sessionId, uint32 result, const std::string &shardAddr, const RSMGR::TSessionPartStatus &participantStatus)
{
    nldebug("SB: on_joinSessionResult : result = %u; msg = '%s'", result, shardAddr.c_str());
    _LastJoinSessionResult = result;
    _LastJoinSessionId = sessionId;
    _LastJoinSessionShardAddr = shardAddr;
    _LastJoinSessionPartStatus = participantStatus;

    // trigger the far tp action
    if (result == 0)
    {
        CInterfaceManager *pIM = CInterfaceManager::getInstance();
        pIM->runActionHandler("on_connect_to_shard", NULL, string("cookie=")+NetMngr.getLoginCookie().toString()+"|fsAddr="+shardAddr);
    }
}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:16,代码来源:session_browser_impl.cpp

示例12: setLook

// *********************************************************
void CPrimRender::setLook(const CPrimLook &look)
{
	//H_AUTO(R2_CPrimRender_setLook)
	if (look == _Look) return;
	_Look = look;
	if (!look.EdgeLook.WorldMapTexture.empty())
	{
		CInterfaceManager *im = CInterfaceManager::getInstance();
		CViewRenderer &vr = im->getViewRenderer();
		sint32 width, height;
		sint32 id = vr.getTextureIdFromName(look.EdgeLook.WorldMapTexture);
		vr.getTextureSizeFromId(id, width, height);
		_InvWorldTextureWidth = width > 0 ? 1.f / width : 0.f;
	}
	update();
}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:17,代码来源:prim_render.cpp

示例13: drawCursor

// --------------------------------------------------------------------------------------------------------------------
void CViewPointer::drawCursor(sint32 texId, NLMISC::CRGBA col, uint8 rot)
{
	CInterfaceManager *pIM = CInterfaceManager::getInstance();
	CViewRenderer &rVR = pIM->getViewRenderer();
	sint32 xPos = _XReal + _OffsetX;
	sint32 yPos = _YReal + _OffsetY;
	if (!IsMouseCursorHardware())
	{
		rVR.draw11RotFlipBitmap (_RenderLayer, xPos, yPos, rot, false, texId, col);
	}
	else
	{
		// set new cursor for the hardware mouse
		std::string name = rVR.getTextureNameFromId(texId);
		Driver->setCursor(name, col, rot, (uint32) std::max(getX() - xPos, (sint32) 0), (uint32) std::max(getY() - yPos, (sint32) 0));
	}
}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:18,代码来源:view_pointer.cpp

示例14: begin

// *************************************************************************************************
void CBotChatPageDynamicMission::begin()
{
	CBotChatPage::begin();
	// clear db entries for dynamic missions
	CInterfaceManager *im = CInterfaceManager::getInstance();
	invalidateMission();
	// clear all choices options
	for(uint k = 0; k < DYNAMIC_MISSION_NUM_CHOICES; ++k)
	{
		im->getDbProp(toString(DM_CHOICE "%d:TITLE", (int) k))->setValue32(0);
		for(uint l = 0; l < DYNAMIC_MISSION_MAX_NUM_OPTIONS; ++l)
		{
			im->getDbProp(toString(DM_CHOICE "%d:%d:TEXT", (int) k, (int) l))->setValue32(0);
		}
	}
	activateWindow(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION, true);
	CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(im->getElementFromId(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION));
	if (!ig)
	{
		std::fill(_ChoiceCB, _ChoiceCB + DYNAMIC_MISSION_NUM_CHOICES, (CDBGroupComboBox *) NULL);
	}
	else
	{
		for(uint k = 0; k < DYNAMIC_MISSION_NUM_CHOICES; ++k)
		{
			// get pointers on combo boxs
			_ChoiceCB[k] = dynamic_cast<CDBGroupComboBox *>(ig->getGroup(toString("choice%d", (int) k)));
			// empty the choice list (no datas received yet)
			if (_ChoiceCB[k])
			{
				_ChoiceCB[k]->setActive(false);
				_ChoiceCB[k]->resetTexts();
			}
			for(uint l = 0; l < DYNAMIC_MISSION_MAX_NUM_OPTIONS; ++l)
			{
				_TextReceived[k][l] = false;
			}
		}
	}
	std::fill(_Choice, _Choice + DYNAMIC_MISSION_NUM_CHOICES, -1);
	for(uint k = 0; k < DYNAMIC_MISSION_NUM_CHOICES; ++k)
	{
		im->getDbProp(toString("UI:TEMP:DYNAMIC_MISSION:CHOICE%d", (int) k))->setValue32(-1);
	}
}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:46,代码来源:bot_chat_page_dynamic_mission.cpp

示例15: init

	// Init the action manager
	void init ()
	{
		// Get the current edit box
		_GroupEdit = NULL;
		_LooseSelection = false;

		// Get the interface manager
		CInterfaceManager *pIM = CInterfaceManager::getInstance();
		if (pIM)
		{
			CCtrlBase *basectrl = pIM->getCaptureKeyboard();
			if (basectrl)
				_GroupEdit = dynamic_cast<CGroupEditBox*>(basectrl);
		}

		if (_GroupEdit)
			_GroupEdit->stopParentBlink();
	}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:19,代码来源:action_handler_edit.cpp


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