mirror of
https://github.com/ppy/osu
synced 2025-01-18 20:10:49 +00:00
commit
7d8c2c9a15
@ -279,6 +279,7 @@ namespace osu.Game
|
||||
//central game mode change logic.
|
||||
if (!currentScreen.ShowOverlays)
|
||||
{
|
||||
options.State = Visibility.Hidden;
|
||||
Toolbar.State = Visibility.Hidden;
|
||||
musicController.State = Visibility.Hidden;
|
||||
chat.State = Visibility.Hidden;
|
||||
|
@ -5,6 +5,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using System;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
{
|
||||
@ -12,9 +13,16 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
{
|
||||
protected override string Header => "Layout";
|
||||
|
||||
private OptionSlider<int> letterboxPositionX;
|
||||
private OptionSlider<int> letterboxPositionY;
|
||||
|
||||
private Bindable<bool> letterboxing;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkConfigManager config)
|
||||
{
|
||||
letterboxing = config.GetBindable<bool>(FrameworkConfig.Letterboxing);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OptionLabel { Text = "Resolution: TODO dropdown" },
|
||||
@ -26,19 +34,36 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Letterboxing",
|
||||
Bindable = config.GetBindable<bool>(FrameworkConfig.Letterboxing),
|
||||
Bindable = letterboxing,
|
||||
},
|
||||
new OptionSlider<int>
|
||||
letterboxPositionX = new OptionSlider<int>
|
||||
{
|
||||
LabelText = "Horizontal position",
|
||||
Bindable = (BindableInt)config.GetBindable<int>(FrameworkConfig.LetterboxPositionX)
|
||||
},
|
||||
new OptionSlider<int>
|
||||
letterboxPositionY = new OptionSlider<int>
|
||||
{
|
||||
LabelText = "Vertical position",
|
||||
Bindable = (BindableInt)config.GetBindable<int>(FrameworkConfig.LetterboxPositionY)
|
||||
},
|
||||
};
|
||||
|
||||
letterboxing.ValueChanged += visibilityChanged;
|
||||
letterboxing.TriggerChange();
|
||||
}
|
||||
|
||||
private void visibilityChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (letterboxing)
|
||||
{
|
||||
letterboxPositionX.Show();
|
||||
letterboxPositionY.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
letterboxPositionX.Hide();
|
||||
letterboxPositionY.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user