| 166 | } |
| 167 | |
| 168 | void Window::notifyMouseDrag(MyGUI::Widget* _sender, int _left, int _top, MouseButton _id) |
| 169 | { |
| 170 | if (_id != MouseButton::Left) |
| 171 | return; |
| 172 | |
| 173 | const IntPoint& point = InputManager::getInstance().getLastPressedPosition(MouseButton::Left); |
| 174 | |
| 175 | IntCoord coord = mCurrentActionScale; |
| 176 | coord.left *= (_left - point.left); |
| 177 | coord.top *= (_top - point.top); |
| 178 | coord.width *= (_left - point.left); |
| 179 | coord.height *= (_top - point.top); |
| 180 | |
| 181 | if (coord.empty()) |
| 182 | return; |
| 183 | |
| 184 | if (coord.left == 0 && coord.top == 0) |
| 185 | setSize((mPreActionCoord + coord).size()); |
| 186 | else if (coord.width == 0 && coord.height == 0) |
| 187 | setPosition((mPreActionCoord + coord).point()); |
| 188 | else |
| 189 | setCoord(mPreActionCoord + coord); |
| 190 | |
| 191 | // посылаем событие о изменении позиции и размере |
| 192 | eventWindowChangeCoord(this); |
| 193 | } |
| 194 | |
| 195 | void Window::updateAlpha() |
| 196 | { |