本文整理汇总了C++中CInterfaceManager::getCtrlsUnderPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ CInterfaceManager::getCtrlsUnderPointer方法的具体用法?C++ CInterfaceManager::getCtrlsUnderPointer怎么用?C++ CInterfaceManager::getCtrlsUnderPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CInterfaceManager
的用法示例。
在下文中一共展示了CInterfaceManager::getCtrlsUnderPointer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
// --------------------------------------------------------------------------------------------------------------------
void CViewPointer::draw ()
{
// Do not display the pointer if not visible.
if(!_PointerVisible)
return;
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = pIM->getViewRenderer();
if (pIM->isInGame())
if (!_StringCursor)
{
// Create the string cursor instance
std::vector<std::pair<std::string,std::string> > templateParams;
templateParams.push_back (std::pair<std::string,std::string>("id", "string_cursor"));
_StringCursor = pIM->createGroupInstance("string_cursor", "", templateParams);
if (_StringCursor)
_StringCursor->setParentPos(pIM->getElementFromId("ui:interface"));
templateParams.clear();
templateParams.push_back (std::pair<std::string,std::string>("id", "string_cursor_hardware"));
_StringCursorHardware = pIM->createGroupInstance("string_cursor_hardware", "", templateParams);
if (_StringCursorHardware)
_StringCursorHardware->setParentPos(pIM->getElementFromId("ui:interface"));
}
CRGBA col;
if(getModulateGlobalColor())
col.modulateFromColor (_Color, pIM->getGlobalColor());
else
col= _Color;
//col.A = (uint8)(((sint32)col.A*((sint32)pIM->getGlobalColor().A+1))>>8);
col.A = _Color.A;
if (_LastHightLight != NULL)
{
_LastHightLight->setHighLighted(false,0);
_LastHightLight = NULL;
}
if (pIM->getCapturePointerLeft() != NULL && pIM->isMouseHandlingEnabled())
{
CCtrlMover *pCM = dynamic_cast<CCtrlMover*>(pIM->getCapturePointerLeft());
if ((pCM != NULL) && (pCM->canMove() == true))
{
CGroupContainer *pGC = dynamic_cast<CGroupContainer *>(pCM->getParent());
if (pGC != NULL && !pGC->isLocked())
{
pGC->setHighLighted(true, 255);
_LastHightLight = pGC;
}
}
}
if (_TxIdDefault == -2)
{
_TxIdDefault = rVR.getTextureIdFromName (_TxDefault);
_TxIdMoveWindow = rVR.getTextureIdFromName (_TxMoveWindow);
_TxIdResizeBRTL = rVR.getTextureIdFromName (_TxResizeBRTL);
_TxIdResizeBLTR = rVR.getTextureIdFromName (_TxResizeBLTR);
_TxIdResizeTB = rVR.getTextureIdFromName (_TxResizeTB);
_TxIdResizeLR = rVR.getTextureIdFromName (_TxResizeLR);
_TxIdRotate = rVR.getTextureIdFromName (_TxRotate);
_TxIdScale = rVR.getTextureIdFromName (_TxScale);
_TxIdColPick = rVR.getTextureIdFromName (_TxColPick);
_TxIdPan = rVR.getTextureIdFromName (_TxPan);
_TxIdCanPan = rVR.getTextureIdFromName (_TxCanPan);
if (ClientCfg.R2EDEnabled)
{
_TxIdPanR2 = rVR.getTextureIdFromName (_TxPanR2);
_TxIdCanPanR2 = rVR.getTextureIdFromName (_TxCanPanR2);
}
}
const vector<CCtrlBase *> &rICL = pIM->getCtrlsUnderPointer ();
// Draw the captured cursor
CCtrlBase *pCB = pIM->getCapturePointerLeft();
if (pCB != NULL)
{
if (drawResizer(pCB,col)) return;
//if (drawMover(pCB,col)) return;
if (drawColorPicker(pCB,col)) return;
if (drawRotate(pCB,col)) return;
if (drawPan(pCB,col)) return;
if (drawCustom(pCB)) return;
drawCursor(_TxIdDefault, col, 0);
return;
}
const vector<CViewBase *> &vUP = pIM->getViewsUnderPointer ();
for(uint i=0;i<vUP.size();i++)
{
CViewLink *vLink = dynamic_cast<CViewLink*>(vUP[i]);
if (vLink != NULL)
//.........这里部分代码省略.........