-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
767a59b
commit ee7f3f7
Showing
17 changed files
with
455 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
namespace SinmaiAssist { | ||
public static partial class BuildInfo { | ||
public const string CommitHash = "2196223"; | ||
public const string BuildDate = "2024-09-30T00:19:20.6886613+08:00"; | ||
public const string CommitHash = "767a59b"; | ||
public const string BuildDate = "2024-09-30T21:25:02.8173266+08:00"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using SinmaiAssist.Cheat; | ||
using UnityEngine; | ||
|
||
namespace SinmaiAssist.GUI; | ||
|
||
public class AutoPlayPanel | ||
{ | ||
public static void OnGUI() | ||
{ | ||
GUILayout.Label($"Mode: {AutoPlay.autoPlayMode}"); | ||
AutoPlay.DisableUpdate = GUILayout.Toggle(AutoPlay.DisableUpdate, "Disable Mode Update"); | ||
if (GUILayout.Button("Critical (AP+)")) AutoPlay.autoPlayMode = AutoPlay.AutoPlayMode.Critical; | ||
if (GUILayout.Button("Perfect")) AutoPlay.autoPlayMode = AutoPlay.AutoPlayMode.Perfect; | ||
if (GUILayout.Button("Great")) AutoPlay.autoPlayMode = AutoPlay.AutoPlayMode.Great; | ||
if (GUILayout.Button("Good")) AutoPlay.autoPlayMode = AutoPlay.AutoPlayMode.Good; | ||
if (GUILayout.Button("Random")) AutoPlay.autoPlayMode = AutoPlay.AutoPlayMode.Random; | ||
if (GUILayout.Button("RandomAllPerfect")) AutoPlay.autoPlayMode = AutoPlay.AutoPlayMode.RandomAllPerfect; | ||
if (GUILayout.Button("RandomFullComboPlus")) AutoPlay.autoPlayMode = AutoPlay.AutoPlayMode.RandomFullComboPlus; | ||
if (GUILayout.Button("RandomFullCombo")) AutoPlay.autoPlayMode = AutoPlay.AutoPlayMode.RandomFullCombo; | ||
if (GUILayout.Button("None")) AutoPlay.autoPlayMode = AutoPlay.AutoPlayMode.None; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using SinmaiAssist.Cheat; | ||
using UnityEngine; | ||
|
||
namespace SinmaiAssist.GUI; | ||
|
||
public class ChartTimerPanel | ||
{ | ||
public static void OnGUI() | ||
{ | ||
GUIStyle buttonStyle = new GUIStyle(UnityEngine.GUI.skin.button) { fontSize = 24 }; | ||
ChartTimer.ButtonStatus = ChartTimer.Button.None; | ||
Manager.NotesManager notesManager = new Manager.NotesManager(); | ||
GUILayout.Label($"Timer Status: {(notesManager.IsPlaying() ? (ChartTimer.IsPlaying ? "Playing" : "Paused") : "Not Play")}"); | ||
GUILayout.Label($"Timer:", new GUIStyle(UnityEngine.GUI.skin.label) { fontSize = 20 }); | ||
GUILayout.Label($"{ChartTimer.Timer.ToString("0000000.0000")}", new GUIStyle(MainGUI.Style.Title) { fontSize = 20 }); | ||
if (GUILayout.Button($"{(ChartTimer.IsPlaying ? "Pause" : "Play")}", buttonStyle, GUILayout.Height(45f))) ChartTimer.ButtonStatus = ChartTimer.Button.Pause; | ||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("<<<", buttonStyle, GUILayout.Height(45f))) ChartTimer.ButtonStatus = ChartTimer.Button.TimeSkipSub3; | ||
if (GUILayout.Button("<<", buttonStyle, GUILayout.Height(45f))) ChartTimer.ButtonStatus = ChartTimer.Button.TimeSkipSub2; | ||
if (GUILayout.Button("<", buttonStyle, GUILayout.Height(45f))) ChartTimer.ButtonStatus = ChartTimer.Button.TimeSkipSub; | ||
if (GUILayout.Button(">", buttonStyle, GUILayout.Height(45f))) ChartTimer.ButtonStatus = ChartTimer.Button.TimeSkipAdd; | ||
if (GUILayout.Button(">>", buttonStyle, GUILayout.Height(45f))) ChartTimer.ButtonStatus = ChartTimer.Button.TimeSkipAdd2; | ||
if (GUILayout.Button(">>>", buttonStyle, GUILayout.Height(45f))) ChartTimer.ButtonStatus = ChartTimer.Button.TimeSkipAdd3; | ||
GUILayout.EndHorizontal(); | ||
if (GUILayout.Button("Reset", buttonStyle, GUILayout.Height(45f))) ChartTimer.ButtonStatus = ChartTimer.Button.Reset; | ||
GUILayout.Label( | ||
"While paused, you can use the LeftArrow and RightArrow keys to perform small range fast forward or rewind.", | ||
new GUIStyle(UnityEngine.GUI.skin.label) | ||
{ | ||
fontSize = 12, | ||
wordWrap = true | ||
} | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using Manager; | ||
using SinmaiAssist.Utils; | ||
using UnityEngine; | ||
|
||
namespace SinmaiAssist.GUI; | ||
|
||
public class DebugPanel | ||
{ | ||
private static readonly GUIStyle MiddleStyle = new GUIStyle() | ||
{ | ||
fontSize = 12, | ||
normal = new GUIStyleState() { textColor = Color.white }, | ||
alignment = TextAnchor.MiddleCenter | ||
}; | ||
|
||
public static void OnGUI() | ||
{ | ||
GUILayout.Label($"Throw Exception Test", MiddleStyle); | ||
if (GUILayout.Button("NullReferenceException")) | ||
{ | ||
GameObject obj = null; | ||
obj.SetActive(true); | ||
} | ||
if (GUILayout.Button("InvalidCastException")) throw new InvalidCastException("Debug"); | ||
GUILayout.Label($"Test Tools", MiddleStyle); | ||
if (GUILayout.Button("TouchArea Display")) Common.InputManager.TouchAreaDisplayButton = true; | ||
if (GUILayout.Button("Send Test Message")) | ||
{ | ||
GameMessageManager.SendGameMessage("Hello World!\nMonitorId: 0", 0); | ||
GameMessageManager.SendGameMessage("Hello World!\nMonitorId: 1", 1); | ||
} | ||
if (GUILayout.Button("Save P1 Option To DefaultOption")) Common.ChangeDefaultOption.SaveOptionFile(0L); | ||
if (GUILayout.Button("Save P2 Option To DefaultOption")) Common.ChangeDefaultOption.SaveOptionFile(1L); | ||
if (GUILayout.Button("↑ ↓ ↑ ↓")) SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_ENTRY_AIME_ERROR, 1); | ||
GUILayout.Label($"GUI Toggle", MiddleStyle); | ||
if (GUILayout.Button("Toggle Show Info")) SinmaiAssist.config.ModSetting.ShowInfo = !SinmaiAssist.config.ModSetting.ShowInfo; | ||
if (GUILayout.Button("Toggle Show FPS")) SinmaiAssist.config.Common.ShowFPS = !SinmaiAssist.config.Common.ShowFPS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using Manager; | ||
using Net.Packet; | ||
using Net.Packet.Helper; | ||
using SinmaiAssist.Common; | ||
using SinmaiAssist.Utils; | ||
using UnityEngine; | ||
|
||
namespace SinmaiAssist.GUI; | ||
|
||
public class DummyLoginPanel | ||
{ | ||
public static string DummyLoginCode = ""; | ||
public static string DummyUserId = ""; | ||
public static bool CodeLoginFlag = false; | ||
public static bool UserIdLoginFlag = false; | ||
|
||
public static void OnGUI() | ||
{ | ||
GUILayout.Label(SinmaiAssist.IsSDGB?"QrCode:":"AccessCode:"); | ||
DummyLoginCode = GUILayout.TextArea(DummyLoginCode, GUILayout.Height(100f)); | ||
if (GUILayout.Button(SinmaiAssist.IsSDGB?"QrCode Login":"AccessCode Login")) | ||
{ | ||
CodeLoginFlag = true; | ||
if (!SinmaiAssist.IsSDGB) DummyAimeLogin.ReadCard(); | ||
} | ||
GUILayout.Label("UserID:"); | ||
DummyUserId = GUILayout.TextField(DummyUserId, GUILayout.Height(20f)); | ||
if (GUILayout.Button("UserId Login")) | ||
{ | ||
UserIdLoginFlag = true; | ||
if (!SinmaiAssist.IsSDGB) DummyAimeLogin.ReadCard("12312312312312312312", DummyLoginCode); | ||
} | ||
GUILayout.Label($"AMDaemon BootTime: {AMDaemon.Allnet.Auth.AuthTime}"); | ||
if (GUILayout.Button("UserId Logout")) | ||
{ | ||
PacketHelper.StartPacket(new UserLogout(ulong.Parse(DummyUserId), AMDaemon.Allnet.Auth.AuthTime, "", LogoutComplete,LogoutFailed)); | ||
} | ||
} | ||
|
||
private static void LogoutComplete() | ||
{ | ||
SoundManager.PlayVoice(Mai2.Voice_000001.Cue.VO_000012, 1); | ||
GameMessageManager.SendGameMessage($"Id: {DummyUserId} Logout Complete."); | ||
} | ||
|
||
private static void LogoutFailed(PacketStatus status) | ||
{ | ||
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_ENTRY_AIME_ERROR, 1); | ||
GameMessageManager.SendGameMessage($"Id: {DummyUserId} Logout Failed."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using SinmaiAssist.Cheat; | ||
using UnityEngine; | ||
|
||
namespace SinmaiAssist.GUI; | ||
|
||
public class FastSkipPanel | ||
{ | ||
private static string _scoreInput = "0"; | ||
|
||
public static void OnGUI() | ||
{ | ||
FastSkip.SkipButton = false; | ||
GUILayout.Label($"Skip Mode: {(FastSkip.CustomSkip ? "Custom" : "Default")}"); | ||
if (GUILayout.Button("Skip", new GUIStyle(UnityEngine.GUI.skin.button){ fontSize=20 }, GUILayout.Height(45f))) FastSkip.SkipButton = true; | ||
GUILayout.Label($"Mode Setting", MainGUI.Style.Title); | ||
if (GUILayout.Button("Default")) FastSkip.CustomSkip = false; | ||
if (GUILayout.Button("Custom")) FastSkip.CustomSkip = true; | ||
if (FastSkip.CustomSkip) | ||
{ | ||
GUILayout.Label($"Custom Setting", MainGUI.Style.Title); | ||
GUILayout.Label($"Custom Score(0 - 101): "); | ||
_scoreInput = GUILayout.TextField(_scoreInput); | ||
if (int.TryParse(_scoreInput, out int scoreValue)) | ||
{ | ||
if (scoreValue >= 0f && scoreValue <= 101f) | ||
{ | ||
FastSkip.CustomAchivement = scoreValue; | ||
GUILayout.Label($"Custom Score: {scoreValue} %"); | ||
} | ||
else | ||
{ | ||
GUILayout.Label("Error: Please enter a value between 0 and 101.", MainGUI.Style.ErrorMessage); | ||
} | ||
} | ||
else | ||
{ | ||
GUILayout.Label("Error: Please enter a valid int value.", MainGUI.Style.ErrorMessage); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using SinmaiAssist.Common; | ||
using UnityEngine; | ||
|
||
namespace SinmaiAssist.GUI; | ||
|
||
public class GraphicPanel | ||
{ | ||
private static string screenWidth = $"{Graphic.GetResolutionWidth()}"; | ||
private static string screenHeight = $"{Graphic.GetResolutionHeight()}"; | ||
private static string frameRate = $"{Graphic.GetMaxFrameRate()}"; | ||
|
||
|
||
public static void OnGUI() | ||
{ | ||
if (GUILayout.Button("Toggle full screen", GUILayout.Height(50))) Graphic.ToggleFullscreen(); | ||
GUILayout.Label($"Custom Graphic Settings", MainGUI.Style.Title); | ||
GUILayout.BeginHorizontal(); | ||
GUILayout.BeginVertical(); | ||
GUILayout.Label($"Width:"); | ||
screenWidth = GUILayout.TextField(screenWidth); | ||
GUILayout.EndVertical(); | ||
GUILayout.BeginVertical(); | ||
GUILayout.Label($"Height:"); | ||
screenHeight = GUILayout.TextField(screenHeight); | ||
GUILayout.EndVertical(); | ||
GUILayout.BeginVertical(); | ||
GUILayout.Label($"Max FPS (Unlimited is -1):"); | ||
frameRate = GUILayout.TextField(frameRate); | ||
GUILayout.EndVertical(); | ||
GUILayout.EndHorizontal(); | ||
if (GUILayout.Button("Apply", GUILayout.Height(20)) && int.TryParse(screenWidth, out int widthValue) && int.TryParse(screenHeight, out int heightValue) && int.TryParse(frameRate, out int fpsValue)) | ||
{ | ||
if (widthValue >= 360f && heightValue >= 360f) | ||
{ | ||
Graphic.SetResolution(widthValue, heightValue); | ||
Graphic.SetMaxFrameRate(fpsValue); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.