1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 14:12:56 +08:00

Stack Catch dash/normal touch input vertically

This commit is contained in:
Hồ Nguyên Minh 2022-11-13 17:09:43 +07:00
parent 918f19fd4a
commit 3f8c4a5dff

View File

@ -35,6 +35,8 @@ namespace osu.Game.Rulesets.Catch.UI
private void load(CatchInputManager catchInputManager, OsuColour colours) private void load(CatchInputManager catchInputManager, OsuColour colours)
{ {
const float width = 0.15f; const float width = 0.15f;
// Ratio between normal move area height and total input height
const float normal_area_height_ratio = 0.45f;
keyBindingContainer = catchInputManager.KeyBindingContainer; keyBindingContainer = catchInputManager.KeyBindingContainer;
@ -54,18 +56,18 @@ namespace osu.Game.Rulesets.Catch.UI
Width = width, Width = width,
Children = new Drawable[] Children = new Drawable[]
{ {
leftDashBox = new InputArea(TouchCatchAction.DashLeft, trackedActionSources)
{
RelativeSizeAxes = Axes.Both,
Width = 0.5f,
},
leftBox = new InputArea(TouchCatchAction.MoveLeft, trackedActionSources) leftBox = new InputArea(TouchCatchAction.MoveLeft, trackedActionSources)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Width = 0.5f, Height = normal_area_height_ratio,
Colour = colours.Gray9, Colour = colours.Gray9,
Anchor = Anchor.TopRight, Anchor = Anchor.BottomRight,
Origin = Anchor.TopRight, Origin = Anchor.BottomRight,
},
leftDashBox = new InputArea(TouchCatchAction.DashLeft, trackedActionSources)
{
RelativeSizeAxes = Axes.Both,
Height = 1 - normal_area_height_ratio,
}, },
} }
}, },
@ -80,15 +82,15 @@ namespace osu.Game.Rulesets.Catch.UI
rightBox = new InputArea(TouchCatchAction.MoveRight, trackedActionSources) rightBox = new InputArea(TouchCatchAction.MoveRight, trackedActionSources)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Width = 0.5f, Height = normal_area_height_ratio,
Colour = colours.Gray9, Colour = colours.Gray9,
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
}, },
rightDashBox = new InputArea(TouchCatchAction.DashRight, trackedActionSources) rightDashBox = new InputArea(TouchCatchAction.DashRight, trackedActionSources)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Width = 0.5f, Height = 1 - normal_area_height_ratio,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
}, },
} }
}, },