mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
Rainbow: WinGL..
git-svn-id: svn://ultimatepp.org/upp/trunk@3705 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d3d4804c34
commit
7e763026e1
12 changed files with 311 additions and 152 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue