git-svn-id: svn://db.shs.com.ru/pip@530 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -85,6 +85,18 @@ PIVector<PIScreenTile * > PIScreenTile::children(bool only_visible) {
|
||||
}
|
||||
|
||||
|
||||
PIScreenTile * PIScreenTile::childUnderMouse(int x, int y) {
|
||||
piForeach (PIScreenTile * t, tiles) {
|
||||
if (!t->visible) continue;
|
||||
if (x >= t->x_ && (x - t->x_) < t->width_ &&
|
||||
y >= t->y_ && (y - t->y_) < t->height_) {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void PIScreenTile::raiseEvent(TileEvent e) {
|
||||
if (!screen) return;
|
||||
screen->tileEventInternal(this, e);
|
||||
|
||||
Reference in New Issue
Block a user