mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 14:17:06 +09:00
Merge branch 'master' into skip-button
# Conflicts: # osu.Game/Graphics/UserInterface/BackButton.cs # osu.Game/Screens/Play/Player.cs # osu.Game/osu.Game.csproj
This commit is contained in:
@ -2,23 +2,34 @@
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.Backgrounds;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public class OsuButton : Button
|
||||
{
|
||||
public OsuButton()
|
||||
{
|
||||
Height = 25;
|
||||
Height = 40;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Colour = colours.BlueDark;
|
||||
Masking = true;
|
||||
CornerRadius = 5;
|
||||
|
||||
Add(new Triangles
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ColourDark = colours.BlueDarker,
|
||||
ColourLight = colours.Blue,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
48
osu.Game/Graphics/UserInterface/OsuTextBox.cs
Normal file
48
osu.Game/Graphics/UserInterface/OsuTextBox.cs
Normal file
@ -0,0 +1,48 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public class OsuTextBox : TextBox
|
||||
{
|
||||
public OsuTextBox()
|
||||
{
|
||||
Height = 40;
|
||||
TextContainer.Height = 0.6f;
|
||||
CornerRadius = 5;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colour)
|
||||
{
|
||||
BorderColour = colour.Yellow;
|
||||
}
|
||||
|
||||
protected override bool OnFocus(InputState state)
|
||||
{
|
||||
BorderThickness = 3;
|
||||
|
||||
return base.OnFocus(state);
|
||||
}
|
||||
|
||||
protected override void OnFocusLost(InputState state)
|
||||
{
|
||||
BorderThickness = 0;
|
||||
|
||||
base.OnFocusLost(state);
|
||||
}
|
||||
}
|
||||
|
||||
public class OsuPasswordTextBox : OsuTextBox
|
||||
{
|
||||
protected virtual char MaskCharacter => '*';
|
||||
|
||||
protected override Drawable AddCharacterToFlow(char c) => base.AddCharacterToFlow(MaskCharacter);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user