-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[E]ating menu stays open on last item #29148
Conversation
I must say, I'm really excited about this PR. |
Seems to work ok, but I'm not clear on why the item favoriting is in here... Need to read the code a bit more. |
Yeah I built the changes on the first commit of the favorite system (was in another PR that I closed), because I changed parts of the menus. The first PR I marked it dependent to is closed, but #29287 builds on the first commit too. I can rebase the favoriting change out if you want, or if you just take look at #29287 first, it'll be easier if/once it gets merged. Edit: Yeah after toying with the UI code for the past week I'm gonna need to clean this PR out before it gets merged. I'm definitely not gonna keep using item_location and an extra argument for going back to the previous spot in inventory. I'll use UI positioning (active column, active row) instead and store it in the activity. It'll be cleaner, but I'll want to wait on that favorite system merge first, in case it gets amended (or straight up rejected), since it needs some of the changes I made there. |
What's the status of this PR? |
I started remaking it from scratch. I'm not super happy with it, it's still pretty hacky and I don't have much time on my hands these days so can't give an ETA, but whenever I can dedicate an hour or two to it, I'll push a new commit out. |
Alright it's good to go now. Code isn't perfect, I decided to have some more specific code in inv_internal, and that's not amazing, but any other menu using Alternative would be a pretty length rework of UI, storing menu related entries in the player object (which was my second choice), or generally carrying values back up the stack, which I'm really not fond of. Of course I'm open to suggestions if someone sees a cleaner way to do this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me!
Summary
SUMMARY: Interface "[E]ating menu now stays open on the last consume item"
This commit is dependent on
#29129#29287 now I guessPurpose of change
Fixes #26879
Fixes #23178
The ability to streamline the consumption of items and avoid repetitive menuing has been requested for quite some time, as continuously reopening the menu and scrolling down a potentially long list of consumables can be annoying and prone to errors.
Describe the solution
The net effect of this change is that the selection menu will now stay open after consuming an item, and keep the selection cursor where it was.
This commit defines a new activity (
ACT_EAT
), that will reopen the menu automatically once the item has been consumed, and reselect the previous entry.