mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +08:00
Make body text in popups word wrap properly
This commit is contained in:
parent
f76878e2fe
commit
929633efaa
@ -32,7 +32,7 @@ namespace osu.Game.Overlays.Dialog
|
||||
private readonly FillFlowContainer<PopupDialogButton> buttonsContainer;
|
||||
private readonly SpriteIcon icon;
|
||||
private readonly SpriteText header;
|
||||
private readonly SpriteText body;
|
||||
private readonly TextFlowContainer body;
|
||||
|
||||
public FontAwesome Icon
|
||||
{
|
||||
@ -48,7 +48,6 @@ namespace osu.Game.Overlays.Dialog
|
||||
|
||||
public string BodyText
|
||||
{
|
||||
get { return body.Text; }
|
||||
set { body.Text = value; }
|
||||
}
|
||||
|
||||
@ -220,17 +219,15 @@ namespace osu.Game.Overlays.Dialog
|
||||
{
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Text = @"Header",
|
||||
TextSize = 25,
|
||||
Shadow = true,
|
||||
},
|
||||
body = new OsuSpriteText
|
||||
body = new OsuTextFlowContainer(t => t.TextSize = 18)
|
||||
{
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Text = @"Body",
|
||||
TextSize = 18,
|
||||
Shadow = true,
|
||||
Padding = new MarginPadding(15),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
TextAnchor = Anchor.TopCentre,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user