1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-27 03:31:23 +08:00

Merge remote-tracking branch 'upstream/master' into api-channels-messages

Conflicts:
	osu.Game/Online/Chat/Message.cs
This commit is contained in:
Dean Herbert
2016-09-29 23:54:33 +09:00
Unverified
14 changed files with 91 additions and 24 deletions
@@ -0,0 +1,21 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.GameModes.Testing;
using osu.Game.GameModes.Menu;
namespace osu.Desktop.Tests
{
class TestCaseMenuButtonSystem : TestCase
{
public override string Name => @"ButtonSystem";
public override string Description => @"Main menu button system";
public override void Reset()
{
base.Reset();
Add(new ButtonSystem());
}
}
}
@@ -152,6 +152,7 @@
<Compile Include="Program.cs" />
<Compile Include="Tests\TestCaseChatDisplay.cs" />
<Compile Include="Tests\TestCaseKeyCounter.cs" />
<Compile Include="Tests\TestCaseMenuButtonSystem.cs" />
<Compile Include="Tests\TestCaseTextAwesome.cs" />
<Compile Include="VisualTestGame.cs" />
</ItemGroup>
+1 -3
View File
@@ -11,7 +11,6 @@ using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transformations;
using osu.Framework.Input;
using osu.Framework.Threading;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using OpenTK;
@@ -20,7 +19,7 @@ using OpenTK.Input;
namespace osu.Game.GameModes.Menu
{
internal class ButtonSystem : OsuLargeComponent
public class ButtonSystem : OsuLargeComponent
{
private FlowContainerWithOrigin buttonFlow;
@@ -291,7 +290,6 @@ namespace osu.Game.GameModes.Menu
Sprite ripple;
Children = new Drawable[]
{
logoBounceContainer = new AutoSizeContainer
+1 -1
View File
@@ -12,7 +12,7 @@ namespace osu.Game.GameModes.Menu
{
public override string Name => @"Main Menu";
private AudioTrackBass bgm;
//private AudioTrackBass bgm;
public override void Load()
{
+1 -8
View File
@@ -1,19 +1,12 @@
//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 System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Graphics.Containers
{
class OsuComponent : AutoSizeContainer
{
public new OsuGame Game => base.Game as OsuGame;
public new OsuGameBase Game => base.Game as OsuGameBase;
}
}
@@ -1,17 +1,12 @@
//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 System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Graphics.Containers
{
class OsuLargeComponent : LargeContainer
public class OsuLargeComponent : LargeContainer
{
public new OsuGame Game => base.Game as OsuGame;
public new OsuGameBase Game => base.Game as OsuGameBase;
}
}
@@ -0,0 +1,53 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transformations;
using osu.Framework.Input;
namespace osu.Game.Graphics.Cursor
{
class OsuCursorContainer : CursorContainer
{
protected override Drawable CreateCursor() => new OsuCursor();
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
{
ActiveCursor.Scale = new OpenTK.Vector2(1);
ActiveCursor.ScaleTo(1.2f, 100, EasingTypes.OutQuad);
return base.OnMouseDown(state, args);
}
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
{
if (!state.Mouse.HasMainButtonPressed)
ActiveCursor.ScaleTo(1, 200, EasingTypes.OutQuad);
return base.OnMouseUp(state, args);
}
class OsuCursor : AutoSizeContainer
{
public OsuCursor()
{
Origin = Anchor.Centre;
}
public override void Load()
{
base.Load();
Children = new Drawable[]
{
new Sprite
{
Texture = Game.Textures.Get(@"Cursor/cursor")
}
};
}
}
}
}
+2 -1
View File
@@ -1,7 +1,6 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using OpenTK;
@@ -9,6 +8,8 @@ namespace osu.Game.Graphics.Processing
{
class RatioAdjust : LargeContainer
{
public override bool Contains(Vector2 screenSpacePos) => true;
protected override void Update()
{
base.Update();
+3
View File
@@ -2,6 +2,7 @@
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Diagnostics;
using System.Security;
using osu.Framework.Extensions;
@@ -35,6 +36,8 @@ namespace osu.Game.Online.API
internal string Get(Representation request = Representation.Raw)
{
Debug.Assert(representation == request);
switch (request)
{
default:
+1 -1
View File
@@ -22,7 +22,7 @@ namespace osu.Game.Online.Chat
public List<Message> Messages = new List<Message>();
internal bool Joined;
//internal bool Joined;
[JsonConstructor]
public Channel()
+2 -1
View File
@@ -4,6 +4,7 @@ using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Textures;
using osu.Framework.IO.Stores;
using osu.Game.Configuration;
using osu.Game.Graphics.Cursor;
using osu.Game.Graphics.Processing;
using osu.Game.Online.API;
@@ -44,7 +45,7 @@ namespace osu.Game
{
Children = new Drawable[]
{
new CursorContainer()
new OsuCursorContainer()
}
}
});
+1
View File
@@ -51,6 +51,7 @@
<Compile Include="Graphics\Containers\OsuComponent.cs" />
<Compile Include="Graphics\Containers\OsuGameMode.cs" />
<Compile Include="Graphics\Containers\OsuLargeComponent.cs" />
<Compile Include="Graphics\Cursor\OsuCursorContainer.cs" />
<Compile Include="Graphics\Processing\RatioAdjust.cs" />
<Compile Include="Graphics\TextAwesome.cs" />
<Compile Include="Graphics\UserInterface\KeyCounter.cs" />