jujuforce
2204fb4756
Co-authored-by: Jujuforce <jujuforce@gmail.com> Co-authored-by: akanyan <alicechecker01@proton.me> Co-authored-by: あかニャン <akanyan@noreply.gitea.tendokyu.moe> Reviewed-on: #7 Co-authored-by: jujuforce <jujuforce@noreply.gitea.tendokyu.moe> Co-committed-by: jujuforce <jujuforce@noreply.gitea.tendokyu.moe>
30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using MonoMod;
|
|
using MU3.ViewData;
|
|
|
|
namespace MU3;
|
|
|
|
class patch_Scene_32_PrePlayMusic_MusicSelect: Scene_32_PrePlayMusic_MusicSelect {
|
|
private MusicSelectViewDataList _selectList;
|
|
private UIMusicSelector _selector;
|
|
private UIDialogBase _dialogBase;
|
|
|
|
[MonoModIgnore]
|
|
private extern void onFinishPlayScenario(int status, bool flag);
|
|
[MonoModIgnore]
|
|
private extern void updateSystemUIPanel();
|
|
|
|
private extern void orig_Execute_Select();
|
|
private void Execute_Select() {
|
|
// Walk around the warning dialog
|
|
if(_dialogBase == null && !_selector.isDecided && !_selector.isCanceled && (_selector.isPressed || _selector.isPressedDisabledElement)) {
|
|
MusicSelectViewData musicViewData = _selectList.getMusicViewData(_selector.selectIndex);
|
|
if(musicViewData != null && musicViewData.kind == MusicSelectViewData.Kind.Scenario
|
|
&& musicViewData.scenarioViewData.ngReason == ScenarioViewData.PlayNGReason.None) {
|
|
onFinishPlayScenario(0, false);
|
|
updateSystemUIPanel();
|
|
return;
|
|
}
|
|
}
|
|
orig_Execute_Select();
|
|
}
|
|
} |