mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Merge remote-tracking branch 'upstream/master' into beatmap_framework
This commit is contained in:
Submodule osu-framework updated: 05c40c2817...3f68cf9d03
Submodule osu-resources updated: 5cc6e0a311...fd4a3dd522
21
osu.Desktop.VisualTests/Tests/TestCaseMenuButtonSystem.cs
Normal file
21
osu.Desktop.VisualTests/Tests/TestCaseMenuButtonSystem.cs
Normal file
@ -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="Program.cs" />
|
||||||
<Compile Include="Tests\TestCaseGamefield.cs" />
|
<Compile Include="Tests\TestCaseGamefield.cs" />
|
||||||
<Compile Include="Tests\TestCaseKeyCounter.cs" />
|
<Compile Include="Tests\TestCaseKeyCounter.cs" />
|
||||||
|
<Compile Include="Tests\TestCaseMenuButtonSystem.cs" />
|
||||||
<Compile Include="Tests\TestCaseTextAwesome.cs" />
|
<Compile Include="Tests\TestCaseTextAwesome.cs" />
|
||||||
<Compile Include="VisualTestGame.cs" />
|
<Compile Include="VisualTestGame.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -11,7 +11,6 @@ using osu.Framework.Graphics.Primitives;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Threading;
|
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
@ -20,7 +19,7 @@ using OpenTK.Input;
|
|||||||
|
|
||||||
namespace osu.Game.GameModes.Menu
|
namespace osu.Game.GameModes.Menu
|
||||||
{
|
{
|
||||||
internal class ButtonSystem : OsuLargeComponent
|
public class ButtonSystem : OsuLargeComponent
|
||||||
{
|
{
|
||||||
private FlowContainerWithOrigin buttonFlow;
|
private FlowContainerWithOrigin buttonFlow;
|
||||||
|
|
||||||
@ -291,7 +290,6 @@ namespace osu.Game.GameModes.Menu
|
|||||||
|
|
||||||
Sprite ripple;
|
Sprite ripple;
|
||||||
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
logoBounceContainer = new AutoSizeContainer
|
logoBounceContainer = new AutoSizeContainer
|
||||||
|
@ -12,7 +12,7 @@ namespace osu.Game.GameModes.Menu
|
|||||||
{
|
{
|
||||||
public override string Name => @"Main Menu";
|
public override string Name => @"Main Menu";
|
||||||
|
|
||||||
private AudioTrackBass bgm;
|
//private AudioTrackBass bgm;
|
||||||
|
|
||||||
public override void Load()
|
public override void Load()
|
||||||
{
|
{
|
||||||
|
@ -1,19 +1,12 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//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;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Containers
|
namespace osu.Game.Graphics.Containers
|
||||||
{
|
{
|
||||||
class OsuComponent : AutoSizeContainer
|
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>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//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;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
53
osu.Game/Graphics/Cursor/OsuCursorContainer.cs
Normal file
53
osu.Game/Graphics/Cursor/OsuCursorContainer.cs
Normal file
@ -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")
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,7 +1,6 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//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.Containers;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
|
||||||
@ -9,6 +8,8 @@ namespace osu.Game.Graphics.Processing
|
|||||||
{
|
{
|
||||||
class RatioAdjust : LargeContainer
|
class RatioAdjust : LargeContainer
|
||||||
{
|
{
|
||||||
|
public override bool Contains(Vector2 screenSpacePos) => true;
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
|
|
||||||
@ -35,6 +36,8 @@ namespace osu.Game.Online.API
|
|||||||
|
|
||||||
internal string Get(Representation request = Representation.Raw)
|
internal string Get(Representation request = Representation.Raw)
|
||||||
{
|
{
|
||||||
|
Debug.Assert(representation == request);
|
||||||
|
|
||||||
switch (request)
|
switch (request)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Online.Chat
|
|||||||
|
|
||||||
public List<Message> Messages = new List<Message>();
|
public List<Message> Messages = new List<Message>();
|
||||||
|
|
||||||
internal bool Joined;
|
//internal bool Joined;
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Channel()
|
public Channel()
|
||||||
|
@ -21,10 +21,10 @@ namespace osu.Game.Online.Chat
|
|||||||
public DateTime Timestamp;
|
public DateTime Timestamp;
|
||||||
|
|
||||||
[JsonProperty(@"content")]
|
[JsonProperty(@"content")]
|
||||||
internal string Content;
|
public string Content;
|
||||||
|
|
||||||
[JsonProperty(@"sender")]
|
[JsonProperty(@"sender")]
|
||||||
internal string User;
|
public string User;
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Message()
|
public Message()
|
||||||
|
@ -4,6 +4,7 @@ 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.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
using osu.Game.Graphics.Cursor;
|
||||||
using osu.Game.Graphics.Processing;
|
using osu.Game.Graphics.Processing;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
|
|
||||||
@ -44,7 +45,7 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new CursorContainer()
|
new OsuCursorContainer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -84,6 +84,7 @@
|
|||||||
<Compile Include="Graphics\Containers\OsuComponent.cs" />
|
<Compile Include="Graphics\Containers\OsuComponent.cs" />
|
||||||
<Compile Include="Graphics\Containers\OsuGameMode.cs" />
|
<Compile Include="Graphics\Containers\OsuGameMode.cs" />
|
||||||
<Compile Include="Graphics\Containers\OsuLargeComponent.cs" />
|
<Compile Include="Graphics\Containers\OsuLargeComponent.cs" />
|
||||||
|
<Compile Include="Graphics\Cursor\OsuCursorContainer.cs" />
|
||||||
<Compile Include="Graphics\Processing\RatioAdjust.cs" />
|
<Compile Include="Graphics\Processing\RatioAdjust.cs" />
|
||||||
<Compile Include="Graphics\TextAwesome.cs" />
|
<Compile Include="Graphics\TextAwesome.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\KeyCounter.cs" />
|
<Compile Include="Graphics\UserInterface\KeyCounter.cs" />
|
||||||
|
Reference in New Issue
Block a user