| 1035 | |
| 1036 | |
| 1037 | GuiControl* GuiControl::findHitControl(const Point2I &pt, S32 initialLayer) |
| 1038 | { |
| 1039 | iterator i = end(); // find in z order (last to first) |
| 1040 | while (i != begin()) |
| 1041 | { |
| 1042 | i--; |
| 1043 | GuiControl *ctrl = static_cast<GuiControl *>(*i); |
| 1044 | if (initialLayer >= 0 && ctrl->mLayer > initialLayer) |
| 1045 | { |
| 1046 | continue; |
| 1047 | } |
| 1048 | else if (ctrl->mVisible && ctrl->pointInControl(pt)) |
| 1049 | { |
| 1050 | Point2I ptemp = pt - ctrl->mBounds.point; |
| 1051 | GuiControl *hitCtrl = ctrl->findHitControl(ptemp); |
| 1052 | |
| 1053 | if(hitCtrl->mProfile->mModal) |
| 1054 | return hitCtrl; |
| 1055 | } |
| 1056 | } |
| 1057 | return this; |
| 1058 | } |
| 1059 | |
| 1060 | // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // |
| 1061 |
no test coverage detected