Skip to content

Commit 7cf2cd9

Browse files
authored
Add more information on the behavior of cursors
1 parent 0f403f1 commit 7cf2cd9

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,19 @@ ImGuiIO& io = ImGui::GetIO();
244244
io.MouseDrawCursor = true;
245245
```
246246

247+
To hide the mouse cursor you'll need to set both the custor style to none and the imgui's drawn cursor to false (This also needs to be done every frame):
248+
249+
```cpp
250+
ImGui::SetMouseCursor(ImGuiMouseCursor_None);
251+
io.MouseDrawCursor = false;
252+
```
253+
254+
You can also completely disable ImGui's control over the system cursor by setting the appropriate flag:
255+
256+
```cpp
257+
io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange;
258+
```
259+
247260
Keyboard/Gamepad navigation
248261
---
249262
Starting with [ImGui 1.60](https://github.com/ocornut/imgui/releases/tag/v1.60), there's a feature to control ImGui with keyboard and gamepad. To use keyboard navigation, you just need to do this:

0 commit comments

Comments
 (0)