Skip to content

Commit

Permalink
2023.7.11
Browse files Browse the repository at this point in the history
  • Loading branch information
js6pak committed Jul 12, 2023
1 parent f63569d commit 6eb0bf1
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion AmongUs.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<ItemGroup>
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.670" Private="false" ExcludeAssets="runtime;native" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2023.6.13" PrivateAssets="all" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2023.7.11" PrivateAssets="all" />

<PackageReference Include="BepInEx.AutoPlugin" Version="1.1.0" PrivateAssets="all" />
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.0.1" PrivateAssets="all" ExcludeAssets="runtime" />
Expand Down
6 changes: 3 additions & 3 deletions Reactor.Benchmarks/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net6.0": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2023.6.13, )",
"resolved": "2023.6.13",
"contentHash": "460jLKEZoVY33SlIYEgnV5zE/wEAb5fTxY32ddAV5JI03YmoK+/6D3A6yjpu1HlU/I99Y9s21aKXZY0xan2eSQ=="
"requested": "[2023.7.11, )",
"resolved": "2023.7.11",
"contentHash": "e5zbU+4AYnp1zAQDizO5GRIh1kemkgCa8rFVAcr9bxeupkBu5dwwdHxArWv/pUybIJTZfOPjkOnicZ2qKWLX7g=="
},
"BenchmarkDotNet": {
"type": "Direct",
Expand Down
6 changes: 3 additions & 3 deletions Reactor.Debugger/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net6.0": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2023.6.13, )",
"resolved": "2023.6.13",
"contentHash": "460jLKEZoVY33SlIYEgnV5zE/wEAb5fTxY32ddAV5JI03YmoK+/6D3A6yjpu1HlU/I99Y9s21aKXZY0xan2eSQ=="
"requested": "[2023.7.11, )",
"resolved": "2023.7.11",
"contentHash": "e5zbU+4AYnp1zAQDizO5GRIh1kemkgCa8rFVAcr9bxeupkBu5dwwdHxArWv/pUybIJTZfOPjkOnicZ2qKWLX7g=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
Expand Down
6 changes: 3 additions & 3 deletions Reactor.Example/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net6.0": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2023.6.13, )",
"resolved": "2023.6.13",
"contentHash": "460jLKEZoVY33SlIYEgnV5zE/wEAb5fTxY32ddAV5JI03YmoK+/6D3A6yjpu1HlU/I99Y9s21aKXZY0xan2eSQ=="
"requested": "[2023.7.11, )",
"resolved": "2023.7.11",
"contentHash": "e5zbU+4AYnp1zAQDizO5GRIh1kemkgCa8rFVAcr9bxeupkBu5dwwdHxArWv/pUybIJTZfOPjkOnicZ2qKWLX7g=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
Expand Down
15 changes: 10 additions & 5 deletions Reactor/Patches/ReactorVersionShower.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ public static class ReactorVersionShower
/// </summary>
public static event Action<TextMeshPro>? TextUpdated;

private static readonly Il2CppSystem.Action<float> _setMainMenuPositionFromAspect = (Action<float>) (aspect =>
private static void SetMainMenuPositionFromAspect(float aspectRatio)
{
if (Text == null) return;
var pos = new Vector3(-1.2287f * aspect + 10.9f, -0.57f, 4.5f);
var pos = new Vector3(-1.2287f * aspectRatio + 10.9f, -0.57f, 4.5f);
Text.transform.position = pos;
}

private static readonly ResolutionManager.ResolutionChangedHandler _resolutionChangedHandler = (Action<float, int, int, bool>) ((aspectRatio, _, _, _) =>
{
SetMainMenuPositionFromAspect(aspectRatio);
});

internal static void Initialize()
Expand Down Expand Up @@ -57,12 +62,12 @@ internal static void Initialize()
if (scene.name == "MainMenu")
{
ResolutionManager.add_ResolutionChanged(_setMainMenuPositionFromAspect);
_setMainMenuPositionFromAspect.Invoke(Screen.width / (float) Screen.height);
ResolutionManager.add_ResolutionChanged(_resolutionChangedHandler);
SetMainMenuPositionFromAspect(Screen.width / (float) Screen.height);
}
else
{
ResolutionManager.remove_ResolutionChanged(_setMainMenuPositionFromAspect);
ResolutionManager.remove_ResolutionChanged(_resolutionChangedHandler);
var aspectPosition = gameObject.AddComponent<AspectPosition>();
var distanceFromEdge = new Vector3(10.13f, 2.55f, -1);
if (originalAspectPosition.Alignment == AspectPosition.EdgeAlignments.LeftTop)
Expand Down
6 changes: 3 additions & 3 deletions Reactor/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net6.0": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2023.6.13, )",
"resolved": "2023.6.13",
"contentHash": "460jLKEZoVY33SlIYEgnV5zE/wEAb5fTxY32ddAV5JI03YmoK+/6D3A6yjpu1HlU/I99Y9s21aKXZY0xan2eSQ=="
"requested": "[2023.7.11, )",
"resolved": "2023.7.11",
"contentHash": "e5zbU+4AYnp1zAQDizO5GRIh1kemkgCa8rFVAcr9bxeupkBu5dwwdHxArWv/pUybIJTZfOPjkOnicZ2qKWLX7g=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
Expand Down

0 comments on commit 6eb0bf1

Please sign in to comment.