mirror of https://github.com/ppy/osu
Force tournament client to run in windowed mode
We generally haven't tested in other modes, and it doesn't really make sense as you wouldn't be able to use it in a meaningful way otherwise. - [ ] Test on windows.
This commit is contained in:
parent
8b8fff2766
commit
e6d13edafb
|
@ -31,6 +31,7 @@ public class TournamentGame : TournamentGameBase
|
|||
public static readonly Color4 TEXT_COLOUR = Color4Extensions.FromHex("#fff");
|
||||
private Drawable heightWarning;
|
||||
private Bindable<Size> windowSize;
|
||||
private Bindable<WindowMode> windowMode;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkConfigManager frameworkConfig)
|
||||
|
@ -43,6 +44,12 @@ private void load(FrameworkConfigManager frameworkConfig)
|
|||
heightWarning.Alpha = size.NewValue.Width < minWidth ? 1 : 0;
|
||||
}), true);
|
||||
|
||||
windowMode = frameworkConfig.GetBindable<WindowMode>(FrameworkSetting.WindowMode);
|
||||
windowMode.BindValueChanged(mode => ScheduleAfterChildren(() =>
|
||||
{
|
||||
windowMode.Value = WindowMode.Windowed;
|
||||
}), true);
|
||||
|
||||
AddRange(new[]
|
||||
{
|
||||
new Container
|
||||
|
|
Loading…
Reference in New Issue