| 102 | } |
| 103 | |
| 104 | void ColourPanel::notifyMouseDrag(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id) |
| 105 | { |
| 106 | if (_id != MyGUI::MouseButton::Left) |
| 107 | return; |
| 108 | |
| 109 | MyGUI::Widget* parent = mImageColourPicker->getParent(); |
| 110 | MyGUI::IntPoint point(_left - parent->getAbsoluteLeft(), _top - parent->getAbsoluteTop()); |
| 111 | |
| 112 | if (point.left < 0) |
| 113 | point.left = 0; |
| 114 | if (point.top < 0) |
| 115 | point.top = 0; |
| 116 | if (point.left > mColourRect->getWidth()) |
| 117 | point.left = mColourRect->getWidth(); |
| 118 | if (point.top > mColourRect->getHeight()) |
| 119 | point.top = mColourRect->getHeight(); |
| 120 | |
| 121 | mImageColourPicker->setPosition( |
| 122 | point.left - (mImageColourPicker->getWidth() / 2), |
| 123 | point.top - (mImageColourPicker->getHeight() / 2)); |
| 124 | |
| 125 | updateFromPoint(point); |
| 126 | } |
| 127 | |
| 128 | void ColourPanel::notifyMouseButtonPressed(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id) |
| 129 | { |
nothing calls this directly
no test coverage detected