MCPcopy Create free account
hub / github.com/MyGUI/mygui / notifyMouseDrag

Method notifyMouseDrag

Tools/EditorFramework/TextureControl.cpp:207–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205 }
206
207 void TextureControl::notifyMouseDrag(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)
208 {
209 mMouseLeftPressed = false;
210
211 if (_id == MyGUI::MouseButton::Right)
212 {
213 MyGUI::IntPoint mousePoint = MyGUI::InputManager::getInstance().getMousePositionByLayer();
214 MyGUI::IntPoint mouseOffset = mousePoint - mRightMouseClick;
215
216 MyGUI::IntPoint offset = mViewOffset + mouseOffset;
217 mView->setViewOffset(offset);
218 }
219 else if (_id == MyGUI::MouseButton::Left)
220 {
221 onMouseDrag(getMousePosition());
222 }
223 }
224
225 void TextureControl::notifyMouseMove(MyGUI::Widget* _sender, int _left, int _top)
226 {

Callers

nothing calls this directly

Calls 2

setViewOffsetMethod · 0.45

Tested by

no test coverage detected