mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:52:55 +08:00
Combine TriangleButton
and RoundedButton
classes
This commit is contained in:
parent
bea2acc60e
commit
53b03df93d
@ -10,6 +10,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Screens.OnlinePlay;
|
using osu.Game.Screens.OnlinePlay;
|
||||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||||
@ -148,7 +149,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
|
|
||||||
private class TestRoomSettings : PlaylistsRoomSettingsOverlay
|
private class TestRoomSettings : PlaylistsRoomSettingsOverlay
|
||||||
{
|
{
|
||||||
public TriangleButton ApplyButton => ((MatchSettings)Settings).ApplyButton;
|
public RoundedButton ApplyButton => ((MatchSettings)Settings).ApplyButton;
|
||||||
|
|
||||||
public OsuTextBox NameField => ((MatchSettings)Settings).NameField;
|
public OsuTextBox NameField => ((MatchSettings)Settings).NameField;
|
||||||
public OsuDropdown<TimeSpan> DurationField => ((MatchSettings)Settings).DurationField;
|
public OsuDropdown<TimeSpan> DurationField => ((MatchSettings)Settings).DurationField;
|
||||||
|
@ -10,6 +10,7 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -49,8 +50,8 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText { Text = "Sample content" },
|
new OsuSpriteText { Text = "Sample content" },
|
||||||
new TriangleButton { Text = "can't puush me", Width = 200, },
|
new RoundedButton { Text = "can't puush me", Width = 200, },
|
||||||
new TriangleButton { Text = "puush me", Width = 200, Action = () => { } },
|
new RoundedButton { Text = "puush me", Width = 200, Action = () => { } },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
overlay = new TestLoadingLayer(true),
|
overlay = new TestLoadingLayer(true),
|
||||||
|
@ -33,7 +33,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
Text = @"No OverlayColourProvider",
|
Text = @"No OverlayColourProvider",
|
||||||
Font = OsuFont.Default.With(size: 40)
|
Font = OsuFont.Default.With(size: 40)
|
||||||
},
|
},
|
||||||
new TriangleButtonWithPopover()
|
new RoundedButtonWithPopover()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -50,15 +50,15 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
Text = @"With OverlayColourProvider (orange)",
|
Text = @"With OverlayColourProvider (orange)",
|
||||||
Font = OsuFont.Default.With(size: 40)
|
Font = OsuFont.Default.With(size: 40)
|
||||||
},
|
},
|
||||||
new TriangleButtonWithPopover()
|
new RoundedButtonWithPopover()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TriangleButtonWithPopover : TriangleButton, IHasPopover
|
private class RoundedButtonWithPopover : RoundedButton, IHasPopover
|
||||||
{
|
{
|
||||||
public TriangleButtonWithPopover()
|
public RoundedButtonWithPopover()
|
||||||
{
|
{
|
||||||
Width = 100;
|
Width = 100;
|
||||||
Height = 30;
|
Height = 30;
|
||||||
|
@ -11,6 +11,7 @@ using osu.Framework.Screens;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Screens;
|
using osu.Game.Screens;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
@ -109,7 +110,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Text = Title,
|
Text = Title,
|
||||||
},
|
},
|
||||||
new TriangleButton
|
new RoundedButton
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
@ -61,7 +61,7 @@ namespace osu.Game.Tournament.Screens.Setup
|
|||||||
Spacing = new Vector2(10, 0),
|
Spacing = new Vector2(10, 0),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Button = new TriangleButton
|
Button = new RoundedButton
|
||||||
{
|
{
|
||||||
Size = new Vector2(100, 40),
|
Size = new Vector2(100, 40),
|
||||||
Action = () => Action?.Invoke()
|
Action = () => Action?.Invoke()
|
||||||
|
@ -93,7 +93,7 @@ namespace osu.Game.Tournament.Screens.Setup
|
|||||||
Spacing = new Vector2(20),
|
Spacing = new Vector2(20),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new TriangleButton
|
new RoundedButton
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -101,7 +101,7 @@ namespace osu.Game.Tournament.Screens.Setup
|
|||||||
Text = "Select stable path",
|
Text = "Select stable path",
|
||||||
Action = ChangePath
|
Action = ChangePath
|
||||||
},
|
},
|
||||||
new TriangleButton
|
new RoundedButton
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Tournament.IO;
|
using osu.Game.Tournament.IO;
|
||||||
|
|
||||||
namespace osu.Game.Tournament.Screens.Setup
|
namespace osu.Game.Tournament.Screens.Setup
|
||||||
@ -37,7 +38,7 @@ namespace osu.Game.Tournament.Screens.Setup
|
|||||||
{
|
{
|
||||||
var drawable = base.CreateComponent();
|
var drawable = base.CreateComponent();
|
||||||
|
|
||||||
FlowContainer.Insert(-1, folderButton = new TriangleButton
|
FlowContainer.Insert(-1, folderButton = new RoundedButton
|
||||||
{
|
{
|
||||||
Text = "Open folder",
|
Text = "Open folder",
|
||||||
Width = 100
|
Width = 100
|
||||||
|
@ -4,10 +4,11 @@
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
public class DangerousTriangleButton : TriangleButton
|
public class DangerousRoundedButton : RoundedButton
|
||||||
{
|
{
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
@ -1,14 +0,0 @@
|
|||||||
// 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.
|
|
||||||
|
|
||||||
using osu.Game.Graphics.UserInterfaceV2;
|
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A button with moving triangles in the background.
|
|
||||||
/// </summary>
|
|
||||||
public class TriangleButton : RoundedButton
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,11 +4,11 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.BeatmapSet.Buttons
|
namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||||
{
|
{
|
||||||
public class HeaderButton : TriangleButton
|
public class HeaderButton : RoundedButton
|
||||||
{
|
{
|
||||||
public HeaderButton()
|
public HeaderButton()
|
||||||
{
|
{
|
||||||
|
@ -203,7 +203,7 @@ namespace osu.Game.Overlays.Dashboard
|
|||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
},
|
},
|
||||||
new PurpleTriangleButton
|
new PurpleRoundedButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Spectate",
|
Text = "Spectate",
|
||||||
|
@ -22,6 +22,7 @@ using osu.Game.Database;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Input;
|
using osu.Game.Input;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
using osu.Game.Resources.Localisation.Web;
|
using osu.Game.Resources.Localisation.Web;
|
||||||
@ -446,7 +447,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
isDefault.Value = bindings.Select(b => b.KeyCombination).SequenceEqual(Defaults);
|
isDefault.Value = bindings.Select(b => b.KeyCombination).SequenceEqual(Defaults);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CancelButton : TriangleButton
|
private class CancelButton : RoundedButton
|
||||||
{
|
{
|
||||||
public CancelButton()
|
public CancelButton()
|
||||||
{
|
{
|
||||||
@ -455,7 +456,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ClearButton : DangerousTriangleButton
|
public class ClearButton : DangerousRoundedButton
|
||||||
{
|
{
|
||||||
public ClearButton()
|
public ClearButton()
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,6 @@ using osuTK;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
@ -22,7 +21,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
public abstract class DirectorySelectScreen : OsuScreen
|
public abstract class DirectorySelectScreen : OsuScreen
|
||||||
{
|
{
|
||||||
private TriangleButton selectionButton;
|
private RoundedButton selectionButton;
|
||||||
|
|
||||||
private OsuDirectorySelector directorySelector;
|
private OsuDirectorySelector directorySelector;
|
||||||
|
|
||||||
@ -101,7 +100,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
},
|
},
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
selectionButton = new TriangleButton
|
selectionButton = new RoundedButton
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
|
@ -14,7 +14,6 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
using osu.Game.Graphics.UserInterfaceV2;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
@ -28,7 +27,7 @@ namespace osu.Game.Screens.Import
|
|||||||
private Container contentContainer;
|
private Container contentContainer;
|
||||||
private TextFlowContainer currentFileText;
|
private TextFlowContainer currentFileText;
|
||||||
|
|
||||||
private TriangleButton importButton;
|
private RoundedButton importButton;
|
||||||
|
|
||||||
private const float duration = 300;
|
private const float duration = 300;
|
||||||
private const float button_height = 50;
|
private const float button_height = 50;
|
||||||
@ -100,7 +99,7 @@ namespace osu.Game.Screens.Import
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
importButton = new TriangleButton
|
importButton = new RoundedButton
|
||||||
{
|
{
|
||||||
Text = "Import",
|
Text = "Import",
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
|
@ -9,7 +9,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
@ -54,7 +54,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
},
|
},
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new TriangleButton
|
new RoundedButton
|
||||||
{
|
{
|
||||||
Text = "Add new playlist entry",
|
Text = "Add new playlist entry",
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
@ -7,13 +7,13 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Online;
|
using osu.Game.Online;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay.Components
|
namespace osu.Game.Screens.OnlinePlay.Components
|
||||||
{
|
{
|
||||||
public abstract class ReadyButton : TriangleButton, IHasTooltip
|
public abstract class ReadyButton : RoundedButton, IHasTooltip
|
||||||
{
|
{
|
||||||
public new readonly BindableBool Enabled = new BindableBool();
|
public new readonly BindableBool Enabled = new BindableBool();
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
}
|
}
|
||||||
|
|
||||||
private OsuPasswordTextBox passwordTextBox;
|
private OsuPasswordTextBox passwordTextBox;
|
||||||
private TriangleButton joinButton;
|
private RoundedButton joinButton;
|
||||||
private OsuSpriteText errorText;
|
private OsuSpriteText errorText;
|
||||||
private Sample sampleJoinFail;
|
private Sample sampleJoinFail;
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
Width = 200,
|
Width = 200,
|
||||||
PlaceholderText = "password",
|
PlaceholderText = "password",
|
||||||
},
|
},
|
||||||
joinButton = new TriangleButton
|
joinButton = new RoundedButton
|
||||||
{
|
{
|
||||||
Width = 80,
|
Width = 80,
|
||||||
Text = "Join Room",
|
Text = "Join Room",
|
||||||
|
@ -10,7 +10,7 @@ using osu.Framework.Input.Events;
|
|||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||||
{
|
{
|
||||||
public abstract class CreateRoomButton : PurpleTriangleButton, IKeyBindingHandler<PlatformAction>
|
public abstract class CreateRoomButton : PurpleRoundedButton, IKeyBindingHandler<PlatformAction>
|
||||||
{
|
{
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||||
{
|
{
|
||||||
public class PurpleTriangleButton : TriangleButton
|
public class PurpleRoundedButton : RoundedButton
|
||||||
{
|
{
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
@ -48,7 +48,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
{
|
{
|
||||||
if (allowEdit)
|
if (allowEdit)
|
||||||
{
|
{
|
||||||
ButtonsContainer.Add(editButton = new PurpleTriangleButton
|
ButtonsContainer.Add(editButton = new PurpleRoundedButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Size = new Vector2(100, 1),
|
Size = new Vector2(100, 1),
|
||||||
|
@ -517,7 +517,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
/// <param name="room">The room to change the settings of.</param>
|
/// <param name="room">The room to change the settings of.</param>
|
||||||
protected abstract RoomSettingsOverlay CreateRoomSettingsOverlay(Room room);
|
protected abstract RoomSettingsOverlay CreateRoomSettingsOverlay(Room room);
|
||||||
|
|
||||||
public class UserModSelectButton : PurpleTriangleButton, IKeyBindingHandler<GlobalAction>
|
public class UserModSelectButton : PurpleRoundedButton, IKeyBindingHandler<GlobalAction>
|
||||||
{
|
{
|
||||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
@ -64,7 +65,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
public OsuEnumDropdown<QueueMode> QueueModeDropdown = null!;
|
public OsuEnumDropdown<QueueMode> QueueModeDropdown = null!;
|
||||||
public OsuTextBox PasswordTextBox = null!;
|
public OsuTextBox PasswordTextBox = null!;
|
||||||
public OsuCheckbox AutoSkipCheckbox = null!;
|
public OsuCheckbox AutoSkipCheckbox = null!;
|
||||||
public TriangleButton ApplyButton = null!;
|
public RoundedButton ApplyButton = null!;
|
||||||
|
|
||||||
public OsuSpriteText ErrorText = null!;
|
public OsuSpriteText ErrorText = null!;
|
||||||
|
|
||||||
@ -274,7 +275,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = DrawableRoomPlaylistItem.HEIGHT
|
Height = DrawableRoomPlaylistItem.HEIGHT
|
||||||
},
|
},
|
||||||
new PurpleTriangleButton
|
new PurpleRoundedButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = 40,
|
Height = 40,
|
||||||
@ -460,7 +461,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CreateOrUpdateButton : TriangleButton
|
public class CreateOrUpdateButton : RoundedButton
|
||||||
{
|
{
|
||||||
[Resolved(typeof(Room), nameof(Room.RoomID))]
|
[Resolved(typeof(Room), nameof(Room.RoomID))]
|
||||||
private Bindable<long?> roomId { get; set; } = null!;
|
private Bindable<long?> roomId { get; set; } = null!;
|
||||||
|
@ -7,7 +7,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
@ -23,11 +23,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
|
|
||||||
private IBindable<bool> operationInProgress;
|
private IBindable<bool> operationInProgress;
|
||||||
|
|
||||||
private readonly TriangleButton button;
|
private readonly RoundedButton button;
|
||||||
|
|
||||||
public MultiplayerSpectateButton()
|
public MultiplayerSpectateButton()
|
||||||
{
|
{
|
||||||
InternalChild = button = new TriangleButton
|
InternalChild = button = new RoundedButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Size = Vector2.One,
|
Size = Vector2.One,
|
||||||
|
@ -430,7 +430,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
modSettingChangeTracker?.Dispose();
|
modSettingChangeTracker?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AddItemButton : PurpleTriangleButton
|
public class AddItemButton : PurpleRoundedButton
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
@ -58,7 +59,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
public OsuTextBox NameField = null!, MaxParticipantsField = null!, MaxAttemptsField = null!;
|
public OsuTextBox NameField = null!, MaxParticipantsField = null!, MaxAttemptsField = null!;
|
||||||
public OsuDropdown<TimeSpan> DurationField = null!;
|
public OsuDropdown<TimeSpan> DurationField = null!;
|
||||||
public RoomAvailabilityPicker AvailabilityPicker = null!;
|
public RoomAvailabilityPicker AvailabilityPicker = null!;
|
||||||
public TriangleButton ApplyButton = null!;
|
public RoundedButton ApplyButton = null!;
|
||||||
|
|
||||||
public bool IsLoading => loadingLayer.State.Value == Visibility.Visible;
|
public bool IsLoading => loadingLayer.State.Value == Visibility.Visible;
|
||||||
|
|
||||||
@ -68,7 +69,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
private DrawableRoomPlaylist playlist = null!;
|
private DrawableRoomPlaylist playlist = null!;
|
||||||
private OsuSpriteText playlistLength = null!;
|
private OsuSpriteText playlistLength = null!;
|
||||||
|
|
||||||
private PurpleTriangleButton editPlaylistButton = null!;
|
private PurpleRoundedButton editPlaylistButton = null!;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private IRoomManager? manager { get; set; }
|
private IRoomManager? manager { get; set; }
|
||||||
@ -222,7 +223,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
},
|
},
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
editPlaylistButton = new PurpleTriangleButton
|
editPlaylistButton = new PurpleRoundedButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = 40,
|
Height = 40,
|
||||||
@ -414,7 +415,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CreateRoomButton : TriangleButton
|
public class CreateRoomButton : RoundedButton
|
||||||
{
|
{
|
||||||
public CreateRoomButton()
|
public CreateRoomButton()
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ using osu.Game.Beatmaps.Drawables.Cards;
|
|||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
@ -54,7 +54,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
|
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
|
||||||
|
|
||||||
private Container beatmapPanelContainer;
|
private Container beatmapPanelContainer;
|
||||||
private TriangleButton watchButton;
|
private RoundedButton watchButton;
|
||||||
private SettingsCheckbox automaticDownload;
|
private SettingsCheckbox automaticDownload;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -147,7 +147,7 @@ namespace osu.Game.Screens.Play
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
},
|
},
|
||||||
watchButton = new PurpleTriangleButton
|
watchButton = new PurpleRoundedButton
|
||||||
{
|
{
|
||||||
Text = "Start Watching",
|
Text = "Start Watching",
|
||||||
Width = 250,
|
Width = 250,
|
||||||
|
@ -12,7 +12,7 @@ using osu.Framework.Testing;
|
|||||||
using osu.Framework.Testing.Input;
|
using osu.Framework.Testing.Input;
|
||||||
using osu.Game.Graphics.Cursor;
|
using osu.Game.Graphics.Cursor;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -27,8 +27,8 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
protected readonly ManualInputManager InputManager;
|
protected readonly ManualInputManager InputManager;
|
||||||
|
|
||||||
private readonly TriangleButton buttonTest;
|
private readonly RoundedButton buttonTest;
|
||||||
private readonly TriangleButton buttonLocal;
|
private readonly RoundedButton buttonLocal;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to create a nested container to handle <see cref="GlobalAction"/>s that result from local (manual) test input.
|
/// Whether to create a nested container to handle <see cref="GlobalAction"/>s that result from local (manual) test input.
|
||||||
@ -110,13 +110,13 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
buttonLocal = new TriangleButton
|
buttonLocal = new RoundedButton
|
||||||
{
|
{
|
||||||
Text = "local",
|
Text = "local",
|
||||||
Size = new Vector2(50, 30),
|
Size = new Vector2(50, 30),
|
||||||
Action = returnUserInput
|
Action = returnUserInput
|
||||||
},
|
},
|
||||||
buttonTest = new TriangleButton
|
buttonTest = new RoundedButton
|
||||||
{
|
{
|
||||||
Text = "test",
|
Text = "test",
|
||||||
Size = new Vector2(50, 30),
|
Size = new Vector2(50, 30),
|
||||||
|
Loading…
Reference in New Issue
Block a user