Skip to content
This repository was archived by the owner on Jan 24, 2023. It is now read-only.

Commit 6982461

Browse files
committed
Fixed OnOpen not firing when opening a button page via tab buttons.
1 parent 3cde8e2 commit 6982461

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

UI/QuickMenu/ReCategoryPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Linq;
3+
using ReMod.Core.Unity;
34
using ReMod.Core.VRChat;
45
using TMPro;
56
using UnityEngine;
@@ -95,6 +96,8 @@ public ReCategoryPage(string text, bool isRoot = false) : base(MenuPrefab, Quick
9596
rootPages.Add(UiPage);
9697
QuickMenuEx.MenuStateCtrl.field_Public_ArrayOf_UIPage_0 = rootPages.ToArray();
9798
}
99+
100+
GameObject.AddComponent<EnableDisableListener>().OnEnableEvent += () => OnOpen?.Invoke();
98101
}
99102

100103
public ReCategoryPage(Transform transform) : base(transform)

UI/QuickMenu/ReMenuPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Linq;
3+
using ReMod.Core.Unity;
34
using ReMod.Core.VRChat;
45
using TMPro;
56
using UnityEngine;
@@ -116,6 +117,8 @@ public ReMenuPage(string text, bool isRoot = false) : base(MenuPrefab, QuickMenu
116117
rootPages.Add(UiPage);
117118
QuickMenuEx.MenuStateCtrl.field_Public_ArrayOf_UIPage_0 = rootPages.ToArray();
118119
}
120+
121+
GameObject.AddComponent<EnableDisableListener>().OnEnableEvent += () => OnOpen?.Invoke();
119122
}
120123

121124
public ReMenuPage(Transform transform) : base(transform)

0 commit comments

Comments
 (0)