forked from angturil/SongRequestManager
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathupdate-1.13.2.diff
More file actions
215 lines (207 loc) · 13.3 KB
/
update-1.13.2.diff
File metadata and controls
215 lines (207 loc) · 13.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
diff --git a/EnhancedTwitchIntegration/Bot/RequestBotListViewController.cs b/EnhancedTwitchIntegration/Bot/RequestBotListViewController.cs
index 3a782a4..4dd0db4 100644
--- a/EnhancedTwitchIntegration/Bot/RequestBotListViewController.cs
+++ b/EnhancedTwitchIntegration/Bot/RequestBotListViewController.cs
@@ -103,12 +103,16 @@ namespace SongRequestManager
SongCore.Loader.SongsLoadedEvent += SongLoader_SongsLoadedEvent;
}
+ Plugin.Log("DidActivate 001");
+
// get table cell instance
_requestListTableCellInstance = Resources.FindObjectsOfTypeAll<LevelListTableCell>().First((LevelListTableCell x) => x.name == "LevelListTableCell");
// initialize Yes/No modal
YesNoModal.instance.Setup();
+ Plugin.Log("DidActivate 002");
+
_songPreviewPlayer = Resources.FindObjectsOfTypeAll<SongPreviewPlayer>().FirstOrDefault();
RectTransform container = new GameObject("RequestBotContainer", typeof(RectTransform)).transform as RectTransform;
@@ -147,9 +151,15 @@ namespace SongRequestManager
var _songListTableViewScroller = _songListTableView.GetField<TableViewScroller, TableView>("scroller");
- _pageUpButton = Instantiate(Resources.FindObjectsOfTypeAll<Button>().Last(x => (x.name == "PageUpButton")), container, false);
- (_pageUpButton.transform as RectTransform).anchoredPosition = new Vector2(3f, -14f);
- (_pageUpButton.transform as RectTransform).sizeDelta = new Vector2(-30f, 6f);
+ Plugin.Log("DidActivate 003");
+
+ var textPageScrollView = Resources.FindObjectsOfTypeAll<ReleaseInfoViewController>().First().GetField<TextPageScrollView, ReleaseInfoViewController>("_textPageScrollView");
+ var pageUpButton = textPageScrollView.GetField<Button, ScrollView>("_pageUpButton");
+ var pageDownButton = textPageScrollView.GetField<Button, ScrollView>("_pageDownButton");
+
+ _pageUpButton = Instantiate(pageUpButton, container, false);
+ (_pageUpButton.transform as RectTransform).anchoredPosition = new Vector2(-50f, -8f);
+ (_pageUpButton.transform as RectTransform).sizeDelta = new Vector2(10f, 6f);
_pageUpButton.interactable = true;
_pageUpButton.name = "SRMPageUpButton";
_pageUpButton.onClick.AddListener(delegate ()
@@ -157,9 +167,11 @@ namespace SongRequestManager
_songListTableViewScroller.PageScrollUp();
});
- _pageDownButton = Instantiate(Resources.FindObjectsOfTypeAll<Button>().First(x => (x.name == "PageDownButton")), container, false);
- (_pageDownButton.transform as RectTransform).anchoredPosition = new Vector2(3f, 14f);
- (_pageDownButton.transform as RectTransform).sizeDelta = new Vector2(-30f, 6f);
+ Plugin.Log("DidActivate 004");
+
+ _pageDownButton = Instantiate(pageDownButton, container, false);
+ (_pageDownButton.transform as RectTransform).anchoredPosition = new Vector2(-50f, 14f);
+ (_pageDownButton.transform as RectTransform).sizeDelta = new Vector2(10f, 6f);
_pageDownButton.interactable = true;
_pageDownButton.name = "SRMPageDownButton";
_pageDownButton.onClick.AddListener(delegate ()
@@ -174,6 +186,8 @@ namespace SongRequestManager
// BUG: Need additional modes disabling one shot buttons
// BUG: Need to make sure the buttons are usable on older headsets
+ Plugin.Log("DidActivate 005");
+
_CurrentSongName = BeatSaberUI.CreateText(container, "", new Vector2(-35, 37f));
_CurrentSongName.fontSize = 3f;
_CurrentSongName.color = Color.cyan;
diff --git a/EnhancedTwitchIntegration/SongRequestManager.csproj b/EnhancedTwitchIntegration/SongRequestManager.csproj
index 5323b64..d701077 100644
--- a/EnhancedTwitchIntegration/SongRequestManager.csproj
+++ b/EnhancedTwitchIntegration/SongRequestManager.csproj
@@ -35,52 +35,52 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="BeatSaverDownloader">
- <HintPath>..\..\..\Versus\BeatSaverDownloader.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Plugins\BeatSaverDownloader.dll</HintPath>
</Reference>
<Reference Include="BSML">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Plugins\BSML.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Plugins\BSML.dll</HintPath>
</Reference>
<Reference Include="BS_Utils, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\steam\steamapps\common\Beat Saber\Plugins\BS_Utils.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Plugins\BS_Utils.dll</HintPath>
</Reference>
<Reference Include="ChatCore, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\steam\steamapps\common\Beat Saber\Libs\ChatCore.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Libs\ChatCore.dll</HintPath>
</Reference>
<Reference Include="GameplayCore">
- <HintPath>..\..\..\..\..\..\steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\GameplayCore.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\GameplayCore.dll</HintPath>
</Reference>
<Reference Include="HMLib, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\HMLib.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\HMLib.dll</HintPath>
</Reference>
<Reference Include="HMUI, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\HMUI.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\HMUI.dll</HintPath>
</Reference>
<Reference Include="IPA.Loader, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>C:\Games\steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\IPA.Loader.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\IPA.Loader.dll</HintPath>
</Reference>
<Reference Include="Main, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\Main.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Main.dll</HintPath>
</Reference>
<Reference Include="Polyglot, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\Polyglot.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Polyglot.dll</HintPath>
</Reference>
<Reference Include="SemVer">
- <HintPath>C:\Games\steam\steamapps\common\Beat Saber\Libs\SemVer.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Libs\SemVer.dll</HintPath>
</Reference>
<Reference Include="SongBrowser, Version=6.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\steam\steamapps\common\Beat Saber\Plugins\SongBrowser.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Plugins\SongBrowser.dll</HintPath>
</Reference>
<Reference Include="SongCore, Version=2.9.5.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\steam\steamapps\common\Beat Saber\Plugins\SongCore.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Plugins\SongCore.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -92,53 +92,53 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Unity.ProBuilder">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\Unity.ProBuilder.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Unity.ProBuilder.dll</HintPath>
</Reference>
<Reference Include="Unity.TextMeshPro">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\Unity.TextMeshPro.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Unity.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.AudioModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.AudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.ImageConversionModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.ImageConversionModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.JSONSerializeModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.JSONSerializeModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.JSONSerializeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UI.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIElementsModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UIElementsModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UIElementsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UIModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VideoModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.VideoModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.VideoModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VRModule">
- <HintPath>C:\Games\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.VRModule.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.VRModule.dll</HintPath>
</Reference>
<Reference Include="VRUI, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\VRUI.dll</HintPath>
+ <HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\VRUI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -187,7 +187,7 @@
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
- <PostBuildEvent>copy /Y "$(TargetDir)$(TargetFileName)" "C:\Games\Steam\steamapps\common\Beat Saber\Plugins"
-copy /Y "$(TargetDir)$(TargetFileName)" "C:\Beat Saber\Plugins"</PostBuildEvent>
+ <PostBuildEvent>copy /Y "$(TargetDir)$(TargetFileName)" "$(BeatSaberDir)\Plugins"
+copy /Y "$(TargetDir)$(TargetFileName)" "$(BeatSaberDir)"</PostBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file