Skip to content

Close inventory menus by pressing E#746

Closed
DanilochTop wants to merge 2 commits intosmartcmd:mainfrom
DanilochTop:main
Closed

Close inventory menus by pressing E#746
DanilochTop wants to merge 2 commits intosmartcmd:mainfrom
DanilochTop:main

Conversation

@DanilochTop
Copy link

Description

This PR introduces the feature to close inventory menus (such as inventory, crafting, furnace, etc) by pressing E.

Changes

Previous Behavior

Most inventory menus didn't respond to the E key press, except for crafting menus, which used this key to scroll through options.

Root Cause

Design flaw.

New Behavior

All inventory menus now respond to the E key press, allowing player to close them by doing such. The crafting inventory and other ones that use it for scrolling have their functionality intact.

Fix Implementation

I just added a check for the ACTION_MENU_RIGHT_SCROLL enum value on the switch case in function handleKeyDown from class IUIScene_AbstractContainerMenu.cpp.

AI Use Disclosure

AI was used solely to find the code responsible for that.

Related Issues

  • Fixes No fix
  • Related to No issue

@Kilan61
Copy link

Kilan61 commented Mar 6, 2026

W

@codeHusky
Copy link
Collaborator

Unsure if this is a good solution for maintaining existing functionality on controller considering this isn't a KBM specific action

@DanilochTop
Copy link
Author

I see. I also thought about this, but I was unsure if the handle**Key**Down function was specific to KBM input. I will implement a better solution.

@codeHusky codeHusky marked this pull request as draft March 6, 2026 21:45
@DanilochTop DanilochTop marked this pull request as ready for review March 6, 2026 22:13
@codeHusky
Copy link
Collaborator

Fixed via different strategy in an earlier PR

@codeHusky codeHusky closed this Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants