hoffstadt / hoffstadt/DearPyGui

global mouseDragDelta is never reset to zero when dragging stops

Open
#2,548 1 comment 0 reactions 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## Version of Dear PyGui

Version: 2.1.0
Operating System: Ubuntu 24.04

## My Issue/Question

When checking to see if the mouse is being dragged with dpg.get_mouse_drag_delta(), the drag_delta does not reset to zero after mouse button released.

## To Reproduce

Run example code, drag mouse around, release mouse button, mouse delta does not reset.

## Expected behavior

Mouse drag delta should be reset to zero when dragging stops.

## Standalone, minimal, complete and verifiable example

```python
import dearpygui.dearpygui as dpg

dpg.create_context()

with dpg.window(label="Mouse Drag Delta Demo", width=500, height=400):
dpg.add_text("Click and drag anywhere to see drag delta")
dpg.add_text("Check console for continuous output")

dpg.create_viewport(title="Mouse Drag Delta Demo", width=500, height=400)
dpg.setup_dearpygui()
dpg.show_viewport()

while dpg.is_dearpygui_running():
drag_delta = dpg.get_mouse_drag_delta()
print(f"Mouse drag delta: {drag_delta}")
dpg.render_dearpygui_frame()

dpg.destroy_context()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.