mirror of https://github.com/hykilpikonna/AquaDX
[+] QuickEndPlay button when notes play end
Build AquaMai / build (push) Has been cancelled
Details
Build AquaMai / build (push) Has been cancelled
Details
parent
f716ab0c1b
commit
1810bbe2d5
|
@ -125,6 +125,8 @@ SkipGameOverScreen=true
|
||||||
SkipTrackStart=true
|
SkipTrackStart=true
|
||||||
# Show reason when net icon is gray
|
# Show reason when net icon is gray
|
||||||
ShowNetErrorDetail=true
|
ShowNetErrorDetail=true
|
||||||
|
# Show a "skip" button like AstroDX after the notes end
|
||||||
|
ShowQuickEndPlay=true
|
||||||
|
|
||||||
[WindowState]
|
[WindowState]
|
||||||
# If not enabled, no operations will be performed on the game window
|
# If not enabled, no operations will be performed on the game window
|
||||||
|
|
|
@ -144,6 +144,8 @@ IWontTapOrSlideVigorously=true
|
||||||
SkipGameOverScreen=true
|
SkipGameOverScreen=true
|
||||||
# 跳过乐曲开始界面
|
# 跳过乐曲开始界面
|
||||||
SkipTrackStart=true
|
SkipTrackStart=true
|
||||||
|
# 音符结束之后显示像 AstroDX 一样的“跳过”按钮
|
||||||
|
ShowQuickEndPlay=true
|
||||||
|
|
||||||
[WindowState]
|
[WindowState]
|
||||||
# 不启用的话,不会对游戏窗口做任何操作
|
# 不启用的话,不会对游戏窗口做任何操作
|
||||||
|
|
|
@ -85,6 +85,7 @@ namespace AquaMai
|
||||||
public bool IWontTapOrSlideVigorously { get; set; }
|
public bool IWontTapOrSlideVigorously { get; set; }
|
||||||
public bool SkipGameOverScreen { get; set; }
|
public bool SkipGameOverScreen { get; set; }
|
||||||
public bool SkipTrackStart { get; set; }
|
public bool SkipTrackStart { get; set; }
|
||||||
|
public bool ShowQuickEndPlay { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WindowStateConfig
|
public class WindowStateConfig
|
||||||
|
|
|
@ -215,6 +215,15 @@ namespace AquaMai.Resources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Skip.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Skip {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Skip", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Speed.
|
/// Looks up a localized string similar to Speed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -84,4 +84,7 @@
|
||||||
<data name="RatingUpWhenSSSp" xml:space="preserve">
|
<data name="RatingUpWhenSSSp" xml:space="preserve">
|
||||||
<value>SSS+ => DXRating += {0}</value>
|
<value>SSS+ => DXRating += {0}</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Skip" xml:space="preserve">
|
||||||
|
<value>Skip</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -77,4 +77,7 @@
|
||||||
<data name="RatingUpWhenSSSp" xml:space="preserve">
|
<data name="RatingUpWhenSSSp" xml:space="preserve">
|
||||||
<value>推到鸟加可上 {0} 分</value>
|
<value>推到鸟加可上 {0} 分</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Skip" xml:space="preserve">
|
||||||
|
<value>跳过</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using AquaMai.Helpers;
|
||||||
|
using AquaMai.Resources;
|
||||||
|
using HarmonyLib;
|
||||||
|
using MAI2.Util;
|
||||||
|
using Manager;
|
||||||
|
using Monitor;
|
||||||
|
using Process;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace AquaMai.TimeSaving;
|
||||||
|
|
||||||
|
public class ShowQuickEndPlay
|
||||||
|
{
|
||||||
|
private static bool _showUi;
|
||||||
|
|
||||||
|
[HarmonyPatch(typeof(GameProcess), "OnStart")]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void GameProcessPostStart(GameMonitor[] ____monitors)
|
||||||
|
{
|
||||||
|
_showUi = false;
|
||||||
|
____monitors[0].gameObject.AddComponent<Ui>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(typeof(GameProcess), "OnUpdate")]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void GameProcessPostUpdate(GameProcess __instance, Message[] ____message, ProcessDataContainer ___container, byte ____sequence)
|
||||||
|
{
|
||||||
|
if (____sequence > 4)
|
||||||
|
{
|
||||||
|
_showUi = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_showUi && (InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.B4) || InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.E4)))
|
||||||
|
{
|
||||||
|
var traverse = Traverse.Create(__instance);
|
||||||
|
___container.processManager.SendMessage(____message[0]);
|
||||||
|
Singleton<GamePlayManager>.Instance.SetSyncResult(0);
|
||||||
|
traverse.Method("SetRelease").GetValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class Ui : MonoBehaviour
|
||||||
|
{
|
||||||
|
public void OnGUI()
|
||||||
|
{
|
||||||
|
if (!_showUi) return;
|
||||||
|
var style = GUI.skin.GetStyle("button");
|
||||||
|
style.fontSize = GuiSizes.FontSize;
|
||||||
|
|
||||||
|
var x = GuiSizes.PlayerCenter;
|
||||||
|
var y = Screen.height - GuiSizes.PlayerWidth * .37f;
|
||||||
|
var width = GuiSizes.PlayerWidth * .25f;
|
||||||
|
var height = GuiSizes.PlayerWidth * .13f;
|
||||||
|
|
||||||
|
GUI.Button(new Rect(x, y, width, height), Locale.Skip);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue