-
Notifications
You must be signed in to change notification settings - Fork 152
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
Cancel roadbuilding with Esc key #6456
Cancel roadbuilding with Esc key #6456
Conversation
Mirrored on Codeberg as #CB4818. |
Okay, currently while this is working for cancelling road & water building mode, it however breaks the Esc shortcut for opening the in-game main menu. Anyone have any advice on how do I solve this? Sorry, I'm new to the project (and coding tbf). |
Mirrored from Codeberg Hi cloudyluna and welcome to Widelands!
Instead of defining a new hotkey, you should check for road/waterway building mode right in the |
53fd749
to
972fc9d
Compare
…c-key' of codeberg.org:wl/widelands into mirror/cloudyluna/widelands/cancel-roadbuilding-with-esc-key
Thanks for the warm welcome and the pointer! This works! 😄 My previous attempt was unnecessarily complicated, indeed. I've rebased my PR/MR to apply your suggestion. though I probably need to run code formatter on my end before pushing the changes in future. 😅 Also, I don't think there's a need to update in-game documentation docs because it's not a new hotkey addition so I believe we're good here? |
I've rebased my commits to a single (the latest) commit and force pushed it here but it seems the old commits still persists for some reason which still keeps breaking the CI. I'm not sure what really is going on here, but let me know if I need to fix anything with git on my end. |
Mirrored from Codeberg
You have to do the revert in a new commit. Our mirror bot cannot deal with force-pushed updates at all, and they're best avoided both on github and on codeberg in PR branches anyway. PRs are merged in a single ("squashed") commit, so master commit history stays clean even if the PR branch was messy. |
Thanks for the explanation. I've reverted the offending commits and hopefully (finger crossed) the CI will pass this time. |
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.
Mirrored from Codeberg
On Tue May 21 19:09:42 CEST 2024, Tóth András (tothxa) approved this pull request:
Thank you. Tested and works.
ci is green, PR is approved so |
The pull request was merged in the mirrored repo, but the head branch could not be deleted (error code 404). Please delete the branch manually. |
hi @cloudyluna thanks for your first contribution to this project. |
@hessenfarmer :) hmm I assume by credits you mean the in-game window credits? Using this handle: |
Type of change
New feature
Issue(s) closed
Fixes #6284
New behavior
Player now can cancel both road and waterway building with just Esc key for convenience.
Additional context
TODO: