1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 16:47:29 +08:00

Fix many instances of non-osu-prefixed text classes being used

Results in incorrect default formatting.
This commit is contained in:
Dean Herbert 2017-12-26 00:44:35 +09:00
parent 45e4c09cb8
commit 3c1654e5e4
12 changed files with 32 additions and 20 deletions

View File

@ -8,6 +8,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using OpenTK;
using OpenTK.Graphics;
@ -176,7 +177,7 @@ namespace osu.Game.Overlays.BeatmapSet
Shadow = false,
Margin = new MarginPadding { Top = 20 },
},
textFlow = new TextFlowContainer
textFlow = new OsuTextFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Users;
@ -88,7 +89,7 @@ namespace osu.Game.Overlays.MedalSplash
Alpha = 0f,
Scale = new Vector2(1f / scale_when_full),
},
description = new TextFlowContainer
description = new OsuTextFlowContainer
{
TextAnchor = Anchor.TopCentre,
Anchor = Anchor.TopCentre,

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using OpenTK;
using OpenTK.Graphics;
@ -114,7 +115,7 @@ namespace osu.Game.Overlays.Notifications
RelativeSizeAxes = Axes.Both,
});
Content.Add(textDrawable = new TextFlowContainer(t =>
Content.Add(textDrawable = new OsuTextFlowContainer(t =>
{
t.TextSize = 16;
})

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using OpenTK;
namespace osu.Game.Overlays.Notifications
@ -58,7 +59,7 @@ namespace osu.Game.Overlays.Notifications
}
});
Content.Add(textDrawable = new TextFlowContainer(t => t.TextSize = 16)
Content.Add(textDrawable = new OsuTextFlowContainer(t => t.TextSize = 16)
{
Colour = OsuColour.Gray(128),
AutoSizeAxes = Axes.Y,
@ -87,4 +88,4 @@ namespace osu.Game.Overlays.Notifications
}
}
}
}
}

View File

@ -14,6 +14,7 @@ using osu.Game.Graphics;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Overlays
{
@ -63,7 +64,7 @@ namespace osu.Game.Overlays
Width = 240,
RelativeSizeAxes = Axes.Y,
},
textLine1 = new SpriteText
textLine1 = new OsuSpriteText
{
Padding = new MarginPadding(10),
Font = @"Exo2.0-Black",
@ -72,7 +73,7 @@ namespace osu.Game.Overlays
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
},
textLine2 = new SpriteText
textLine2 = new OsuSpriteText
{
TextSize = 24,
Font = @"Exo2.0-Light",
@ -97,7 +98,7 @@ namespace osu.Game.Overlays
Origin = Anchor.TopCentre,
AutoSizeAxes = Axes.Both
},
textLine3 = new SpriteText
textLine3 = new OsuSpriteText
{
Padding = new MarginPadding { Bottom = 15 },
Font = @"Exo2.0-Bold",

View File

@ -473,7 +473,7 @@ namespace osu.Game.Overlays.Profile
Width = width,
Height = 26
});
Add(numberText = new SpriteText
Add(numberText = new OsuSpriteText
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Users;
@ -120,7 +121,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
}
}
},
new TextFlowContainer(t => { t.TextSize = 19; })
new OsuTextFlowContainer(t => { t.TextSize = 19; })
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,

View File

@ -17,6 +17,7 @@ using OpenTK.Graphics;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Screens.Ranking
{
@ -183,7 +184,7 @@ namespace osu.Game.Screens.Ranking
Height = 50,
Margin = new MarginPadding { Bottom = 110 },
},
new SpriteText
new OsuSpriteText
{
Text = $"{score.MaxCombo}x",
TextSize = 40,
@ -194,7 +195,7 @@ namespace osu.Game.Screens.Ranking
Anchor = Anchor.CentreLeft,
Origin = Anchor.BottomCentre,
},
new SpriteText
new OsuSpriteText
{
Text = "max combo",
TextSize = 20,
@ -204,7 +205,7 @@ namespace osu.Game.Screens.Ranking
Anchor = Anchor.CentreLeft,
Origin = Anchor.TopCentre,
},
new SpriteText
new OsuSpriteText
{
Text = $"{score.Accuracy:P2}",
TextSize = 40,
@ -215,7 +216,7 @@ namespace osu.Game.Screens.Ranking
Anchor = Anchor.CentreLeft,
Origin = Anchor.BottomCentre,
},
new SpriteText
new OsuSpriteText
{
Text = "accuracy",
TextSize = 20,

View File

@ -201,14 +201,14 @@ namespace osu.Game.Screens.Ranking
{
Children = new Drawable[]
{
new SpriteText {
new OsuSpriteText {
Text = statistic.Value.ToString().PadLeft(4, '0'),
Colour = colours.Gray7,
TextSize = 30,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
},
new SpriteText {
new OsuSpriteText {
Text = statistic.Key,
Colour = colours.Gray7,
Font = @"Exo2.0-Bold",

View File

@ -17,6 +17,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Extensions.Color4Extensions;
using osu.Game.Screens.Select.Details;
using osu.Game.Beatmaps;
using osu.Game.Graphics.Containers;
namespace osu.Game.Screens.Select
{
@ -334,7 +335,7 @@ namespace osu.Game.Screens.Select
TextSize = 14,
},
},
textFlow = new TextFlowContainer
textFlow = new OsuTextFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
@ -359,7 +360,7 @@ namespace osu.Game.Screens.Select
private void setTextAsync(string text)
{
LoadComponentAsync(new TextFlowContainer(s => s.TextSize = 14)
LoadComponentAsync(new OsuTextFlowContainer(s => s.TextSize = 14)
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,

View File

@ -12,7 +12,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input;
using osu.Game.Beatmaps;
using osu.Game.Graphics.Sprites;
@ -224,7 +223,7 @@ namespace osu.Game.Tests.Visual
if (!api.IsLoggedIn)
{
InternalChild = new SpriteText
InternalChild = new OsuSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,

View File

@ -172,6 +172,7 @@
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INITIALIZER_BRACES/@EntryValue">NEXT_LINE</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/LINE_FEED_AT_FILE_END/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSORHOLDER_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AROUND_MULTIPLICATIVE_OP/@EntryValue">True</s:Boolean>
@ -655,7 +656,11 @@ Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-frame
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FFIELD/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>