Skip to content

Commit

Permalink
Add saiten status into note platfield.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Aug 1, 2020
1 parent b4ce58b commit 45a26d1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
1 change: 1 addition & 0 deletions osu.Game.Rulesets.Karaoke.Tests/UI/TestCaseSaitenStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class TestCaseSaitenStatus : OsuTestScene
[TestCase(SaitenStatusMode.OSXMicrophonePermissionDeclined)]
[TestCase(SaitenStatusMode.OSXDoesNotSupported)]
[TestCase(SaitenStatusMode.WindowsMicrophonePermissionDeclined)]
[TestCase(SaitenStatusMode.NoMicrophoneDevice)]
[TestCase(SaitenStatusMode.Saitening)]
public void TestMode(SaitenStatusMode mode)
{
Expand Down
20 changes: 13 additions & 7 deletions osu.Game.Rulesets.Karaoke/UI/Components/SaitenStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,53 +88,59 @@ public enum SaitenStatusMode
/// <summary>
/// Due to android device does not authorize microphone access.
/// </summary>
[Description("Android permission declined")]
[Description("Android permission declined.")]
AndroidMicrophonePermissionDeclined,

/// <summary>
/// Saiten system does not support android device.
/// Will throw this if osu.framework.microphone does not supportu it yet.
/// Or official client does not open this permission.
/// </summary>
[Description("Android target not supported")]
[Description("Android target not supported.")]
AndroidDoesNotSupported,

/// <summary>
/// Due to iOS device does not authorize microphone access.
/// </summary>
[Description("iOS permission declined")]
[Description("iOS permission declined.")]
IOSMicrophonePermissionDeclined,

/// <summary>
/// Saiten system does not support iOS device.
/// Will throw this if osu.framework.microphone does not supportu it yet.
/// Or official client does not open this permission.
/// </summary>
[Description("iOS target not supported")]
[Description("iOS target not supported.")]
IOSDoesNotSupported,

/// <summary>
/// Due to osx device does not authorize microphone access.
/// </summary>
[Description("osx permission declined")]
[Description("osx permission declined.")]
OSXMicrophonePermissionDeclined,

/// <summary>
/// Saiten system does not support osx device.
/// Will throw this if osu.framework.microphone does not supportu it yet.
/// Or official client does not open this permission.
/// </summary>
[Description("osx target not supported")]
[Description("osx target not supported.")]
OSXDoesNotSupported,

/// <summary>
/// Due to windows device does not authorize microphone access.
/// Windows client don't need to ask permission.
/// Open lazer client with admin permission can solve that.
/// </summary>
[Description("Windows permission declined")]
[Description("Windows permission declined.")]
WindowsMicrophonePermissionDeclined,

/// <summary>
/// No microphone device in this computer/macbook.
/// </summary>
[Description("No microphone device.")]
NoMicrophoneDevice,

/// <summary>
/// Everything works well.
/// </summary>
Expand Down
9 changes: 8 additions & 1 deletion osu.Game.Rulesets.Karaoke/UI/NotePlayfield.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public class NotePlayfield : ScrollingPlayfield, IKeyBindingHandler<KaraokeSaite
private readonly SaitenMarker saitenMarker;
private readonly Drawable judgementLine;

private readonly SaitenStatus saitenStatus;

public int Columns { get; }

public NotePlayfield(int columns)
Expand Down Expand Up @@ -165,8 +167,13 @@ public NotePlayfield(int columns)
}
}
},
}
},
}
},
new SaitenStatus(SaitenStatusMode.Saitening)
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
}
};

Expand Down

0 comments on commit 45a26d1

Please sign in to comment.