-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add reset button (Incomplete, work needed) #8589
Conversation
src/gui/guiKeyChangeMenu.cpp
Outdated
@@ -377,6 +416,10 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) | |||
case GUI_ID_ABORT_BUTTON: //abort | |||
quitMenu(); | |||
return true; | |||
case GUI_ID_RESET_BUTTON: //reset | |||
resetInput(); | |||
quitMenu(); |
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.
Instead of quitting the menu, it needs to be updated somehow.
Why is this needed? Keybindings are changed occasionally one by one as required. |
In the case of someone wanting to reset them all, they don't have to delete |
Ok, but why would they want to reset them all? This would be very rarely needed as players do not suddenly revert their controls to default one day. Changing controls is done one by one gradually. |
True. Something or some way is needed to reset the keys other than deleting |
Partially related: #8282 uses the keys to clear the contents. |
Oh, oops I didn't come across that. |
The reset all button could be pressed on accident, which might be very annoying. |
@DS-Minetest That's why it might need an "Are you sure" popup like I mentioned above. |
Done! Everything seems to work fine now. |
No progress for 6 months and seems mostly unnecessary. |
Ref: #8064
![keys](https://user-images.githubusercontent.com/49789044/59209008-42038300-8ba2-11e9-946e-c2f8d4aa815a.png)
Adds a reset button for the keys.
Here's the process:
There are a few problems. It's my first time programming in
C++
so some parts of the code are incorrect.quitMenu();
290
), instead of getting the list of keys from the settings script or elsewhere. The array isn't initialized properly either.acceptInput()
and used it as a template, but some of the code might not be needed.Tasks:
Segmentation fault (core dumped)
error.