mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 23:23:12 +08:00
Merge branch 'master' into cache-setting-source
This commit is contained in:
commit
38f4b0ced2
@ -1,8 +1,8 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Benchmarks" type="DotNetProject" factoryName=".NET Project">
|
<configuration default="false" name="Benchmarks" type="DotNetProject" factoryName=".NET Project">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/osu.Game.Benchmarks/bin/Release/net5.0/osu.Game.Benchmarks.dll" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/osu.Game.Benchmarks/bin/Debug/net5.0/osu.Game.Benchmarks.dll" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="--filter *" />
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/osu.Game.Benchmarks/bin/Release/net5.0" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/osu.Game.Benchmarks/bin/Debug/net5.0" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
<option name="USE_MONO" value="0" />
|
<option name="USE_MONO" value="0" />
|
||||||
@ -14,7 +14,7 @@
|
|||||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||||
<option name="PROJECT_TFM" value="net5.0" />
|
<option name="PROJECT_TFM" value="net5.0" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Build" enabled="true" />
|
<option name="Build" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
@ -31,12 +31,11 @@ If you are looking to install or test osu! without setting up a development envi
|
|||||||
|
|
||||||
**Latest build:**
|
**Latest build:**
|
||||||
|
|
||||||
| [Windows (x64)](https://github.com/ppy/osu/releases/latest/download/install.exe) | [macOS 10.12+](https://github.com/ppy/osu/releases/latest/download/osu.app.zip) | [Linux (x64)](https://github.com/ppy/osu/releases/latest/download/osu.AppImage) | [iOS(iOS 10+)](https://osu.ppy.sh/home/testflight) | [Android (5+)](https://github.com/ppy/osu/releases/latest/download/sh.ppy.osulazer.apk)
|
| [Windows 8.1+ (x64)](https://github.com/ppy/osu/releases/latest/download/install.exe) | [macOS 10.12+](https://github.com/ppy/osu/releases/latest/download/osu.app.zip) | [Linux (x64)](https://github.com/ppy/osu/releases/latest/download/osu.AppImage) | [iOS 10+](https://osu.ppy.sh/home/testflight) | [Android 5+](https://github.com/ppy/osu/releases/latest/download/sh.ppy.osulazer.apk)
|
||||||
| ------------- | ------------- | ------------- | ------------- | ------------- |
|
| ------------- | ------------- | ------------- | ------------- | ------------- |
|
||||||
|
|
||||||
- The iOS testflight link may fill up (Apple has a hard limit of 10,000 users). We reset it occasionally when this happens. Please do not ask about this. Check back regularly for link resets or follow [peppy](https://twitter.com/ppy) on twitter for announcements of link resets.
|
- The iOS testflight link may fill up (Apple has a hard limit of 10,000 users). We reset it occasionally when this happens. Please do not ask about this. Check back regularly for link resets or follow [peppy](https://twitter.com/ppy) on twitter for announcements of link resets.
|
||||||
|
|
||||||
- When running on Windows 7 or 8.1, *[additional prerequisites](https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net50&pivots=os-windows#dependencies)** may be required to correctly run .NET 5 applications if your operating system is not up-to-date with the latest service packs.
|
|
||||||
If your platform is not listed above, there is still a chance you can manually build it by following the instructions below.
|
If your platform is not listed above, there is still a chance you can manually build it by following the instructions below.
|
||||||
|
|
||||||
## Developing a custom ruleset
|
## Developing a custom ruleset
|
||||||
|
@ -14,9 +14,9 @@ namespace osu.Game.Benchmarks
|
|||||||
[Params(1, 10, 100)]
|
[Params(1, 10, 100)]
|
||||||
public int Times { get; set; }
|
public int Times { get; set; }
|
||||||
|
|
||||||
[GlobalSetup]
|
public override void SetUp()
|
||||||
public void GlobalSetup()
|
|
||||||
{
|
{
|
||||||
|
base.SetUp();
|
||||||
mod = new OsuModDoubleTime();
|
mod = new OsuModDoubleTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using BenchmarkDotNet.Configs;
|
||||||
using BenchmarkDotNet.Running;
|
using BenchmarkDotNet.Running;
|
||||||
|
|
||||||
namespace osu.Game.Benchmarks
|
namespace osu.Game.Benchmarks
|
||||||
@ -11,7 +12,7 @@ namespace osu.Game.Benchmarks
|
|||||||
{
|
{
|
||||||
BenchmarkSwitcher
|
BenchmarkSwitcher
|
||||||
.FromAssembly(typeof(Program).Assembly)
|
.FromAssembly(typeof(Program).Assembly)
|
||||||
.Run(args);
|
.Run(args, DefaultConfig.Instance.WithOption(ConfigOptions.DisableOptimizationsValidator, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
Type = { Value = MatchType.HeadToHead },
|
Type = { Value = MatchType.HeadToHead },
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
AddUntilStep("wait for panel load", () => drawableRoom.ChildrenOfType<RecentParticipantsList>().Any());
|
||||||
|
|
||||||
AddAssert("password icon hidden", () => Precision.AlmostEquals(0, drawableRoom.ChildrenOfType<DrawableRoom.PasswordProtectedIcon>().Single().Alpha));
|
AddAssert("password icon hidden", () => Precision.AlmostEquals(0, drawableRoom.ChildrenOfType<DrawableRoom.PasswordProtectedIcon>().Single().Alpha));
|
||||||
|
|
||||||
AddStep("set password", () => room.Password.Value = "password");
|
AddStep("set password", () => room.Password.Value = "password");
|
||||||
|
@ -32,6 +32,12 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
|
|
||||||
private RoomsContainer roomsContainer => loungeScreen.ChildrenOfType<RoomsContainer>().First();
|
private RoomsContainer roomsContainer => loungeScreen.ChildrenOfType<RoomsContainer>().First();
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestManyRooms()
|
||||||
|
{
|
||||||
|
AddStep("add rooms", () => RoomManager.AddRooms(500));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestScrollByDraggingRooms()
|
public void TestScrollByDraggingRooms()
|
||||||
{
|
{
|
||||||
|
@ -87,23 +87,25 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
private void createLink(IEnumerable<Drawable> drawables, LinkDetails link, string tooltipText, Action action = null)
|
private void createLink(IEnumerable<Drawable> drawables, LinkDetails link, string tooltipText, Action action = null)
|
||||||
{
|
{
|
||||||
AddInternal(new DrawableLinkCompiler(drawables.OfType<SpriteText>().ToList())
|
var linkCompiler = CreateLinkCompiler(drawables.OfType<SpriteText>());
|
||||||
|
linkCompiler.RelativeSizeAxes = Axes.Both;
|
||||||
|
linkCompiler.TooltipText = tooltipText;
|
||||||
|
linkCompiler.Action = () =>
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
if (action != null)
|
||||||
TooltipText = tooltipText,
|
action();
|
||||||
Action = () =>
|
else if (game != null)
|
||||||
{
|
game.HandleLink(link);
|
||||||
if (action != null)
|
// fallback to handle cases where OsuGame is not available, ie. tournament client.
|
||||||
action();
|
else if (link.Action == LinkAction.External)
|
||||||
else if (game != null)
|
host.OpenUrlExternally(link.Argument);
|
||||||
game.HandleLink(link);
|
};
|
||||||
// fallback to handle cases where OsuGame is not available, ie. tournament client.
|
|
||||||
else if (link.Action == LinkAction.External)
|
AddInternal(linkCompiler);
|
||||||
host.OpenUrlExternally(link.Argument);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual DrawableLinkCompiler CreateLinkCompiler(IEnumerable<SpriteText> parts) => new DrawableLinkCompiler(parts);
|
||||||
|
|
||||||
// We want the compilers to always be visible no matter where they are, so RelativeSizeAxes is used.
|
// We want the compilers to always be visible no matter where they are, so RelativeSizeAxes is used.
|
||||||
// However due to https://github.com/ppy/osu-framework/issues/2073, it's possible for the compilers to be relative size in the flow's auto-size axes - an unsupported operation.
|
// However due to https://github.com/ppy/osu-framework/issues/2073, it's possible for the compilers to be relative size in the flow's auto-size axes - an unsupported operation.
|
||||||
// Since the compilers don't display any content and don't affect the layout, it's simplest to exclude them from the flow.
|
// Since the compilers don't display any content and don't affect the layout, it's simplest to exclude them from the flow.
|
||||||
|
@ -126,7 +126,7 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
};
|
};
|
||||||
|
|
||||||
supportLinkText.AddText("Support further development of osu! and ");
|
supportLinkText.AddText("Support further development of osu! and ");
|
||||||
supportLinkText.AddLink("become an osu!supporter", "https://osu.ppy.sh/home/support", t => t.Font = t.Font.With(weight: FontWeight.Bold));
|
supportLinkText.AddLink("become an osu!supporter", @"https://osu.ppy.sh/home/support", t => t.Font = t.Font.With(weight: FontWeight.Bold));
|
||||||
supportLinkText.AddText(" today!");
|
supportLinkText.AddText(" today!");
|
||||||
|
|
||||||
imageContainer.Children = new Drawable[]
|
imageContainer.Children = new Drawable[]
|
||||||
@ -170,27 +170,18 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public new void AddLink(string text, string url, Action<SpriteText> creationParameters) =>
|
protected override DrawableLinkCompiler CreateLinkCompiler(IEnumerable<SpriteText> parts) => new SupporterPromoLinkCompiler(parts);
|
||||||
AddInternal(new SupporterPromoLinkCompiler(AddText(text, creationParameters)) { Url = url });
|
|
||||||
|
|
||||||
private class SupporterPromoLinkCompiler : DrawableLinkCompiler
|
private class SupporterPromoLinkCompiler : DrawableLinkCompiler
|
||||||
{
|
{
|
||||||
[Resolved(CanBeNull = true)]
|
|
||||||
private OsuGame game { get; set; }
|
|
||||||
|
|
||||||
public string Url;
|
|
||||||
|
|
||||||
public SupporterPromoLinkCompiler(IEnumerable<Drawable> parts)
|
public SupporterPromoLinkCompiler(IEnumerable<Drawable> parts)
|
||||||
: base(parts)
|
: base(parts)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colour)
|
private void load(OsuColour colour)
|
||||||
{
|
{
|
||||||
TooltipText = Url;
|
|
||||||
Action = () => game?.HandleLink(Url);
|
|
||||||
IdleColour = colour.PinkDark;
|
IdleColour = colour.PinkDark;
|
||||||
HoverColour = Color4.White;
|
HoverColour = Color4.White;
|
||||||
}
|
}
|
||||||
|
@ -355,6 +355,12 @@ namespace osu.Game.Overlays.Volume
|
|||||||
return base.OnMouseMove(e);
|
return base.OnMouseMove(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool OnHover(HoverEvent e)
|
||||||
|
{
|
||||||
|
State = SelectionState.Selected;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(HoverLostEvent e)
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,8 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
private PasswordProtectedIcon passwordIcon;
|
private PasswordProtectedIcon passwordIcon;
|
||||||
private EndDateInfo endDateInfo;
|
private EndDateInfo endDateInfo;
|
||||||
|
|
||||||
|
private DelayedLoadWrapper wrapper;
|
||||||
|
|
||||||
public DrawableRoom(Room room)
|
public DrawableRoom(Room room)
|
||||||
{
|
{
|
||||||
Room = room;
|
Room = room;
|
||||||
@ -63,6 +65,14 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OverlayColourProvider colours)
|
private void load(OverlayColourProvider colours)
|
||||||
{
|
{
|
||||||
|
ButtonsContainer = new Container
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreRight,
|
||||||
|
Origin = Anchor.CentreRight,
|
||||||
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
AutoSizeAxes = Axes.X
|
||||||
|
};
|
||||||
|
|
||||||
InternalChildren = new[]
|
InternalChildren = new[]
|
||||||
{
|
{
|
||||||
// This resolves internal 1px gaps due to applying the (parenting) corner radius and masking across multiple filling background sprites.
|
// This resolves internal 1px gaps due to applying the (parenting) corner radius and masking across multiple filling background sprites.
|
||||||
@ -75,155 +85,153 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
{
|
{
|
||||||
d.RelativeSizeAxes = Axes.Both;
|
d.RelativeSizeAxes = Axes.Both;
|
||||||
}),
|
}),
|
||||||
new Container
|
wrapper = new DelayedLoadWrapper(() =>
|
||||||
{
|
new Container
|
||||||
Name = @"Room content",
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
// This negative padding resolves 1px gaps between this background and the background above.
|
|
||||||
Padding = new MarginPadding { Left = 20, Vertical = -0.5f },
|
|
||||||
Child = new Container
|
|
||||||
{
|
{
|
||||||
|
Name = @"Room content",
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Masking = true,
|
// This negative padding resolves 1px gaps between this background and the background above.
|
||||||
CornerRadius = CORNER_RADIUS,
|
Padding = new MarginPadding { Left = 20, Vertical = -0.5f },
|
||||||
Children = new Drawable[]
|
Child = new Container
|
||||||
{
|
{
|
||||||
new GridContainer
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Masking = true,
|
||||||
|
CornerRadius = CORNER_RADIUS,
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new GridContainer
|
||||||
ColumnDimensions = new[]
|
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.Relative, 0.2f)
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
ColumnDimensions = new[]
|
||||||
Content = new[]
|
|
||||||
{
|
|
||||||
new Drawable[]
|
|
||||||
{
|
{
|
||||||
new Box
|
new Dimension(GridSizeMode.Relative, 0.2f)
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = colours.Background5,
|
|
||||||
},
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = ColourInfo.GradientHorizontal(colours.Background5, colours.Background5.Opacity(0.3f))
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new Container
|
|
||||||
{
|
|
||||||
Name = @"Left details",
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Padding = new MarginPadding
|
|
||||||
{
|
|
||||||
Left = 20,
|
|
||||||
Vertical = 5
|
|
||||||
},
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Spacing = new Vector2(5),
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new RoomStatusPill
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft
|
|
||||||
},
|
|
||||||
specialCategoryPill = new RoomSpecialCategoryPill
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft
|
|
||||||
},
|
|
||||||
endDateInfo = new EndDateInfo
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Padding = new MarginPadding { Top = 3 },
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new RoomNameText(),
|
|
||||||
new RoomHostText(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
Content = new[]
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
new Drawable[]
|
||||||
Origin = Anchor.BottomLeft,
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Spacing = new Vector2(5),
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
{
|
||||||
new PlaylistCountPill
|
new Box
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Origin = Anchor.CentreLeft,
|
Colour = colours.Background5,
|
||||||
},
|
},
|
||||||
new StarRatingRangeDisplay
|
new Box
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Origin = Anchor.CentreLeft,
|
Colour = ColourInfo.GradientHorizontal(colours.Background5, colours.Background5.Opacity(0.3f))
|
||||||
Scale = new Vector2(0.8f)
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Container
|
||||||
|
{
|
||||||
|
Name = @"Left details",
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Padding = new MarginPadding
|
||||||
|
{
|
||||||
|
Left = 20,
|
||||||
|
Vertical = 5
|
||||||
|
},
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
|
Spacing = new Vector2(5),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new RoomStatusPill
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft
|
||||||
|
},
|
||||||
|
specialCategoryPill = new RoomSpecialCategoryPill
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft
|
||||||
|
},
|
||||||
|
endDateInfo = new EndDateInfo
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Padding = new MarginPadding { Top = 3 },
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new RoomNameText(),
|
||||||
|
new RoomHostText(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new FillFlowContainer
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
|
Spacing = new Vector2(5),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new PlaylistCountPill
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
},
|
||||||
|
new StarRatingRangeDisplay
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Scale = new Vector2(0.8f)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
Name = "Right content",
|
|
||||||
Anchor = Anchor.CentreRight,
|
|
||||||
Origin = Anchor.CentreRight,
|
|
||||||
AutoSizeAxes = Axes.X,
|
|
||||||
RelativeSizeAxes = Axes.Y,
|
|
||||||
Spacing = new Vector2(5),
|
|
||||||
Padding = new MarginPadding
|
|
||||||
{
|
|
||||||
Right = 10,
|
|
||||||
Vertical = 20,
|
|
||||||
},
|
},
|
||||||
Children = new Drawable[]
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
ButtonsContainer = new Container
|
Name = "Right content",
|
||||||
|
Anchor = Anchor.CentreRight,
|
||||||
|
Origin = Anchor.CentreRight,
|
||||||
|
AutoSizeAxes = Axes.X,
|
||||||
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Spacing = new Vector2(5),
|
||||||
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreRight,
|
Right = 10,
|
||||||
Origin = Anchor.CentreRight,
|
Vertical = 20,
|
||||||
RelativeSizeAxes = Axes.Y,
|
|
||||||
AutoSizeAxes = Axes.X
|
|
||||||
},
|
},
|
||||||
recentParticipantsList = new RecentParticipantsList
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreRight,
|
ButtonsContainer,
|
||||||
Origin = Anchor.CentreRight,
|
recentParticipantsList = new RecentParticipantsList
|
||||||
NumberOfCircles = NumberOfAvatars
|
{
|
||||||
|
Anchor = Anchor.CentreRight,
|
||||||
|
Origin = Anchor.CentreRight,
|
||||||
|
NumberOfCircles = NumberOfAvatars
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
passwordIcon = new PasswordProtectedIcon { Alpha = 0 }
|
||||||
},
|
},
|
||||||
passwordIcon = new PasswordProtectedIcon { Alpha = 0 }
|
|
||||||
},
|
},
|
||||||
},
|
}, 0)
|
||||||
},
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,23 +239,28 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
roomCategory.BindTo(Room.Category);
|
wrapper.DelayedLoadComplete += _ =>
|
||||||
roomCategory.BindValueChanged(c =>
|
|
||||||
{
|
{
|
||||||
if (c.NewValue == RoomCategory.Spotlight)
|
wrapper.FadeInFromZero(200);
|
||||||
specialCategoryPill.Show();
|
|
||||||
else
|
|
||||||
specialCategoryPill.Hide();
|
|
||||||
}, true);
|
|
||||||
|
|
||||||
roomType.BindTo(Room.Type);
|
roomCategory.BindTo(Room.Category);
|
||||||
roomType.BindValueChanged(t =>
|
roomCategory.BindValueChanged(c =>
|
||||||
{
|
{
|
||||||
endDateInfo.Alpha = t.NewValue == MatchType.Playlists ? 1 : 0;
|
if (c.NewValue == RoomCategory.Spotlight)
|
||||||
}, true);
|
specialCategoryPill.Show();
|
||||||
|
else
|
||||||
|
specialCategoryPill.Hide();
|
||||||
|
}, true);
|
||||||
|
|
||||||
hasPassword.BindTo(Room.HasPassword);
|
roomType.BindTo(Room.Type);
|
||||||
hasPassword.BindValueChanged(v => passwordIcon.Alpha = v.NewValue ? 1 : 0, true);
|
roomType.BindValueChanged(t =>
|
||||||
|
{
|
||||||
|
endDateInfo.Alpha = t.NewValue == MatchType.Playlists ? 1 : 0;
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
hasPassword.BindTo(Room.HasPassword);
|
||||||
|
hasPassword.BindValueChanged(v => passwordIcon.Alpha = v.NewValue ? 1 : 0, true);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
|
@ -83,12 +83,10 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
if (matchingFilter)
|
Alpha = matchingFilter ? 1 : 0;
|
||||||
this.FadeInFromZero(transition_duration);
|
selectionBox.Alpha = SelectedRoom.Value == Room ? 1 : 0;
|
||||||
else
|
|
||||||
Alpha = 0;
|
|
||||||
|
|
||||||
SelectedRoom.BindValueChanged(updateSelectedRoom, true);
|
SelectedRoom.BindValueChanged(updateSelectedRoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateSelectedRoom(ValueChangedEvent<Room> selected)
|
private void updateSelectedRoom(ValueChangedEvent<Room> selected)
|
||||||
|
Loading…
Reference in New Issue
Block a user