mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 23:23:12 +08:00
Merge branch 'master' into multiplayer-remove-expired-item-removal
This commit is contained in:
commit
956da0383f
@ -7,7 +7,7 @@ using osu.Game.Online.API;
|
||||
|
||||
namespace osu.Game.Online.Rooms
|
||||
{
|
||||
public class JoinRoomRequest : APIRequest
|
||||
public class JoinRoomRequest : APIRequest<Room>
|
||||
{
|
||||
public readonly Room Room;
|
||||
public readonly string? Password;
|
||||
|
@ -268,7 +268,8 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
|
||||
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)
|
||||
windowModeDropdown.SetNoticeText(LayoutSettingsStrings.FullscreenMacOSNote, true);
|
||||
|
@ -8,6 +8,9 @@ using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
using osu.Game.Graphics;
|
||||
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.Game.Beatmaps;
|
||||
|
||||
@ -27,26 +30,60 @@ namespace osu.Game.Screens.Menu
|
||||
public SongTicker()
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Child = new FillFlowContainer
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 3),
|
||||
Children = new Drawable[]
|
||||
new Container
|
||||
{
|
||||
title = new OsuSpriteText
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Position = new Vector2(5, -5),
|
||||
Padding = new MarginPadding(-5),
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Light, italics: true)
|
||||
},
|
||||
artist = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Font = OsuFont.GetFont(size: 16)
|
||||
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,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 3),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
title = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Light, italics: true)
|
||||
},
|
||||
artist = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Font = OsuFont.GetFont(size: 16)
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -72,9 +72,13 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
currentJoinRoomRequest?.Cancel();
|
||||
currentJoinRoomRequest = new JoinRoomRequest(room, password);
|
||||
|
||||
currentJoinRoomRequest.Success += () =>
|
||||
currentJoinRoomRequest.Success += result =>
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
@ -71,7 +71,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
||||
return true;
|
||||
}
|
||||
|
||||
joinRoomRequest.TriggerSuccess();
|
||||
joinRoomRequest.TriggerSuccess(createResponseRoom(room, true));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user