MCPcopy Create free account
hub / github.com/ZDoom/Raze / OnMouseMove

Method OnMouseMove

libraries/ZWidget/src/widgets/lineedit/lineedit.cpp:282–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282void LineEdit::OnMouseMove(const Point& pos)
283{
284 if (mouse_selecting && !ignore_mouse_events)
285 {
286 if (pos.x < 0.0 || pos.x >= GetWidth())
287 {
288 if (pos.x < 0.0)
289 mouse_moves_left = true;
290 else
291 mouse_moves_left = false;
292
293 if (!readonly)
294 scroll_timer->Start(50, true);
295 }
296 else
297 {
298 scroll_timer->Stop();
299 cursor_pos = GetCharacterIndex(pos.x);
300 SetSelectionLength(cursor_pos - selection_start);
301 Update();
302 }
303 }
304}
305
306bool LineEdit::OnMouseDown(const Point& pos, int key)
307{

Callers

nothing calls this directly

Calls 2

StartMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected