mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Adjust sprite texts in-line with framework changes
This commit is contained in:
@ -6,6 +6,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Components
|
||||
@ -36,8 +37,7 @@ namespace osu.Game.Overlays.Profile.Components
|
||||
{
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-Bold"
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold)
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -53,11 +53,10 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
{
|
||||
badgeCountText = new OsuSpriteText
|
||||
{
|
||||
Alpha = 0,
|
||||
TextSize = 12,
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
Font = "Exo2.0-Regular"
|
||||
Alpha = 0,
|
||||
Font = OsuFont.GetFont(size: 12)
|
||||
},
|
||||
new Container
|
||||
{
|
||||
|
@ -44,30 +44,26 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Text = "No recent plays",
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 14, italics: true)
|
||||
},
|
||||
rankText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
TextSize = primary_textsize
|
||||
Font = OsuFont.GetFont(size: primary_textsize, italics: true),
|
||||
},
|
||||
relativeText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: secondary_textsize, italics: true),
|
||||
Y = 25,
|
||||
TextSize = secondary_textsize
|
||||
},
|
||||
performanceText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
TextSize = secondary_textsize
|
||||
Font = OsuFont.GetFont(size: secondary_textsize, italics: true)
|
||||
},
|
||||
graph = new RankChartLineGraph
|
||||
{
|
||||
|
@ -118,8 +118,7 @@ namespace osu.Game.Overlays.Profile
|
||||
usernameText = new OsuSpriteText
|
||||
{
|
||||
Text = user.Username,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
TextSize = 30,
|
||||
Font = OsuFont.GetFont(size: 30, italics: true)
|
||||
},
|
||||
new ExternalLinkButton($@"https://osu.ppy.sh/users/{user.Id}")
|
||||
{
|
||||
@ -166,7 +165,7 @@ namespace osu.Game.Overlays.Profile
|
||||
Y = cover_height,
|
||||
Colour = OsuColour.Gray(34),
|
||||
},
|
||||
infoTextLeft = new LinkFlowContainer(t => t.TextSize = 14)
|
||||
infoTextLeft = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(t.Font, size: 14))
|
||||
{
|
||||
X = UserProfileOverlay.CONTENT_X_MARGIN,
|
||||
Y = cover_height + 20,
|
||||
@ -175,11 +174,7 @@ namespace osu.Game.Overlays.Profile
|
||||
ParagraphSpacing = 0.8f,
|
||||
LineSpacing = 0.2f
|
||||
},
|
||||
infoTextRight = new LinkFlowContainer(t =>
|
||||
{
|
||||
t.TextSize = 14;
|
||||
t.Font = @"Exo2.0-RegularItalic";
|
||||
})
|
||||
infoTextRight = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: 14, italics: true))
|
||||
{
|
||||
X = UserProfileOverlay.CONTENT_X_MARGIN + info_width + 20,
|
||||
Y = cover_height + 20,
|
||||
@ -222,7 +217,7 @@ namespace osu.Game.Overlays.Profile
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Y = 11,
|
||||
TextSize = 20
|
||||
Font = OsuFont.GetFont(size: 20)
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -354,19 +349,18 @@ namespace osu.Game.Overlays.Profile
|
||||
colourBar.Show();
|
||||
}
|
||||
|
||||
void boldItalic(SpriteText t) => t.Font = @"Exo2.0-BoldItalic";
|
||||
void boldItalic(SpriteText t) => t.Font = OsuFont.GetFont(t.Font, weight: FontWeight.Bold, italics: true);
|
||||
void lightText(SpriteText t) => t.Alpha = 0.8f;
|
||||
|
||||
OsuSpriteText createScoreText(string text) => new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Text = text
|
||||
};
|
||||
|
||||
OsuSpriteText createScoreNumberText(string text) => new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Text = text
|
||||
|
@ -35,8 +35,7 @@ namespace osu.Game.Overlays.Profile
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = Title,
|
||||
TextSize = 20,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 20, italics: true),
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Horizontal = UserProfileOverlay.CONTENT_X_MARGIN,
|
||||
@ -67,8 +66,7 @@ namespace osu.Game.Overlays.Profile
|
||||
Add(new OsuSpriteText
|
||||
{
|
||||
Text = @"coming soon!",
|
||||
TextSize = 16,
|
||||
Font = @"Exo2.0-Medium",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Medium),
|
||||
Colour = Color4.Gray,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
@ -48,15 +49,13 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
{
|
||||
Text = new LocalisedString(($"{beatmap.Metadata.TitleUnicode ?? beatmap.Metadata.Title} [{beatmap.Version}] ",
|
||||
$"{beatmap.Metadata.Title ?? beatmap.Metadata.TitleUnicode} [{beatmap.Version}] ")),
|
||||
TextSize = 15,
|
||||
Font = "Exo2.0-SemiBoldItalic",
|
||||
Font = OsuFont.GetFont(size: 15, weight: FontWeight.SemiBold, italics: true)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = new LocalisedString((beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist)),
|
||||
TextSize = 12,
|
||||
Padding = new MarginPadding { Top = 3 },
|
||||
Font = "Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 12, italics: true)
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -6,6 +6,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
@ -47,7 +48,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = @"mapped by ",
|
||||
TextSize = 12,
|
||||
Font = OsuFont.GetFont(size: 12)
|
||||
},
|
||||
mapperContainer = new OsuHoverContainer
|
||||
{
|
||||
@ -57,8 +58,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = beatmap.Metadata.AuthorString,
|
||||
TextSize = 12,
|
||||
Font = @"Exo2.0-MediumItalic"
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Medium, italics: true)
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -78,16 +78,14 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Text = playCount.ToString(),
|
||||
TextSize = 18,
|
||||
Font = @"Exo2.0-SemiBoldItalic"
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.SemiBold, italics: true)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Text = @"times played ",
|
||||
TextSize = 12,
|
||||
Font = @"Exo2.0-RegularItalic"
|
||||
Font = OsuFont.GetFont(size: 12, italics: true)
|
||||
},
|
||||
}
|
||||
});
|
||||
|
@ -107,21 +107,19 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Text = header + ":",
|
||||
TextSize = 20,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 20, italics: true)
|
||||
},
|
||||
valueText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Text = "0",
|
||||
TextSize = 40,
|
||||
Font = OsuFont.GetFont(size: 40, italics: true),
|
||||
UseFullGlyphHeight = false,
|
||||
Font = @"Exo2.0-RegularItalic"
|
||||
}
|
||||
}
|
||||
},
|
||||
new OsuTextFlowContainer(t => { t.TextSize = 19; })
|
||||
new OsuTextFlowContainer(t => t.Font = OsuFont.GetFont(t.Font, size: 19))
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
@ -6,6 +6,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@ -43,9 +44,8 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
TextSize = 15,
|
||||
Text = header,
|
||||
Font = "Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 15, italics: true),
|
||||
Margin = new MarginPadding { Top = 10, Bottom = 10 },
|
||||
},
|
||||
ItemsContainer = new FillFlowContainer
|
||||
@ -63,7 +63,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
Origin = Anchor.TopCentre,
|
||||
Child = new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Text = "show more",
|
||||
Padding = new MarginPadding {Vertical = 10, Horizontal = 15 },
|
||||
}
|
||||
@ -76,7 +76,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
},
|
||||
MissingText = new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Text = missing,
|
||||
Alpha = 0,
|
||||
},
|
||||
|
@ -28,8 +28,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Text = $"{pp:0}pp",
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
TextSize = 18,
|
||||
Font = "Exo2.0-BoldItalic",
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
|
||||
});
|
||||
|
||||
if (weight.HasValue)
|
||||
@ -40,8 +39,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Colour = colour.GrayA,
|
||||
TextSize = 11,
|
||||
Font = "Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 11, italics: true)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -46,8 +46,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Colour = colour.GrayA,
|
||||
TextSize = 11,
|
||||
Font = "Exo2.0-RegularItalic"
|
||||
Font = OsuFont.GetFont(size: 11, italics: true)
|
||||
};
|
||||
|
||||
RightFlowContainer.Add(text);
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Scoring;
|
||||
|
||||
@ -23,8 +24,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Text = Score.TotalScore.ToString("#,###"),
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
TextSize = 18,
|
||||
Font = "Exo2.0-BoldItalic",
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
||||
|
||||
RightFlowContainer.Add(new DrawableDate(activity.CreatedAt)
|
||||
{
|
||||
TextSize = 13,
|
||||
Font = OsuFont.GetFont(size: 13),
|
||||
Colour = OsuColour.Gray(0xAA),
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
|
Reference in New Issue
Block a user