Ejemplo n.º 1
0
        public override void VRChat_OnUiManagerInit()
        {
            ClassInjector.RegisterTypeInIl2Cpp <EnableDisableListener>();
            Config.RegisterSettings();

            // Initialize Constants util
            Constants.UIInit();

            LoadAssetBundle();

            // Initialize UIManager
            UIManager.Init();

            // Initialize submenu for the list
            MenuManager.CreateMainSubMenu();

            // TODO: Add opacity options, maybe color too, (maybe even for each stage of ping and fps??)

            MenuManager.AddMenuListeners();
            MenuManager.CreateSubMenus();
            PlayerEntry.Patch(Harmony);
            EntryManager.AddGeneralInfoEntries();
            MenuManager.CreateGeneralInfoSubMenus();
            MenuManager.AdjustSubMenus();

            // Initialize on leave and join events
            NetworkHooks.NetworkInit();
            NetworkHooks.OnPlayerJoin  += new Action <Player>((player) => OnPlayerJoin(player));
            NetworkHooks.OnPlayerLeave += new Action <Player>((player) => OnPlayerLeave(player));

            MelonLogger.Msg("Initialized!");
        }
Ejemplo n.º 2
0
        public void OnUiManagerInit()
        {
            // Initialize Constants util
            Constants.UIInit();

            // TODO: Add opacity options, maybe color too, (maybe even for each stage of ping and fps??)
            // TODO: add indicator for those in hearing distance

            MenuManager.LoadAssetBundle();

            // Initialize submenu for the list
            MenuManager.CreateMainSubMenu();

            // This is kinda a mess but whatever
            MenuManager.AddMenuListeners();
            MenuManager.CreateSortPages();
            MenuManager.CreateSubMenus();
            EntryManager.AddGeneralInfoEntries();
            MenuManager.CreateGeneralInfoSubMenus();
            MenuManager.AdjustSubMenus();

            PlayerListConfig.OnConfigChange(false);

            MelonLogger.Msg("Initialized!");
        }