mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Merge branch 'master' into localisation-proof-of-concept
This commit is contained in:
@ -83,6 +83,21 @@ namespace osu.Game
|
||||
|
||||
private SkinEditorOverlay skinEditor;
|
||||
|
||||
private Container overlayContent;
|
||||
|
||||
private Container rightFloatingOverlayContent;
|
||||
|
||||
private Container leftFloatingOverlayContent;
|
||||
|
||||
private Container topMostOverlayContent;
|
||||
|
||||
private ScalingContainer screenContainer;
|
||||
|
||||
private Container screenOffsetContainer;
|
||||
|
||||
[Resolved]
|
||||
private FrameworkConfigManager frameworkConfig { get; set; }
|
||||
|
||||
[Cached]
|
||||
private readonly DifficultyRecommender difficultyRecommender = new DifficultyRecommender();
|
||||
|
||||
@ -604,28 +619,35 @@ namespace osu.Game
|
||||
ActionRequested = action => volume.Adjust(action),
|
||||
ScrollActionRequested = (action, amount, isPrecise) => volume.Adjust(action, amount, isPrecise),
|
||||
},
|
||||
screenContainer = new ScalingContainer(ScalingMode.ExcludeOverlays)
|
||||
screenOffsetContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
receptor = new BackButton.Receptor(),
|
||||
ScreenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both },
|
||||
BackButton = new BackButton(receptor)
|
||||
screenContainer = new ScalingContainer(ScalingMode.ExcludeOverlays)
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Action = () =>
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
var currentScreen = ScreenStack.CurrentScreen as IOsuScreen;
|
||||
receptor = new BackButton.Receptor(),
|
||||
ScreenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both },
|
||||
BackButton = new BackButton(receptor)
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Action = () =>
|
||||
{
|
||||
var currentScreen = ScreenStack.CurrentScreen as IOsuScreen;
|
||||
|
||||
if (currentScreen?.AllowBackButton == true && !currentScreen.OnBackButton())
|
||||
ScreenStack.Exit();
|
||||
if (currentScreen?.AllowBackButton == true && !currentScreen.OnBackButton())
|
||||
ScreenStack.Exit();
|
||||
}
|
||||
},
|
||||
logoContainer = new Container { RelativeSizeAxes = Axes.Both },
|
||||
}
|
||||
},
|
||||
logoContainer = new Container { RelativeSizeAxes = Axes.Both },
|
||||
}
|
||||
},
|
||||
overlayContent = new Container { RelativeSizeAxes = Axes.Both },
|
||||
@ -775,7 +797,7 @@ namespace osu.Game
|
||||
if (notifications.State.Value == Visibility.Visible)
|
||||
offset -= Toolbar.HEIGHT / 2;
|
||||
|
||||
screenContainer.MoveToX(offset, SettingsPanel.TRANSITION_LENGTH, Easing.OutQuint);
|
||||
screenOffsetContainer.MoveToX(offset, SettingsPanel.TRANSITION_LENGTH, Easing.OutQuint);
|
||||
}
|
||||
|
||||
Settings.State.ValueChanged += _ => updateScreenOffset();
|
||||
@ -942,19 +964,6 @@ namespace osu.Game
|
||||
{
|
||||
}
|
||||
|
||||
private Container overlayContent;
|
||||
|
||||
private Container rightFloatingOverlayContent;
|
||||
|
||||
private Container leftFloatingOverlayContent;
|
||||
|
||||
private Container topMostOverlayContent;
|
||||
|
||||
[Resolved]
|
||||
private FrameworkConfigManager frameworkConfig { get; set; }
|
||||
|
||||
private ScalingContainer screenContainer;
|
||||
|
||||
protected override bool OnExiting()
|
||||
{
|
||||
if (ScreenStack.CurrentScreen is Loader)
|
||||
@ -973,7 +982,7 @@ namespace osu.Game
|
||||
{
|
||||
base.UpdateAfterChildren();
|
||||
|
||||
screenContainer.Padding = new MarginPadding { Top = ToolbarOffset };
|
||||
screenOffsetContainer.Padding = new MarginPadding { Top = ToolbarOffset };
|
||||
overlayContent.Padding = new MarginPadding { Top = ToolbarOffset };
|
||||
|
||||
MenuCursorContainer.CanShowCursor = (ScreenStack.CurrentScreen as IOsuScreen)?.CursorVisible ?? false;
|
||||
|
Reference in New Issue
Block a user