mirror of
https://github.com/ppy/osu
synced 2024-12-12 01:48:49 +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.Cursor;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Framework.IO.Stores;
|
using osu.Framework.IO.Stores;
|
||||||
|
using osu.Framework.OS;
|
||||||
|
|
||||||
namespace osu.Game
|
namespace osu.Game
|
||||||
{
|
{
|
||||||
@ -24,6 +25,13 @@ namespace osu.Game
|
|||||||
|
|
||||||
internal APIAccess API;
|
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()
|
public override void Load()
|
||||||
{
|
{
|
||||||
base.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.
|
//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 };
|
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()
|
API = new APIAccess()
|
||||||
{
|
{
|
||||||
Username = Config.Get<string>(OsuConfig.Username),
|
Username = Config.Get<string>(OsuConfig.Username),
|
||||||
@ -73,8 +79,8 @@ namespace osu.Game
|
|||||||
|
|
||||||
if (Parent != null)
|
if (Parent != null)
|
||||||
{
|
{
|
||||||
Parent.Width = Config.Set(OsuConfig.Width, ActualSize.X).Value;
|
Config.Set(OsuConfig.Width, ActualSize.X);
|
||||||
Parent.Height = Config.Set(OsuConfig.Height, ActualSize.Y).Value;
|
Config.Set(OsuConfig.Height, ActualSize.Y);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user