| 113 | } |
| 114 | |
| 115 | void ColourPanel::notifyMouseDrag(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id) |
| 116 | { |
| 117 | if (_id != MyGUI::MouseButton::Left) |
| 118 | return; |
| 119 | |
| 120 | MyGUI::Widget* parent = mImageColourPicker->getParent(); |
| 121 | MyGUI::IntPoint point(_left - parent->getAbsoluteLeft(), _top - parent->getAbsoluteTop()); |
| 122 | |
| 123 | if (point.left < 0) |
| 124 | point.left = 0; |
| 125 | if (point.top < 0) |
| 126 | point.top = 0; |
| 127 | if (point.left > mColourRect->getWidth()) |
| 128 | point.left = mColourRect->getWidth(); |
| 129 | if (point.top > mColourRect->getHeight()) |
| 130 | point.top = mColourRect->getHeight(); |
| 131 | |
| 132 | mImageColourPicker->setPosition( |
| 133 | point.left - (mImageColourPicker->getWidth() / 2), |
| 134 | point.top - (mImageColourPicker->getHeight() / 2)); |
| 135 | |
| 136 | updateFromPoint(point); |
| 137 | } |
| 138 | |
| 139 | void ColourPanel::notifyMouseButtonPressed(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id) |
| 140 | { |
nothing calls this directly
no test coverage detected