Mouse blocks keyboard menu interaction
Describe the bug
Refers to playing with default keyboard controls on pc.
Open action menu by pressing enter. Press up/down and observe what happens.
Attach save file
N/A trivial
Steps to reproduce
Press enter, then press up/down.
Expected behavior
Pressing up/down should move the highlighted selection in the list up/down.
Screenshots
No response
Versions and configuration
- OS: Linux
- OS Version:
- OS Version:
- Game Version: cdda-experimental-2024-08-25-0446 5237214 [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth], Mythical Martial Arts [MMA], Bombastic Perks [bombastic_perks], Mind Over Matter [mindovermatter] ]
Additional context
No response
Failed to reproduce.
The up/down arrow keys move the cursor.
Hmm yeah - it must be in some specific circumstance only. I'll post back with more details.
Please post your options.json here
My option are just default.
Somehow I got the bug to come back - it affects all menus not just action menu. Symptom is cant move up/down.
Not sure how it gets into this state - still testing. After alt-tabbing and back it fixes itself. Notice how it seems 2 items are selected at same time.
https://github.com/user-attachments/assets/01efda93-eb46-47b0-b864-41e45d854751
Seems that the inputs of mouse have a higher priority in the ImGui. When the cursor of mouse is on the selection, the inputs of arrow keys will be disrupted.
You are right - it's caused by the mouse. But in a really non-obvious way!
If you accidentally move the mouse into a certain part of hte screen, the pointer will always screw up the dialogs.
Suggested fix: if player press a key it should override any previous mouse ui interaction.
This is a side effect of something we're doing wrong in how we use ImGui. I haven’t quite narrowed it down, but it is either due to the fact that we don’t run ImGui at a constant frame rate (instead we wait for input and only update when we get it), or in how we handle mouse input.
As a result I had to write the code to check the mouse position myself, and I deliberately went with an unsophisticated implementation. In addition to this quirk (which I knew about but didn’t expect anyone to think of as a bug), it causes a more severe (and unexpected) problem on long scrolling menus like the item spawn menu. Fixing those problems is easy, but then hovering works correctly while clicking on menu items does nothing. I’ve been working on the underlying problem instead.
Issue is present again in latest version. Debug Map editor unusable due to maybe mouse input? But mouse is still. Menu selection jumps around uncontrollably.
- OS: Windows
- OS Version: 10.0.19045.4894 (22H2)
- Game Version: abbb6ce [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth], No Hope [no_hope], SpeedyDex [speedydex], Stats Through Kills [stats_through_kills], Stats Through Skills [StatsThroughSkills], Tamable Wildlife [Tamable_Wildlife], No Monsters [Only_Wildlife], Massachusetts [MA], <color_light_blue>Lighter Weariness [light_weariness], Railroads [railroads], Generic Guns [generic_guns] ]
Are you referring to an issue like #76215?