1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Merge pull request #21224 from honguyenminh/VerticalStackedCatchTouchInput

Vertically stacked osu!catch touch input
This commit is contained in:
Dean Herbert 2022-11-23 18:55:20 +09:00 committed by GitHub
commit 8d0fe61aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,6 +35,8 @@ namespace osu.Game.Rulesets.Catch.UI
private void load(CatchInputManager catchInputManager, OsuColour colours)
{
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;
@ -54,18 +56,18 @@ namespace osu.Game.Rulesets.Catch.UI
Width = width,
Children = new Drawable[]
{
leftDashBox = new InputArea(TouchCatchAction.DashLeft, trackedActionSources)
{
RelativeSizeAxes = Axes.Both,
Width = 0.5f,
},
leftBox = new InputArea(TouchCatchAction.MoveLeft, trackedActionSources)
{
RelativeSizeAxes = Axes.Both,
Width = 0.5f,
Height = normal_area_height_ratio,
Colour = colours.Gray9,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Anchor = Anchor.BottomRight,
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)
{
RelativeSizeAxes = Axes.Both,
Width = 0.5f,
Height = normal_area_height_ratio,
Colour = colours.Gray9,
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
},
rightDashBox = new InputArea(TouchCatchAction.DashRight, trackedActionSources)
{
RelativeSizeAxes = Axes.Both,
Width = 0.5f,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Height = 1 - normal_area_height_ratio,
},
}
},