git-svn-id: svn://db.shs.com.ru/pip@530 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-07-19 16:05:27 +00:00
parent 44cbdc1f4a
commit e6b1ef3fb1
13 changed files with 272 additions and 24 deletions

View File

@@ -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);