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

Method notifyMousePressed

MyGUIEngine/src/MyGUI_EditBox.cpp:149–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 }
148
149 void EditBox::notifyMousePressed(Widget* _sender, int _left, int _top, MouseButton _id)
150 {
151 if (mClientText == nullptr)
152 return;
153
154 // в статике все недоступно
155 if (mModeStatic)
156 return;
157
158 IntPoint point = InputManager::getInstance().getLastPressedPosition(MouseButton::Left);
159 mCursorPosition = mClientText->getCursorPosition(point);
160 mClientText->setCursorPosition(mCursorPosition);
161 mClientText->setVisibleCursor(true);
162 mCursorTimer = 0;
163 updateSelectText();
164
165 if (_id == MouseButton::Left)
166 mMouseLeftPressed = true;
167 }
168
169 void EditBox::notifyMouseReleased(Widget* _sender, int _left, int _top, MouseButton _id)
170 {

Callers

nothing calls this directly

Calls 3

setCursorPositionMethod · 0.80
setVisibleCursorMethod · 0.80
getCursorPositionMethod · 0.45

Tested by

no test coverage detected