fix(studio): mainMenu.show подхватывает opts.onPlay/onShow/onHide (порт)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
min 2026-06-06 12:17:43 +03:00
parent ba90bf5c7d
commit e477d652f6

View File

@ -2593,6 +2593,10 @@ const game = {
opts = opts && typeof opts === 'object' ? opts : {};
this._opts = opts;
this._active = true;
// Колбэки можно передавать прямо в опциях show({ onPlay, onShow, onHide }).
if (typeof opts.onPlay === 'function') this._onPlay.push(opts.onPlay);
if (typeof opts.onShow === 'function') this._onShow.push(opts.onShow);
if (typeof opts.onHide === 'function') this._onHide.push(opts.onHide);
// 1) Заблокировать управление игроком (наблюдатель).
_send('player.setInputBlocked', { blocked: true });
game.hud.setVisible(false);