mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 20:12:56 +08:00
Merge branch 'master' into better-room-status
This commit is contained in:
commit
1410e8837a
@ -7,7 +7,7 @@ using osu.Game.Online.API;
|
|||||||
|
|
||||||
namespace osu.Game.Online.Rooms
|
namespace osu.Game.Online.Rooms
|
||||||
{
|
{
|
||||||
public class JoinRoomRequest : APIRequest
|
public class JoinRoomRequest : APIRequest<Room>
|
||||||
{
|
{
|
||||||
public readonly Room Room;
|
public readonly Room Room;
|
||||||
public readonly string? Password;
|
public readonly string? Password;
|
||||||
|
@ -268,7 +268,8 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
|
|
||||||
private void updateScreenModeWarning()
|
private void updateScreenModeWarning()
|
||||||
{
|
{
|
||||||
if (RuntimeInfo.OS == RuntimeInfo.Platform.macOS)
|
// Can be removed once we stop supporting SDL2.
|
||||||
|
if (RuntimeInfo.OS == RuntimeInfo.Platform.macOS && !FrameworkEnvironment.UseSDL3)
|
||||||
{
|
{
|
||||||
if (windowModeDropdown.Current.Value == WindowMode.Fullscreen)
|
if (windowModeDropdown.Current.Value == WindowMode.Fullscreen)
|
||||||
windowModeDropdown.SetNoticeText(LayoutSettingsStrings.FullscreenMacOSNote, true);
|
windowModeDropdown.SetNoticeText(LayoutSettingsStrings.FullscreenMacOSNote, true);
|
||||||
|
@ -118,7 +118,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
"You can create mod presets to make toggling your favorite mod combinations easier!",
|
"You can create mod presets to make toggling your favorite mod combinations easier!",
|
||||||
"Many mods have customisation settings that drastically change how they function. Click the Mod Customisation button in mod select to view settings!",
|
"Many mods have customisation settings that drastically change how they function. Click the Mod Customisation button in mod select to view settings!",
|
||||||
"Press Ctrl-Shift-R to switch to a random skin!",
|
"Press Ctrl-Shift-R to switch to a random skin!",
|
||||||
"Press Ctrl-Shift-F to toggle the FPS Counter. But make sure not to pay too much attention to it!",
|
|
||||||
"While watching a replay, press Ctrl-H to toggle replay settings!",
|
"While watching a replay, press Ctrl-H to toggle replay settings!",
|
||||||
"You can easily copy the mods from scores on a leaderboard by right-clicking on them!",
|
"You can easily copy the mods from scores on a leaderboard by right-clicking on them!",
|
||||||
"Ctrl-Enter at song select will start a beatmap in autoplay mode!"
|
"Ctrl-Enter at song select will start a beatmap in autoplay mode!"
|
||||||
|
@ -8,6 +8,9 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
|
using osu.Framework.Graphics.Effects;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
|
||||||
@ -27,7 +30,40 @@ namespace osu.Game.Screens.Menu
|
|||||||
public SongTicker()
|
public SongTicker()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Child = new FillFlowContainer
|
InternalChildren = new Drawable[]
|
||||||
|
{
|
||||||
|
new Container
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopRight,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
|
Position = new Vector2(5, -5),
|
||||||
|
Padding = new MarginPadding(-5),
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new CircularContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Masking = true,
|
||||||
|
EdgeEffect = new EdgeEffectParameters
|
||||||
|
{
|
||||||
|
Radius = 75,
|
||||||
|
Type = EdgeEffectType.Shadow,
|
||||||
|
Colour = OsuColour.Gray(0.04f).Opacity(0.3f),
|
||||||
|
},
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
AlwaysPresent = true,
|
||||||
|
Alpha = 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
@ -47,6 +83,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
Font = OsuFont.GetFont(size: 16)
|
Font = OsuFont.GetFont(size: 16)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,9 +72,13 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
currentJoinRoomRequest?.Cancel();
|
currentJoinRoomRequest?.Cancel();
|
||||||
currentJoinRoomRequest = new JoinRoomRequest(room, password);
|
currentJoinRoomRequest = new JoinRoomRequest(room, password);
|
||||||
|
|
||||||
currentJoinRoomRequest.Success += () =>
|
currentJoinRoomRequest.Success += result =>
|
||||||
{
|
{
|
||||||
joinedRoom.Value = room;
|
joinedRoom.Value = room;
|
||||||
|
|
||||||
|
AddOrUpdateRoom(result);
|
||||||
|
room.CopyFrom(result); // Also copy back to the source model, since this is likely to have been stored elsewhere.
|
||||||
|
|
||||||
onSuccess?.Invoke(room);
|
onSuccess?.Invoke(room);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
=> MaxParticipantsField.Text = room.MaxParticipants?.ToString();
|
=> MaxParticipantsField.Text = room.MaxParticipants?.ToString();
|
||||||
|
|
||||||
private void updateRoomAutoStartDuration()
|
private void updateRoomAutoStartDuration()
|
||||||
=> typeLabel.Text = room.AutoStartDuration.GetLocalisableDescription();
|
=> startModeDropdown.Current.Value = (StartMode)room.AutoStartDuration.TotalSeconds;
|
||||||
|
|
||||||
private void updateRoomPlaylist()
|
private void updateRoomPlaylist()
|
||||||
=> drawablePlaylist.Items.ReplaceRange(0, drawablePlaylist.Items.Count, room.Playlist);
|
=> drawablePlaylist.Items.ReplaceRange(0, drawablePlaylist.Items.Count, room.Playlist);
|
||||||
|
@ -299,7 +299,13 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
{
|
{
|
||||||
case GlobalAction.Back:
|
case GlobalAction.Back:
|
||||||
if (!pendingAnimation)
|
if (!pendingAnimation)
|
||||||
|
{
|
||||||
|
if (IsDangerousAction)
|
||||||
|
BeginConfirm();
|
||||||
|
else
|
||||||
Confirm();
|
Confirm();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case GlobalAction.PauseGameplay:
|
case GlobalAction.PauseGameplay:
|
||||||
@ -307,7 +313,13 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
if (ReplayLoaded.Value) return false;
|
if (ReplayLoaded.Value) return false;
|
||||||
|
|
||||||
if (!pendingAnimation)
|
if (!pendingAnimation)
|
||||||
|
{
|
||||||
|
if (IsDangerousAction)
|
||||||
|
BeginConfirm();
|
||||||
|
else
|
||||||
Confirm();
|
Confirm();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -976,6 +976,8 @@ namespace osu.Game.Screens.Play
|
|||||||
if (PauseOverlay.State.Value == Visibility.Visible)
|
if (PauseOverlay.State.Value == Visibility.Visible)
|
||||||
PauseOverlay.Hide();
|
PauseOverlay.Hide();
|
||||||
|
|
||||||
|
bool restartOnFail = GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail);
|
||||||
|
if (!restartOnFail)
|
||||||
failAnimationContainer.Start();
|
failAnimationContainer.Start();
|
||||||
|
|
||||||
// Failures can be triggered either by a judgement, or by a mod.
|
// Failures can be triggered either by a judgement, or by a mod.
|
||||||
@ -990,7 +992,7 @@ namespace osu.Game.Screens.Play
|
|||||||
ScoreProcessor.FailScore(Score.ScoreInfo);
|
ScoreProcessor.FailScore(Score.ScoreInfo);
|
||||||
OnFail();
|
OnFail();
|
||||||
|
|
||||||
if (GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
|
if (restartOnFail)
|
||||||
Restart(true);
|
Restart(true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
joinRoomRequest.TriggerSuccess();
|
joinRoomRequest.TriggerSuccess(createResponseRoom(room, true));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user