Rainbow: WinGL..

git-svn-id: svn://ultimatepp.org/upp/trunk@3705 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
unodgs 2011-07-22 21:28:40 +00:00
commit 7e763026e1
12 changed files with 311 additions and 152 deletions

View file

@ -33,6 +33,16 @@ void Ctrl::MouseEventGl(Ptr<Ctrl> t, int event, Point p, int zdelta)
t->PostInput();
}
Ctrl *Ctrl::FindMouseTopCtrl()
{
for(int i = topctrl.GetCount() - 1; i >= 0; i--) {
Ctrl *t = topctrl[i];
if(t->GetRect().Contains(glmousepos))
return t->IsEnabled() ? t : NULL;
}
return desktop->IsEnabled() ? desktop : NULL;
}
void Ctrl::DoMouseGl(int event, Point p, int zdelta)
{
glmousepos = p;
@ -44,7 +54,7 @@ void Ctrl::DoMouseGl(int event, Point p, int zdelta)
else
if(a == Ctrl::DOWN && ignoreclick)
return;
LLOG("Mouse event: " << event << " position " << p << " zdelta " << zdelta << ", capture " << Upp::Name(captureCtrl));
LLOG("### Mouse event: " << event << " position " << p << " zdelta " << zdelta << ", capture " << Upp::Name(captureCtrl));
if(captureCtrl)
MouseEventGl(captureCtrl->GetTopCtrl(), event, p, zdelta);
else