Skip to content

Commit 66b0025

Browse files
Banane9art0007i
andcommitted
Center content of notifications
Co-authored-by: art0007i <art0007i@gmail.com>
1 parent 1290383 commit 66b0025

File tree

5 files changed

+40
-3
lines changed

5 files changed

+40
-3
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using FrooxEngine;
2+
using HarmonyLib;
3+
using MonkeyLoader.Resonite;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Text;
7+
8+
// Originally released under MIT-0 here:
9+
// https://github.com/art0007i/NotificationFixer
10+
11+
namespace CommunityBugFixCollection
12+
{
13+
[HarmonyPatchCategory(nameof(CenteredNotifications))]
14+
[HarmonyPatch(typeof(NotificationPanel), nameof(NotificationPanel.OnCommonUpdate))]
15+
internal class CenteredNotifications : ResoniteMonkey<CenteredNotifications>
16+
{
17+
public override IEnumerable<string> Authors => Contributors.Art0007i;
18+
19+
public override bool CanBeDisabled => true;
20+
21+
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> codes)
22+
{
23+
foreach (var code in codes)
24+
{
25+
if (Enabled && code.LoadsConstant(36.0f))
26+
code.operand = 32.0f;
27+
28+
yield return code;
29+
}
30+
}
31+
}
32+
}

CommunityBugFixCollection/DuplicateAndMoveMultipleGrabbedItems.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
using Elements.Core;
22
using FrooxEngine;
3-
using FrooxEngine.ProtoFlux.Runtimes.Execution.Nodes.FrooxEngine.Slots;
43
using FrooxEngine.Undo;
54
using HarmonyLib;
65
using MonkeyLoader.Resonite;
76
using System;
87
using System.Collections.Generic;
98
using System.Linq;
109
using System.Text;
10+
1111
using static FrooxEngine.Worker;
1212

1313
// This code is mainly decompiled Resonite source code,

CommunityBugFixCollection/Locale/de.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77

88
"CommunityBugFixCollection.CopyToClipboard": "In Zwischenablage kopieren",
99

10-
"CommunityBugFixCollection.CaseInsensitiveCustomGenerics.Description": "Macht das Auswählen von eigenen generischen Typparametern unabhängig von Groß- und Kleinschreibung.",
1110
"CommunityBugFixCollection.BreakDragAndDropCopiedComponentDrives.Description": "Sorgt dafür, dass Drives beim Kopieren von Komponenten mittels Drag-und-Drop nicht kaputt gehen.",
1211
"CommunityBugFixCollection.BreakDuplicatedComponentDrives.Description": "Sorgt dafür, dass Drives beim Duplizieren von Komponenten nicht kaputt gehen.",
12+
"CommunityBugFixCollection.CaseInsensitiveCustomGenerics.Description": "Macht das Auswählen von eigenen generischen Typparametern unabhängig von Groß- und Kleinschreibung.",
13+
"CommunityBugFixCollection.CenteredNotifications.Description": "Zentriert den Inhalt von Benachrichtigungen.",
1314
"CommunityBugFixCollection.CheckSelfForDuplicateSlot.Description": "Verhindert einen Crash wenn der OverrideParent bei der Duplicate Slot ProtoFlux Node gleich dem Template ist.",
1415
"CommunityBugFixCollection.ColorDisplayValueProxy.Description": "Sorgt dafür, dass ValueDisplay<color> Nodes eine ValueProxySource Komponente haben.",
1516
"CommunityBugFixCollection.ColorXNodeNamesSpacing.Description": "Korrigiert die Schreibweise der Namen von ProtoFlux Nodes die ColorX enthalten.",

CommunityBugFixCollection/Locale/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77

88
"CommunityBugFixCollection.CopyToClipboard": "Copy to Clipboard",
99

10-
"CommunityBugFixCollection.CaseInsensitiveCustomGenerics.Description": "Makes picking custom generic type parameters case-insensitive.",
1110
"CommunityBugFixCollection.BreakDragAndDropCopiedComponentDrives.Description": "Fixes copying components using drag-and-drop breaking drives.",
1211
"CommunityBugFixCollection.BreakDuplicatedComponentDrives.Description": "Fixes duplicating components breaking drives.",
12+
"CommunityBugFixCollection.CaseInsensitiveCustomGenerics.Description": "Makes picking custom generic type parameters case-insensitive.",
13+
"CommunityBugFixCollection.CenteredNotifications.Description": "Centers the content of notifications.",
1314
"CommunityBugFixCollection.CheckSelfForDuplicateSlot.Description": "Fixes a crash when the OverrideParent of the Duplicate Slot ProtoFlux node is identical to the Template.",
1415
"CommunityBugFixCollection.ColorDisplayValueProxy.Description": "Fixes ValueDisplay<color> not having a ValueProxySource component.",
1516
"CommunityBugFixCollection.ColorXNodeNamesSpacing.Description": "Fixes ProtoFlux node names containing ColorX being spaced wrong.",

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ just disable them in the settings in the meantime.
4949
* Direct cursor size becoming very large when snapped to an object much closer than the true cursor (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/3654)
5050
* DuplicateSlot ProtoFlux node crashes game when if OverrideParent is identical to Template (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/3950)
5151

52+
Fixes with no issue (that could be found).
53+
* Content of notification being off-center.
54+
5255

5356
## Workarounds
5457

0 commit comments

Comments
 (0)