-
Notifications
You must be signed in to change notification settings - Fork 256
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
Refactor 'Examine inventory item' menu #1802
Refactor 'Examine inventory item' menu #1802
Conversation
Much cleaner! One thing I don't get: why is throwing implemented as a long action now? |
if( get_option<bool>( "ANDROID_INVENTORY_AUTOADD" ) ) { | ||
add_key_to_quick_shortcuts( oThisItem.invlet, "INVENTORY", false ); | ||
} | ||
#endif |
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.
I don't see an equivalent Android special case in the new version. Is it no longer needed?
I could try testing it on an emulator, but it's rather painful to set it up.
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.
Oh, crap, I forgot this was a thing.
Not completely sure what it's needed for actually, I'll have to poke the original version on the phone.
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.
Update: I don't get it. Compiled a release with this PR, and I fail to see any difference before and after in-game.
It's needed for AIM hiding logic. |
Evil, but good enough for now. |
Summary
SUMMARY: Interface "Refactored 'Examine inventory item' menu"
Purpose of change
Current problems with this menu:
input_context
and assignable keybindings were a thinggame
rate_action_x
) can be found in all 3 ofCharacter
,player
andavatar
game
class orCharacter
family, or functions fromavatar_action
namespacehint_rating
) is defined initem.h
rate_action_x
) are getting used in some other places in the code, which works, but feels way too hacky for my tasteDescribe the solution
examine_item_menu.h
/.cpp
hint_rating
enum and allrate_action_x
functions there, both declarations and definitionsrate_action_x
usages outside this menu, rewrite relevant bits. Tweak somerate_action_x
functions for bugfixing/untangling purposes.item_functions.h
/.cpp
to same purpose ascharacter_functions.h
/.cpp
andmap_functions.h
/.cpp
game
class, either dissolve them or move toavatar_action
namespace as functionsinput_context
with keybinds and action names defined in JSON fileTesting
Tried actions in the menu, tried throwing (and peek-throwing) items, scrolling and resizing the menu.
Additional context
Resizing doesn't always work perfectly with AIM, but it doesn't crash.