mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Merge remote-tracking branch 'refs/remotes/upstream/master' into beatmap_framework
# Conflicts: # osu.Game/GameModes/Menu/ButtonSystem.cs # osu.Game/OsuGame.cs
This commit is contained in:
@ -1,31 +1,17 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.GameModes.Menu;
|
||||
using osu.Game.Graphics.Processing;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.IO.Stores;
|
||||
using osu.Framework.OS;
|
||||
using osu.Game.GameModes.Play;
|
||||
|
||||
namespace osu.Game
|
||||
{
|
||||
public class OsuGame : Framework.Game
|
||||
public class OsuGame : OsuGameBase
|
||||
{
|
||||
internal OsuConfigManager Config = new OsuConfigManager();
|
||||
|
||||
protected override string MainResourceFile => @"osu.Game.Resources.dll";
|
||||
|
||||
internal APIAccess API;
|
||||
|
||||
public override void SetHost(BasicGameHost host)
|
||||
{
|
||||
base.SetHost(host);
|
||||
@ -37,33 +23,7 @@ namespace osu.Game
|
||||
{
|
||||
base.Load();
|
||||
|
||||
//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 };
|
||||
|
||||
API = new APIAccess()
|
||||
{
|
||||
Username = Config.Get<string>(OsuConfig.Username),
|
||||
Password = Config.Get<string>(OsuConfig.Password),
|
||||
Token = Config.Get<string>(OsuConfig.Token)
|
||||
};
|
||||
|
||||
//var req = new ListChannelsRequest();
|
||||
//req.Success += content =>
|
||||
//{
|
||||
//};
|
||||
//API.Queue(req);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new RatioAdjust
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new PlayTest(),
|
||||
new CursorContainer()
|
||||
}
|
||||
}
|
||||
};
|
||||
Add(new MainMenu());
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
@ -77,7 +37,7 @@ namespace osu.Game
|
||||
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
|
||||
{
|
||||
if (!base.Invalidate(invalidation, source, shallPropagate)) return false;
|
||||
|
||||
|
||||
if (Parent != null)
|
||||
{
|
||||
Config.Set(OsuConfig.Width, ActualSize.X);
|
||||
|
Reference in New Issue
Block a user