本文整理汇总了C++中UserInterface::GetHoverElement方法的典型用法代码示例。如果您正苦于以下问题:C++ UserInterface::GetHoverElement方法的具体用法?C++ UserInterface::GetHoverElement怎么用?C++ UserInterface::GetHoverElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserInterface
的用法示例。
在下文中一共展示了UserInterface::GetHoverElement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessMessage
//.........这里部分代码省略.........
}
String uiName = params[1];
if (uiName == "this")
uiName = message->element->name;
PopUI(uiName);
return;
}
else if (msg == "Back")
{
UserInterface * ui = RelevantUI();
UIElement * stackTop = ui->GetStackTop();
Graphics.QueueMessage(new GMPopUI(stackTop->name, ui));
return;
}
else if (msg.Contains("begin_input(") ||
msg.Contains("BeginInput("))
{
String elementName = msg.Tokenize("()")[1];
UIElement * element;
if (elementName == "this")
element = message->element;
else
element = StateMan.ActiveState()->GetUI()->GetElementByName(elementName);
if (!element)
return;
assert(element->demandInputFocus);
((UIInput*)element)->BeginInput();
return;
/*
UserInterface * ui = StateMan.ActiveState()->GetUI();
UIElement * element = message->element;
if (!element){
std::cout<<"\nNo active element, fetching hover element.";
element = ui->GetHoverElement();
}
if (element != NULL){
// assert(element->onTrigger);
if (!element->onTrigger)
std::cout<<"\nBegnning input for element without onTrigger specified!";
InputMan.SetActiveUIInputElement(element);
InputMan.EnterTextInputMode(element->onTrigger);
}
else
assert(false && "NULL-element :<");
return;
*/
}
else if (msg.Contains("Remove(") || msg.Contains("DeleteUI("))
{
UserInterface * ui = StateMan.ActiveState()->GetUI();
UIElement * element;
String uiName = msg.Tokenize("()")[1];
/// this-deletion
if (uiName == "this"){
if (message->element)
element = message->element;
else
element = ui->GetActiveElement();
}
/// Named deletion
else {
element = ui->GetElementByName(uiName);
}
/// For all usual AI, the state is not active after activation, so just grab the one with the hover-state!
if (element == NULL)
element = ui->GetHoverElement();