Skip to content
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

When choosing direction to light a fire, character position may be hidden behind popup #37036

Closed
wapcaplet opened this issue Jan 14, 2020 · 2 comments · Fixed by #37401
Closed
Labels
Info / User Interface Game - player communication, menus, etc.

Comments

@wapcaplet
Copy link
Contributor

wapcaplet commented Jan 14, 2020

Describe the bug

When "a" activating a disposable or refillable lighter, the "What to do with your lighter" popup stays in the middle of the screen after selecting an option, possibly hiding the character and surroundings and making direction-selection risky.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Zoom out to max or near-max
  2. Approach something you want to burn
  3. Press "a" to activate a lighter, and select "Start a fire quickly"
  4. Choose a direction if you dare

Expected behavior

Upon selecting a menu entry from the "What to do with your lighter?" popup, I am done with that popup and expect it to go away.

Screenshots

Here, the popup just barely obscures my character and the stove to his right. With a wider zoom, the whole 9-tile surroundings is hidden. I already pressed "1" to "Start a fire quickly".

image

Versions and configuration

  • OS: Linux
    • OS Version: LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch; Distributor ID: Ubuntu; Description: Ubuntu 18.04.3 LTS; Release: 18.04; Codename: bionic;
  • Game Version: 0.D-11170-g64b5e04a6b [64-bit]
  • Graphics Version: Tiles
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    No Rail Stations [No_Rail_Stations]
    ]
@Night-Pryanik Night-Pryanik added the Info / User Interface Game - player communication, menus, etc. label Jan 19, 2020
@wapcaplet
Copy link
Contributor Author

wapcaplet commented Jan 25, 2020

This affects other items with multiple "activation" uses; for instance when activating an entrenching tool or Halligan bar, the same kind of popup menu is displayed for selecting an action. Some of these need a direction (prying a door, digging a pit) and will have the same UI issue.

The width of the popup seems to depend on how long the name of the tool is; for "Halligan bar" (12 characters) there is less chance of overlap than there is with "refillable lighter" (18 characters), at least on my particular resolution/tileset/font:

image

image

Finally poring through the code myself, I figure we're inside the query method called from avatar::invoke_item here:

umenu.query();

It looks like below this is some core UI event handling (and invoke_item is called all over the place), so I am hesitant to mess around with dismissing or hiding menus, given that menu navigation and action canceling is already inconsistent at best.

I may take a crack at fixing this in my fork, but would certainly appreciate input from other developers about how to approach it, or whether it's worth the effort.

@wapcaplet
Copy link
Contributor Author

Pulled/compiled the fix in #37401 and confirmed that it works for me - the popup gracefully gets out of the way after selecting an option now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Info / User Interface Game - player communication, menus, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants