Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #12 from FelkonEx/updates-2021-07-14
Browse files Browse the repository at this point in the history
Updating UIX to build FavCatRestored with.
 - Based on knah@4e85998
  • Loading branch information
FelkonEx authored Jul 14, 2021
2 parents b683d28 + 4b8b11d commit 8fb950c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion FavCat/FavCat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<ClearOutputDirectory>False</ClearOutputDirectory>
<AssemblyVersion>1.1.5.0</AssemblyVersion>
<AssemblyVersion>1.1.5.2</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.9" />
Expand Down
2 changes: 1 addition & 1 deletion FavCat/FavCatMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
using ImageDownloaderClosure = ImageDownloader.__c__DisplayClass11_1;
using Object = UnityEngine.Object;

[assembly:MelonInfo(typeof(FavCatMod), "FavCatRestored", "1.1.5", "Felkon (Original By Knah)", "https://github.com/FelkonEx/FavCat-Restored")]
[assembly:MelonInfo(typeof(FavCatMod), "FavCatRestored", "1.1.5.2", "Felkon (Original By Knah)", "https://github.com/FelkonEx/FavCat-Restored")]
[assembly:MelonGame("VRChat", "VRChat")]

namespace FavCat
Expand Down
6 changes: 5 additions & 1 deletion UIExpansionKit/API/ExpansionKitApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static class ExpansionKitApi
internal static readonly Dictionary<string, GameObject> CustomCategoryUIs = new Dictionary<string, GameObject>();
internal static readonly Dictionary<string, CustomLayoutedPageImpl> SettingPageExtensions = new Dictionary<string, CustomLayoutedPageImpl>();
internal static readonly List<IEnumerator> ExtraWaitCoroutines = new List<IEnumerator>();
internal static bool CanAddWaitCoroutines = true;

internal static readonly Dictionary<(string, string), IList<(string SettingsValue, string DisplayName)>> EnumSettings = new Dictionary<(string, string), IList<(string SettingsValue, string DisplayName)>>();

Expand Down Expand Up @@ -120,7 +121,10 @@ internal class ButtonRegistration
/// </summary>
public static void RegisterWaitConditionBeforeDecorating(IEnumerator coroutine)
{
ExtraWaitCoroutines.Add(coroutine);
if (CanAddWaitCoroutines)
ExtraWaitCoroutines.Add(coroutine);
else
throw new InvalidOperationException("UIX init is already running or is complete, it's too late to register wait conditions");
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion UIExpansionKit/UIExpansionKit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<VrcReferences>true</VrcReferences>
<LangVersion>latest</LangVersion>
<UseAltLibs>true</UseAltLibs>
<AssemblyVersion>0.3.2.0</AssemblyVersion>
<AssemblyVersion>0.3.3.0</AssemblyVersion>
<DefineConstants>CUSTOMIZED_MOD_INTERNAL</DefineConstants>
</PropertyGroup>
<ItemGroup>
Expand Down
16 changes: 11 additions & 5 deletions UIExpansionKit/UiExpansionKitMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using MelonLoader;
using UIExpansionKit;
Expand All @@ -14,7 +15,7 @@
using VRCSDK2;
using Object = UnityEngine.Object;

[assembly:MelonInfo(typeof(UiExpansionKitMod), "UI Expansion Kit", "0.3.2", "knah", "https://github.com/knah/VRCMods")]
[assembly:MelonInfo(typeof(UiExpansionKitMod), "UI Expansion Kit", "0.3.3", "knah", "https://github.com/knah/VRCMods")]
[assembly:MelonGame("VRChat", "VRChat")]

namespace UIExpansionKit
Expand Down Expand Up @@ -54,9 +55,9 @@ internal class UiExpansionKitMod : CustomizedMelonMod
(ExpandedMenu.InvitesTab, "UserInterface/QuickMenu/QuickModeMenus/QuickModeNotificationsMenu", false),
};

private readonly Dictionary<ExpandedMenu, GameObject> myMenuRoots = new Dictionary<ExpandedMenu, GameObject>();
private readonly Dictionary<ExpandedMenu, GameObject> myVisibilitySources = new Dictionary<ExpandedMenu, GameObject>();
private readonly Dictionary<ExpandedMenu, bool> myHasContents = new Dictionary<ExpandedMenu, bool>();
private readonly Dictionary<ExpandedMenu, GameObject> myMenuRoots = new();
private readonly Dictionary<ExpandedMenu, GameObject> myVisibilitySources = new();
private readonly Dictionary<ExpandedMenu, bool> myHasContents = new();

public PreloadedBundleContents StuffBundle => myStuffBundle;

Expand Down Expand Up @@ -128,7 +129,10 @@ private IEnumerator InitThings()
}
}

foreach (var coroutine in ExpansionKitApi.ExtraWaitCoroutines)
var waitConditions = ExpansionKitApi.ExtraWaitCoroutines.ToList();
ExpansionKitApi.ExtraWaitCoroutines.Clear();
ExpansionKitApi.CanAddWaitCoroutines = false;
foreach (var coroutine in waitConditions)
{
while (true)
{
Expand Down Expand Up @@ -292,6 +296,8 @@ private void DecorateCamera()
var content = transform.Find("Content");
toggleButton.gameObject.AddUiShapeWithTriggerCollider();
content.gameObject.AddUiShapeWithTriggerCollider();
toggleButton.localScale *= 3;
toggleButton.localPosition += Vector3.left * 60;
var toggleComponent = toggleButton.GetComponent<Toggle>();

if (ExpansionKitSettings.IsCameraExpandoStartsCollapsed())
Expand Down

0 comments on commit 8fb950c

Please sign in to comment.