-
-
Notifications
You must be signed in to change notification settings - Fork 874
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
Change: Make order window hotkeys toggle for load & unload variants #8669
Conversation
Basically, before this PR: With this PR: This makes a lot more sense to me, especially as the button isn't pressed if you select anything not on the button. In general, really funky mechanics here, but okay .. that is old news :D |
Some more testing, two observations:
Both changes are introduced by this PR. 1) is a bug, and about 2) I am not sure that makes sense. It feels a bit odd, honestly. Wouldn't it be better to only have this behaviour for hotkeys, and not do this for the dropdown? Would be easy enough in the code by adding a parameter to "force" or to "toggle" (depending if you make the dropdown or the hotkey the exception). Was 2) intended, and what do you think about it yourself? |
src/order_gui.cpp
Outdated
@@ -1262,15 +1244,15 @@ struct OrdersWindow : public Window { | |||
|
|||
case WID_O_FULL_LOAD: | |||
if (this->GetWidget<NWidgetLeaf>(widget)->ButtonHit(pt)) { | |||
this->OrderClick_FullLoad(-1); | |||
this->OrderClick_FullLoad(OLF_FULL_LOAD_ANY); |
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.
these should be toggle=true
too I think (and the one with UNLOAD
too, ofc :P)
Motivation / Problem
Closes #8661
Order window hotkeys for load & unload behave unexpectedly - most of them only set, not toggle
Description
Makes all the variants toggle between the default (load - "load if possible", unload - "unload if possible") and whatever setting is desired
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.