本文整理汇总了C++中Window::GetOver方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::GetOver方法的具体用法?C++ Window::GetOver怎么用?C++ Window::GetOver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Window
的用法示例。
在下文中一共展示了Window::GetOver方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MouseMove
/** BroadCast Mouse Move Event */
void EventMgr::MouseMove(unsigned short x, unsigned short y)
{
if (windows.size() == 0) {
return;
}
if (!last_win_focused) {
return;
}
GameControl *gc = core->GetGameControl();
if (gc) {
// for scrolling
gc->OnGlobalMouseMove(x, y);
}
std::vector< int>::iterator t;
std::vector< Window*>::iterator m;
for (t = topwin.begin(); t != topwin.end(); ++t) {
m = windows.begin();
m += ( *t );
Window *win = *m;
if (win == NULL)
continue;
if (!win->Visible)
continue;
if (( win->XPos <= x ) && ( win->YPos <= y )) {
//Maybe we are on the window, let's check
if (( win->XPos + win->Width >= x ) &&
( win->YPos + win->Height >= y )) {
//Yes, we are on the Window
//Let's check if we have a Control under the Mouse Pointer
Control* ctrl = win->GetControl( x, y, true );
//look for the low priority flagged controls (mostly static labels)
if (ctrl == NULL) {
ctrl = win->GetControl( x, y, false );
}
if (win != last_win_over || ctrl != win->GetOver()) {
// Remove tooltip if mouse moved to different control
core->DisplayTooltip( 0, 0, NULL );
if (last_win_over) {
last_win_over->OnMouseLeave( x, y );
}
last_win_over = win;
win->OnMouseEnter( x, y, ctrl );
}
if (ctrl != NULL) {
win->OnMouseOver( x, y );
}
RefreshCursor(win->Cursor);
return;
}
}
//stop going further
if (( *m )->Visible == WINDOW_FRONT)
break;
}
core->DisplayTooltip( 0, 0, NULL );
}