1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-09 16:21:51 +00:00

Always detach HUDSettingsMenu input receiver

Add a cleanup override for HUDSettingsMenu that detaches its input
receiver in case it is attached (i.e. when using the menu buttons to
open settings or return to main menu).
This commit is contained in:
Даниїл Григор'єв 2025-07-21 17:25:40 +03:00
parent 6366aa61dd
commit 2e15a2f6d2
No known key found for this signature in database
GPG Key ID: B890DF16341D8C1D

View File

@ -123,6 +123,13 @@ export class HUDSettingsMenu extends BaseHUDPart {
this.update();
}
cleanup() {
super.cleanup();
// Detach the input receiver when leaving InGameState
this.root.app.inputMgr.makeSureDetached(this.inputReceiver);
}
update() {
this.domAttach.update(this.visible);
}