|
|
发表于 2010-1-25 17:58:00
|
显示全部楼层
Re:关于ui制作的问题
每个控件都有zOrder,用来控制控件的前后顺序
class control
{
controls[] children; //sorted array,sort by zOrder
findInputTarget(mouseX,mouseY)
{
foreach control in children
{
if(control.containPoint(mousex,mousey)
{
if(control.haschildren) findinputTarget(mousex,mousey);recursion
else return control;
}
}
}
} |
|