mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Remove osu!-side DebugUtils
This commit is contained in:
parent
471c5b7386
commit
97d65783db
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Development;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
@ -12,7 +13,6 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Notifications;
|
using osu.Game.Overlays.Notifications;
|
||||||
using osu.Game.Utils;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ namespace osu.Desktop.Overlays
|
|||||||
},
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Colour = DebugUtils.IsDebug ? colours.Red : Color4.White,
|
Colour = DebugUtils.IsDebugBuild ? colours.Red : Color4.White,
|
||||||
Text = game.Version
|
Text = game.Version
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ using System.Threading.Tasks;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Development;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.IO.Stores;
|
using osu.Framework.IO.Stores;
|
||||||
@ -34,7 +35,6 @@ using osu.Game.Rulesets.Mods;
|
|||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
using DebugUtils = osu.Game.Utils.DebugUtils;
|
|
||||||
|
|
||||||
namespace osu.Game
|
namespace osu.Game
|
||||||
{
|
{
|
||||||
@ -97,7 +97,7 @@ namespace osu.Game
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (!IsDeployedBuild)
|
if (!IsDeployedBuild)
|
||||||
return @"local " + (DebugUtils.IsDebug ? @"debug" : @"release");
|
return @"local " + (DebugUtils.IsDebugBuild ? @"debug" : @"release");
|
||||||
|
|
||||||
var version = AssemblyVersion;
|
var version = AssemblyVersion;
|
||||||
return $@"{version.Major}.{version.Minor}.{version.Build}";
|
return $@"{version.Major}.{version.Minor}.{version.Build}";
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Development;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
@ -12,7 +13,6 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using DebugUtils = osu.Game.Utils.DebugUtils;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings
|
namespace osu.Game.Overlays.Settings
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
Text = game.Name,
|
Text = game.Name,
|
||||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold),
|
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold),
|
||||||
},
|
},
|
||||||
new BuildDisplay(game.Version, DebugUtils.IsDebug)
|
new BuildDisplay(game.Version, DebugUtils.IsDebugBuild)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
|
||||||
|
|
||||||
namespace osu.Game.Utils
|
|
||||||
{
|
|
||||||
public static class DebugUtils
|
|
||||||
{
|
|
||||||
public static bool IsDebug
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
// ReSharper disable once RedundantAssignment
|
|
||||||
bool isDebug = false;
|
|
||||||
// Debug.Assert conditions are only evaluated in debug mode
|
|
||||||
System.Diagnostics.Debug.Assert(isDebug = true);
|
|
||||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
|
||||||
return isDebug;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user