1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 04:02:57 +08:00

Combine user models.

This commit is contained in:
Dean Herbert 2017-03-28 00:04:07 +09:00
parent 55df07a872
commit 039f4a65dc
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
7 changed files with 17 additions and 23 deletions

View File

@ -12,6 +12,7 @@ using osu.Framework.Configuration;
using osu.Framework.Logging; using osu.Framework.Logging;
using osu.Framework.Threading; using osu.Framework.Threading;
using osu.Game.Online.API.Requests; using osu.Game.Online.API.Requests;
using osu.Game.Users;
namespace osu.Game.Online.API namespace osu.Game.Online.API
{ {

View File

@ -1,6 +1,8 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 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.Game.Users;
namespace osu.Game.Online.API.Requests namespace osu.Game.Online.API.Requests
{ {
public class GetUserRequest : APIRequest<User> public class GetUserRequest : APIRequest<User>

View File

@ -91,7 +91,7 @@ namespace osu.Game.Online.Chat.Drawables
new OsuSpriteText new OsuSpriteText
{ {
Font = @"Exo2.0-BoldItalic", Font = @"Exo2.0-BoldItalic",
Text = $@"{Message.User.Name}:", Text = $@"{Message.User.Username}:",
Colour = getUsernameColour(Message), Colour = getUsernameColour(Message),
TextSize = text_size, TextSize = text_size,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,

View File

@ -3,6 +3,7 @@
using System; using System;
using Newtonsoft.Json; using Newtonsoft.Json;
using osu.Game.Users;
namespace osu.Game.Online.Chat namespace osu.Game.Online.Chat
{ {

View File

@ -1,19 +0,0 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using Newtonsoft.Json;
namespace osu.Game.Online
{
public class User
{
[JsonProperty(@"username")]
public string Name;
[JsonProperty(@"id")]
public int Id;
[JsonProperty(@"colour")]
public string Colour;
}
}

View File

@ -1,13 +1,23 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 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 Newtonsoft.Json;
namespace osu.Game.Users namespace osu.Game.Users
{ {
public class User public class User
{ {
public int Id; [JsonProperty(@"id")]
public long Id = 1;
[JsonProperty(@"username")]
public string Username; public string Username;
public Country Country; public Country Country;
public Team Team; public Team Team;
[JsonProperty(@"colour")]
public string Colour;
} }
} }

View File

@ -247,7 +247,6 @@
<Compile Include="Online\Chat\Drawables\DrawableChannel.cs" /> <Compile Include="Online\Chat\Drawables\DrawableChannel.cs" />
<Compile Include="Online\Chat\Drawables\ChatLine.cs" /> <Compile Include="Online\Chat\Drawables\ChatLine.cs" />
<Compile Include="Online\Chat\Message.cs" /> <Compile Include="Online\Chat\Message.cs" />
<Compile Include="Online\User.cs" />
<Compile Include="OsuGame.cs" /> <Compile Include="OsuGame.cs" />
<Compile Include="OsuGameBase.cs" /> <Compile Include="OsuGameBase.cs" />
<Compile Include="Overlays\ChatOverlay.cs" /> <Compile Include="Overlays\ChatOverlay.cs" />
@ -396,4 +395,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>