ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
61.14k stars 10.3k forks source link

Flickering mouse cursor while in game. please help #868

Closed Cod3sss closed 8 years ago

Cod3sss commented 8 years ago

Hello, I'm using ImGUI for my csgo cheat and I'm loving it but there is a problem and its kinda annoying but everytime I open the menu the windows cursor gets in the game "fullscreen" and starts flickering between the game cursor and the mouse cursor any ideas of what is causing it? ty

ocornut commented 8 years ago

Your wording is unclear and you aren't providing much information.

Please provide repro (code that actually be pasted in an example app and exhibit the issue) when you ask about issues.

Cod3sss commented 8 years ago

I'm sorry, well whats happening is that when I open the game csgo has his own cursor right? but when I open the menu the windows cursor appears and starts flickering, when I close the menu the cursor stays which I don't want to, here is my code.

http://pastebin.com/b66qtZTZ

ocornut commented 8 years ago

ImGui displays a software (2 triangles) cursor only if you set io.MouseDrawCursor to true.

Any other cursor would be handled by the OS.

imgui_impl_dx9.cpp happen to calls SetCursor(NULL) or SetCursor(LoadCursor(NULL, IDC_ARROW)) depending on the state of io.MouseDrawCursor, which is perhaps not a good thing to do. See https://github.com/ocornut/imgui/issues/585 - So perhaps that needs tweaking and you may see if that line may be best removed for you.

Whatever your hooking system and host app does is totally unknown to me so I can't begin to guess what other things may be involved there. (not even mentioning the fact that is unethical and running other people's games, which really doesn't give me much incentive to help you).

Cod3sss commented 8 years ago

Tried deleting the mousedrawcursor but still the same... Also tried what lised in #585 didn't help either. Still shows 2 cursors, the game cursor and the windows cursor.

Cod3sss commented 8 years ago

It must be ImGUI too because without it the cursor is fine.

Cod3sss commented 8 years ago

I have set

if (ImGui::GetIO().MouseDrawCursor) SetCursor(NULL);

still showing..

ocornut commented 8 years ago

It's not ImGui, ImGui doesn't do anything with your OS cursor. The only place that ever does is the wrapper imgui_impl_dx9.cpp.