Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net10.0</TargetFramework>
<Version>0.28.1-beta</Version>
<RootNamespace>MonkeyLoader.Resonite</RootNamespace>
<LangVersion>13.0</LangVersion>
<LangVersion>14.0</LangVersion>
<Nullable>enable</Nullable>
<Deterministic>true</Deterministic>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal sealed class ForceUpdateFacets : ResoniteEventHandlerMonkey<ForceUpdate
public override int Priority => HarmonyLib.Priority.Normal;

protected override bool AppliesTo(TemplateFacetPresetLoadedEvent eventData)
=> true;
=> true; // Always need to add the button so it shows up when enabled

protected override void Handle(TemplateFacetPresetLoadedEvent eventData)
{
Expand Down Expand Up @@ -56,8 +56,9 @@ protected override void Handle(TemplateFacetPresetLoadedEvent eventData)

// Place into upper-right corner with fixed size
button.RectTransform.AnchorMin.Value = float2.One;
button.RectTransform.AnchorMin.Value = float2.One;
button.RectTransform.OffsetMin.Value = new(-32, -32);
button.RectTransform.AnchorMax.Value = float2.One;
button.RectTransform.OffsetMin.Value = -34 * float2.One;
button.RectTransform.OffsetMax.Value = -2 * float2.One;

button.ColorDrivers.Clear();
button.ColorDrivers.Add().ColorDrive.Target = button.Slot[0].GetComponent<Image>().Tint;
Expand All @@ -66,10 +67,10 @@ protected override void Handle(TemplateFacetPresetLoadedEvent eventData)
protected override bool OnComputeDefaultEnabledState()
{
_wasEnabledFromDefault = true;

return true;
}

// Always need to add the button so it shows up when enabled
protected override bool OnEngineReady()
{
EnabledToggle!.Add(_enabledSessionShare);
Expand Down
4 changes: 3 additions & 1 deletion MonkeyLoaderWrapper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ private static async Task Main(string[] args)
// TODO: Should not be necessary anymore with the hookfxr changes. Either way, should be done by the load context
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
{
if (assembly.GetName().Name == "SoundFlow") continue;
if (assembly.GetName().Name is "SoundFlow" or "SharpFont")
continue;

NativeLibrary.SetDllImportResolver(assembly, ResolveNativeLibrary);
}

Expand Down
Loading