mirror of
https://github.com/ppy/osu.git
synced 2025-03-20 07:17:31 +08:00
commit
ddc0177821
@ -16,9 +16,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
/// </summary>
|
||||
public class FocusedTextBox : OsuTextBox
|
||||
{
|
||||
protected override Color4 BackgroundUnfocused => new Color4(10, 10, 10, 255);
|
||||
protected override Color4 BackgroundFocused => new Color4(10, 10, 10, 255);
|
||||
|
||||
public Action Exit;
|
||||
|
||||
private bool focus;
|
||||
@ -47,6 +44,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
private void load(GameHost host)
|
||||
{
|
||||
this.host = host;
|
||||
|
||||
BackgroundUnfocused = new Color4(10, 10, 10, 255);
|
||||
BackgroundFocused = new Color4(10, 10, 10, 255);
|
||||
}
|
||||
|
||||
// We may not be focused yet, but we need to handle keyboard input to be able to request focus
|
||||
|
@ -16,10 +16,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public class OsuTextBox : TextBox, IKeyBindingHandler<GlobalAction>
|
||||
{
|
||||
protected override Color4 BackgroundUnfocused => Color4.Black.Opacity(0.5f);
|
||||
protected override Color4 BackgroundFocused => OsuColour.Gray(0.3f).Opacity(0.8f);
|
||||
protected override Color4 BackgroundCommit => BorderColour;
|
||||
|
||||
protected override float LeftRightPadding => 10;
|
||||
|
||||
protected override SpriteText CreatePlaceholder() => new OsuSpriteText
|
||||
@ -41,7 +37,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colour)
|
||||
{
|
||||
BorderColour = colour.Yellow;
|
||||
BackgroundUnfocused = Color4.Black.Opacity(0.5f);
|
||||
BackgroundFocused = OsuColour.Gray(0.3f).Opacity(0.8f);
|
||||
BackgroundCommit = BorderColour = colour.Yellow;
|
||||
}
|
||||
|
||||
protected override void OnFocus(FocusEvent e)
|
||||
|
@ -190,8 +190,12 @@ namespace osu.Game.Overlays.Chat.Selection
|
||||
|
||||
private class HeaderSearchTextBox : SearchTextBox
|
||||
{
|
||||
protected override Color4 BackgroundFocused => Color4.Black.Opacity(0.2f);
|
||||
protected override Color4 BackgroundUnfocused => Color4.Black.Opacity(0.2f);
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
BackgroundFocused = Color4.Black.Opacity(0.2f);
|
||||
BackgroundUnfocused = Color4.Black.Opacity(0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
|
||||
namespace osu.Game.Overlays.Music
|
||||
@ -53,15 +53,16 @@ namespace osu.Game.Overlays.Music
|
||||
|
||||
public class FilterTextBox : SearchTextBox
|
||||
{
|
||||
protected override Color4 BackgroundUnfocused => OsuColour.Gray(0.06f);
|
||||
protected override Color4 BackgroundFocused => OsuColour.Gray(0.12f);
|
||||
|
||||
protected override bool AllowCommit => true;
|
||||
|
||||
public FilterTextBox()
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Masking = true;
|
||||
CornerRadius = 5;
|
||||
|
||||
BackgroundUnfocused = OsuColour.Gray(0.06f);
|
||||
BackgroundFocused = OsuColour.Gray(0.12f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -127,10 +127,14 @@ namespace osu.Game.Overlays.SearchableList
|
||||
|
||||
private class FilterSearchTextBox : SearchTextBox
|
||||
{
|
||||
protected override Color4 BackgroundUnfocused => OsuColour.Gray(0.06f);
|
||||
protected override Color4 BackgroundFocused => OsuColour.Gray(0.12f);
|
||||
|
||||
protected override bool AllowCommit => true;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
BackgroundUnfocused = OsuColour.Gray(0.06f);
|
||||
BackgroundFocused = OsuColour.Gray(0.12f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -316,8 +316,12 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
|
||||
private class SettingsTextBox : OsuTextBox
|
||||
{
|
||||
protected override Color4 BackgroundUnfocused => Color4.Black;
|
||||
protected override Color4 BackgroundFocused => Color4.Black;
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
BackgroundUnfocused = Color4.Black;
|
||||
BackgroundFocused = Color4.Black;
|
||||
}
|
||||
}
|
||||
|
||||
private class SettingsNumberTextBox : SettingsTextBox
|
||||
@ -327,8 +331,12 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
|
||||
private class SettingsPasswordTextBox : OsuPasswordTextBox
|
||||
{
|
||||
protected override Color4 BackgroundUnfocused => Color4.Black;
|
||||
protected override Color4 BackgroundFocused => Color4.Black;
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
BackgroundUnfocused = Color4.Black;
|
||||
BackgroundFocused = Color4.Black;
|
||||
}
|
||||
}
|
||||
|
||||
private class SectionContainer : FillFlowContainer<Section>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.320.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.323.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.23.0" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
@ -105,8 +105,8 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.320.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.320.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.323.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.323.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user