mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Hardcoded button size, fixed input handling, fixed flash not being visible
This commit is contained in:
@ -29,7 +29,10 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
public BackButton()
|
public BackButton()
|
||||||
{
|
{
|
||||||
Width = 80;
|
RelativeSizeAxes = Axes.None;
|
||||||
|
Width = 120;
|
||||||
|
Height = 50; // same as bottomToolHeight in PlaySongSelect
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
leftContainer = new Container
|
leftContainer = new Container
|
||||||
@ -56,7 +59,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
Origin = Anchor.TopLeft,
|
Origin = Anchor.TopLeft,
|
||||||
Anchor = Anchor.TopLeft,
|
Anchor = Anchor.TopLeft,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Width = 80,
|
||||||
Position = Position + InitialExtendLength,
|
Position = Position + InitialExtendLength,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -86,6 +90,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
rightContainer.MoveTo(Position + ExtendLength, transform_time, EasingTypes.OutElastic);
|
rightContainer.MoveTo(Position + ExtendLength, transform_time, EasingTypes.OutElastic);
|
||||||
leftContainer.ResizeTo(new Vector2(ExtendLength.X, 1.0f), transform_time, EasingTypes.OutElastic);
|
leftContainer.ResizeTo(new Vector2(ExtendLength.X, 1.0f), transform_time, EasingTypes.OutElastic);
|
||||||
|
|
||||||
|
Width = 140; // right container + ExtendLength
|
||||||
|
|
||||||
int duration = 0; //(int)(Game.Audio.BeatLength / 2);
|
int duration = 0; //(int)(Game.Audio.BeatLength / 2);
|
||||||
if (duration == 0) duration = pulse_length;
|
if (duration == 0) duration = pulse_length;
|
||||||
|
|
||||||
@ -114,6 +120,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
rightContainer.MoveTo(Position + InitialExtendLength, transform_time, EasingTypes.OutElastic);
|
rightContainer.MoveTo(Position + InitialExtendLength, transform_time, EasingTypes.OutElastic);
|
||||||
leftContainer.ResizeTo(new Vector2(InitialExtendLength.X, 1.0f), transform_time, EasingTypes.OutElastic);
|
leftContainer.ResizeTo(new Vector2(InitialExtendLength.X, 1.0f), transform_time, EasingTypes.OutElastic);
|
||||||
|
|
||||||
|
Width = 120; // right container + InitialExtendLength
|
||||||
|
|
||||||
int duration = 0; //(int)(Game.Audio.BeatLength / 2);
|
int duration = 0; //(int)(Game.Audio.BeatLength / 2);
|
||||||
if (duration == 0) duration = pulse_length * 2;
|
if (duration == 0) duration = pulse_length * 2;
|
||||||
|
|
||||||
@ -137,13 +145,17 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
var flash = new Box
|
var flash = new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = RelativeSizeAxes,
|
RelativeSizeAxes = Axes.None,
|
||||||
Colour = colorBright,
|
Width = 140,
|
||||||
|
Height = 50,
|
||||||
|
Shear = new Vector2(0.1f, 0),
|
||||||
|
Colour = new Color4(255,255,255,255),
|
||||||
BlendingMode = BlendingMode.Additive,
|
BlendingMode = BlendingMode.Additive,
|
||||||
Alpha = 0.3f
|
Alpha = 0.3f
|
||||||
};
|
};
|
||||||
Add(flash);
|
Add(flash);
|
||||||
|
|
||||||
|
flash.ResizeTo(new Vector2(120, 50), transform_time, EasingTypes.OutElastic);
|
||||||
flash.FadeOutFromOne(200);
|
flash.FadeOutFromOne(200);
|
||||||
flash.Expire();
|
flash.Expire();
|
||||||
|
|
||||||
|
@ -116,8 +116,6 @@ namespace osu.Game.Screens
|
|||||||
},
|
},
|
||||||
popButton = new BackButton
|
popButton = new BackButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.None,
|
|
||||||
Height = 40,
|
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
|
@ -125,7 +125,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
RelativeSizeAxes = Axes.Y,
|
//RelativeSizeAxes = Axes.Y,
|
||||||
Action = () => Exit()
|
Action = () => Exit()
|
||||||
},
|
},
|
||||||
new Button
|
new Button
|
||||||
|
Reference in New Issue
Block a user