Skip to content
This repository was archived by the owner on Mar 12, 2022. It is now read-only.

Commit 3b87b0f

Browse files
committed
v1.0.9
1 parent d4871c7 commit 3b87b0f

4 files changed

Lines changed: 66 additions & 49 deletions

File tree

DesktopCamera.csproj

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,38 +39,38 @@
3939
<ItemGroup>
4040
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
4141
<SpecificVersion>False</SpecificVersion>
42-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Assembly-CSharp.dll</HintPath>
42+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Assembly-CSharp.dll</HintPath>
4343
</Reference>
4444
<Reference Include="Il2Cppmscorlib">
45-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Il2Cppmscorlib.dll</HintPath>
45+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Il2Cppmscorlib.dll</HintPath>
4646
</Reference>
4747
<Reference Include="Il2CppSystem">
48-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.dll</HintPath>
48+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.dll</HintPath>
4949
</Reference>
5050
<Reference Include="Il2CppSystem.Configuration">
51-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Configuration.dll</HintPath>
51+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Configuration.dll</HintPath>
5252
</Reference>
5353
<Reference Include="Il2CppSystem.Core">
54-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Core.dll</HintPath>
54+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Core.dll</HintPath>
5555
</Reference>
5656
<Reference Include="Il2CppSystem.Runtime.Serialization">
57-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Runtime.Serialization.dll</HintPath>
57+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Runtime.Serialization.dll</HintPath>
5858
</Reference>
5959
<Reference Include="Il2CppSystem.Windows.Forms">
60-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Windows.Forms.dll</HintPath>
60+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Windows.Forms.dll</HintPath>
6161
</Reference>
6262
<Reference Include="Il2CppSystem.Xml">
63-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Xml.dll</HintPath>
63+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Xml.dll</HintPath>
6464
</Reference>
6565
<Reference Include="Il2CppSystem.Xml.Linq">
66-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Xml.Linq.dll</HintPath>
66+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Xml.Linq.dll</HintPath>
6767
</Reference>
6868
<Reference Include="MelonLoader.ModHandler">
69-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\MelonLoader.ModHandler.dll</HintPath>
69+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\MelonLoader.ModHandler.dll</HintPath>
7070
</Reference>
7171
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
7272
<SpecificVersion>False</SpecificVersion>
73-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Newtonsoft.Json.dll</HintPath>
73+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Newtonsoft.Json.dll</HintPath>
7474
</Reference>
7575
<Reference Include="System" />
7676
<Reference Include="System.Core" />
@@ -79,43 +79,43 @@
7979
<Reference Include="System.Data" />
8080
<Reference Include="System.Xml" />
8181
<Reference Include="UnhollowerBaseLib">
82-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnhollowerBaseLib.dll</HintPath>
82+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnhollowerBaseLib.dll</HintPath>
8383
</Reference>
8484
<Reference Include="UnhollowerRuntimeLib, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">
8585
<SpecificVersion>False</SpecificVersion>
86-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnhollowerRuntimeLib.dll</HintPath>
86+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnhollowerRuntimeLib.dll</HintPath>
8787
</Reference>
8888
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
8989
<SpecificVersion>False</SpecificVersion>
90-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.dll</HintPath>
90+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.dll</HintPath>
9191
</Reference>
9292
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
9393
<SpecificVersion>False</SpecificVersion>
94-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.CoreModule.dll</HintPath>
95-
</Reference>
96-
<Reference Include="UnityEngine.Networking">
97-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.Networking.dll</HintPath>
94+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.CoreModule.dll</HintPath>
9895
</Reference>
9996
<Reference Include="UnityEngine.PhysicsModule, Version=3.7.1.6, Culture=neutral, processorArchitecture=MSIL">
10097
<SpecificVersion>False</SpecificVersion>
101-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.PhysicsModule.dll</HintPath>
98+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.PhysicsModule.dll</HintPath>
10299
</Reference>
103100
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
104101
<SpecificVersion>False</SpecificVersion>
105-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.UI.dll</HintPath>
102+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.UI.dll</HintPath>
106103
</Reference>
107104
<Reference Include="UnityEngine.UnityWebRequestModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
108105
<SpecificVersion>False</SpecificVersion>
109-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.UnityWebRequestModule.dll</HintPath>
106+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.UnityWebRequestModule.dll</HintPath>
110107
</Reference>
111108
<Reference Include="VRCCore-Standalone, Version=0.0.0.0, Culture=neutral, PublicKeyToken=67033c44591afb45, processorArchitecture=MSIL">
112109
<SpecificVersion>False</SpecificVersion>
113-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\VRCCore-Standalone.dll</HintPath>
110+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\VRCCore-Standalone.dll</HintPath>
111+
</Reference>
112+
<Reference Include="VRCSDK3, Version=3.7.1.6, Culture=neutral, processorArchitecture=MSIL">
113+
<SpecificVersion>False</SpecificVersion>
114+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\VRCSDK3.dll</HintPath>
114115
</Reference>
115-
<Reference Include="VRCSDK3, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null" />
116116
<Reference Include="VRCSDKBase, Version=3.7.1.6, Culture=neutral, processorArchitecture=MSIL">
117117
<SpecificVersion>False</SpecificVersion>
118-
<HintPath>D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\VRCSDKBase.dll</HintPath>
118+
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\VRCSDKBase.dll</HintPath>
119119
</Reference>
120120
</ItemGroup>
121121
<ItemGroup>
@@ -131,6 +131,6 @@
131131
</ItemGroup>
132132
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
133133
<PropertyGroup>
134-
<PostBuildEvent>xcopy /f /y "$(TargetPath)" "D:\SteamLibrary\steamapps\common\VRChat\Mods\$(TargetFileName)*"</PostBuildEvent>
134+
<PostBuildEvent>xcopy /f /y "$(TargetPath)" "C:\Program Files (x86)\Steam\steamapps\common\VRChat\Mods\$(TargetFileName)*"</PostBuildEvent>
135135
</PropertyGroup>
136136
</Project>

Main.cs

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static class ModBuildInfo {
1717
public const string Name = "DesktopCamera";
1818
public const string Author = "nitro.";
1919
public const string Company = null;
20-
public const string Version = "1.0.8";
20+
public const string Version = "1.0.9";
2121
public const string DownloadLink = "https://github.com/nitrog0d/DesktopCamera/releases/latest/download/DesktopCamera.dll";
2222
public const string GameDeveloper = "VRChat";
2323
public const string Game = "VRChat";
@@ -163,24 +163,26 @@ private IEnumerator Setup() {
163163
if (Settings.cameraEnabled) {
164164
var currentPin = CameraUtils.GetCurrentPin();
165165
string pin = "?";
166-
int newPin = 0;
166+
int newPin = 1;
167167
switch (currentPin) {
168168
case CameraUtils.Pin.Pin1:
169-
newPin = 1;
169+
newPin = 2;
170170
pin = "Pin 2";
171171
break;
172172
case CameraUtils.Pin.Pin2:
173-
newPin = 2;
173+
newPin = 3;
174174
pin = "Pin 3";
175175
break;
176176
case CameraUtils.Pin.Pin3:
177-
newPin = 0;
177+
newPin = 1;
178178
pin = "Pin 1";
179179
break;
180180
}
181181
switchPinButton.setText("Cycle Pin\n<color=#845bff>" + pin + "</color>");
182-
// Eventually change this to the same way I do the other buttons, I suppose it changes every VRChat update so yeah as soon as possible please Lucas...
183-
VRCUtils.GetUserCameraController().Method_Public_Void_Int32_0(newPin);
182+
// Needed to initialize the buttons apparently
183+
CameraUtils.TogglePinMenu();
184+
CameraUtils.TogglePinMenu();
185+
CameraUtils.SetPin(newPin);
184186
}
185187
}));
186188

@@ -270,20 +272,20 @@ private IEnumerator Setup() {
270272
}
271273
}
272274

273-
var filters = new Dictionary<string, int>()
275+
var filters = new Dictionary<string, string>()
274276
{
275-
{ "None", 0 },
276-
{ "Blueprint", 10 },
277-
{ "Code", 4 },
278-
{ "Sparkles", 5 },
279-
{ "Green\nScreen", 7 },
280-
{ "Hypno", 6 },
281-
{ "Alpha\nTransparent", 8 },
282-
{ "Drawing", 9 },
283-
{ "Glitch", 3 },
284-
{ "Pixelate", 2 },
285-
{ "Old Timey", 1 },
286-
{ "Trippy", 11 }
277+
{ "None", "button-NONE" },
278+
{ "Blueprint", "Button-Blueprint" },
279+
{ "Code", "Button-Code" },
280+
{ "Sparkles", "Button-Sparkles" },
281+
{ "Green\nScreen", "Button-GreenScreen" },
282+
{ "Hypno", "Button-Hypno" },
283+
{ "Alpha\nTransparent", "Button-ALPHA" },
284+
{ "Drawing", "Button-Drawing" },
285+
{ "Glitch", "Button-Glitch" },
286+
{ "Pixelate", "Button-PIXELS" },
287+
{ "Old Timey", "Button-OLD-TIMEY" },
288+
{ "Trippy", "Button-Trippy" }
287289
};
288290

289291
int row = 0;
@@ -293,8 +295,10 @@ private IEnumerator Setup() {
293295
var button = new SingleButton("Filter" + filter.Value, filter.Key, "Sets the filter to " + filter.Key.Replace("\n", " "), position, row, filtersMenu);
294296
button.setAction((Action)(() => {
295297
if (Settings.cameraEnabled) {
296-
// Eventually change this to the same way I do the other buttons, I suppose it changes every VRChat update so yeah as soon as possible please Lucas...
297-
VRCUtils.GetUserCameraController().Method_Public_Void_Int32_4(filter.Value);
298+
// Needed to initialize the buttons apparently
299+
CameraUtils.ToggleFilterMenu();
300+
CameraUtils.ToggleFilterMenu();
301+
CameraUtils.SetFilter(filter.Value);
298302
}
299303
}));
300304
position++;
@@ -321,6 +325,7 @@ private IEnumerator Setup() {
321325
// This is a mess please don't look
322326
// and also pull request to improve it thx
323327
public override void OnUpdate() {
328+
// Testing
324329
//if (Input.GetKeyDown(KeyCode.F1)) {
325330
// var quickMenu = VRCUtils.GetQuickMenu();
326331
// var cameraMenu = quickMenu.transform.Find("CameraMenu");

Utils/CameraUtils.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ public static void CycleCameraSpace() {
4444
VRCUtils.GetUserCameraController().viewFinder.transform.Find("PhotoControls/Left_Space").GetComponent<CameraInteractable>().Interact();
4545
}
4646

47+
public static void SetPin(int pin) {
48+
VRCUtils.GetUserCameraController().pinsHolder.transform.Find("button-Pin-" + pin).GetComponent<CameraInteractable>().Interact();
49+
}
50+
51+
public static void SetFilter(string filter) {
52+
VRCUtils.GetUserCameraController().filtersHolder.transform.Find(filter).GetComponentInChildren<CameraInteractable>().Interact();
53+
}
54+
4755
public static void TogglePinMenu() {
4856
VRCUtils.GetUserCameraController().viewFinder.transform.Find("PhotoControls/Left_Pins").GetComponent<CameraInteractable>().Interact();
4957
}
@@ -52,6 +60,10 @@ public static void ToggleLock() {
5260
VRCUtils.GetUserCameraController().viewFinder.transform.Find("PhotoControls/Right_Lock").GetComponent<CameraInteractable>().Interact();
5361
}
5462

63+
public static void ToggleFilterMenu() {
64+
VRCUtils.GetUserCameraController().viewFinder.transform.Find("PhotoControls/Right_Filters").GetComponent<CameraInteractable>().Interact();
65+
}
66+
5567

5668
public enum CameraMode {
5769
Off,

Utils/VRCUtils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ public static UserCameraController GetUserCameraController() {
5656
}
5757

5858
public static Player GetPlayer() {
59-
return PlayerManager.Method_Public_Static_Player_String_1(APIUser.CurrentUser.id);
59+
return PlayerManager.Method_Public_Static_Player_String_0(APIUser.CurrentUser.id);
6060
}
6161

6262
public static VRCUiManager GetVRCUiManager() {
6363
return VRCUiManager.prop_VRCUiManager_0;
6464
}
6565

6666
public static void QueueHudMessage(string message) {
67-
GetVRCUiManager().Method_Public_Void_String_3(message);
67+
GetVRCUiManager().Method_Public_Void_String_0(message);
6868
}
6969
}
7070
}

0 commit comments

Comments
 (0)