mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Fix window size.
This commit is contained in:
parent
b9de26aa26
commit
b2e7f290f2
@ -13,6 +13,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.IO.Stores;
|
||||
using osu.Framework.OS;
|
||||
|
||||
namespace osu.Game
|
||||
{
|
||||
@ -24,6 +25,13 @@ namespace osu.Game
|
||||
|
||||
internal APIAccess API;
|
||||
|
||||
public override void SetHost(BasicGameHost host)
|
||||
{
|
||||
base.SetHost(host);
|
||||
|
||||
host.Size = new Vector2(Config.Get<int>(OsuConfig.Width), Config.Get<int>(OsuConfig.Height));
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
base.Load();
|
||||
@ -31,8 +39,6 @@ namespace osu.Game
|
||||
//this completely overrides the framework default. will need to change once we make a proper FontStore.
|
||||
Fonts = new TextureStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Regular")) { ScaleAdjust = 0.01f };
|
||||
|
||||
Parent.Size = new Vector2(Config.Get<int>(OsuConfig.Width), Config.Get<int>(OsuConfig.Height));
|
||||
|
||||
API = new APIAccess()
|
||||
{
|
||||
Username = Config.Get<string>(OsuConfig.Username),
|
||||
@ -73,8 +79,8 @@ namespace osu.Game
|
||||
|
||||
if (Parent != null)
|
||||
{
|
||||
Parent.Width = Config.Set(OsuConfig.Width, ActualSize.X).Value;
|
||||
Parent.Height = Config.Set(OsuConfig.Height, ActualSize.Y).Value;
|
||||
Config.Set(OsuConfig.Width, ActualSize.X);
|
||||
Config.Set(OsuConfig.Height, ActualSize.Y);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user