mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 15:47:18 +02:00
Fix Bx button in Guide menu not working
This commit is contained in:
parent
cb66340177
commit
4e736175b4
@ -41,7 +41,7 @@ export class GuideMenu {
|
|||||||
style: ButtonStyle.FULL_WIDTH | ButtonStyle.FOCUSABLE | ButtonStyle.PRIMARY,
|
style: ButtonStyle.FULL_WIDTH | ButtonStyle.FOCUSABLE | ButtonStyle.PRIMARY,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
// Wait until the Guide dialog is closed
|
// Wait until the Guide dialog is closed
|
||||||
BxEventBus.Script.once('xcloudDialogDismissed', () => {
|
BxEventBus.Script.once('dialog.dismissed', () => {
|
||||||
setTimeout(() => SettingsDialog.getInstance().show(), 50);
|
setTimeout(() => SettingsDialog.getInstance().show(), 50);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ export class BxEventBus<TEvents extends Record<string, any>> {
|
|||||||
BX_FLAGS.Debug && BxLogger.warning('EventBus', 'on', event, callback);
|
BX_FLAGS.Debug && BxLogger.warning('EventBus', 'on', event, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
once<K extends keyof TEvents>(event: string, callback: EventCallback<TEvents[K]>): void {
|
once<K extends keyof TEvents>(event: K, callback: EventCallback<TEvents[K]>): void {
|
||||||
const wrapper = (...args: any[]) => {
|
const wrapper = (...args: any[]) => {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
callback(...args);
|
callback(...args);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user