-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imgui Demo Delayed key presses #72215
Comments
I noticed some of this behaviour on curses, but not on tiles. After a bit of testing, I'm thinking that's probably because my mouse is twitchy enough that I was regularly triggering MOUSE_MOVE on the tiles build. It looks like the main difference in the input loop between the ImGui Popup/Keybinding screens and the demo screen is that I did not set a timeout for the input context on the demo screen. That means that the screen is only refreshed when there's "valid" input, even if ImGui is doing it's own changes behind the scenes. Before video (including the delayed text input/mouse clicks and animation issues): After this modification:
ImGui_Demo_After_with_set_timeout.mp4Note that text input appears immediately but briefly and keyboard controls seem to work as expected. Currently, the ImGui popup and keybinding screens only have an input timeout on Tiles/Windows builds, but I think it would actually solve some of the problems I'm having on curses. A bit more testing is required, but as long as nothing else goes wrong it should be a simple fix |
Late to the party but this came up yesterday in the development discord (starting at https://discord.com/channels/598523535169945603/598529174302490644/1214941012049535036 ). I've only seen it happening in the imgui demo menu, but per Katemonster: "Yeah this is a symptom of ImGui not being redrawn enough. Setting a timeout on your input_context will alleviate it for a screen you're working on" |
Describe the bug
When pressing W multiple times, the "key-down" switches between
:
and is one more behind with each key press. If you don't press enough keys, the rest is in the queue. You can go through the queue by wiggling the cursor for a short while.
W
andW
W
W
This is interesting, because if different keys are pressed (like
dbs
), then they are shown without being lateD
B
S
All in all, going through the demo menu is a bit painful, as the cursor has to be wiggled after each mouse click so that the mouse click is registered.
Attach save file
N/A
Steps to reproduce
WWWAAABCDEFGHI
(It ends atE
) wiggle mouse (cleared).ASDFGHJ
. See the difference (the second writes as expected, the first)Expected behavior
Actions aren't delayed.
Screenshots
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Portal Storms Ignore NPCs [personal_portal_storms],
Slowdown Fungal Growth [no_fungal_growth]
]
Additional context
You can see the same issues when writing text.
It has been fixed for writing text when searching in Keybindings.
You can see in
4. Imgui Demo Screen
5. Widgets
6. Plotting
That some graphs don't redraw at all, as Imgui isn't redrawn. That is not an issue. But not processing input right away is.
(still picture of plots that aren't animated........)
The text was updated successfully, but these errors were encountered: