Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 477a685

Browse files
committed
Update README.md
1 parent f8f9671 commit 477a685

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,23 @@ CppExplorer can force the mouse to be visible and unlocked when the menu is open
117117
* For Hellpoint, use [HPExplorerMouseControl](https://github.com/sinai-dev/Hellpoint-Mods/tree/master/HPExplorerMouseControl/HPExplorerMouseControl)
118118
* You can create your own plugin using one of the two plugins above as an example. Usually only a few simple Harmony patches are needed to fix the problem.
119119

120+
For example:
121+
```csharp
122+
using Explorer;
123+
using Harmony;
124+
// ...
125+
[HarmonyPatch(typeof(MyGame.MenuClass), nameof(MyGame.MenuClass.CursorUpdate)]
126+
public class MenuClass_CursorUpdate
127+
{
128+
[HarmonyPrefix]
129+
public static bool Prefix()
130+
{
131+
// prevent method running if menu open, let it run if not.
132+
return !CppExplorer.ShowMenu;
133+
}
134+
}
135+
```
136+
120137
## Building
121138

122139
If you'd like to build this yourself, everything you need (other than MelonLoader) is included with this repository, there is no need for recursive cloning etc.

0 commit comments

Comments
 (0)