mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 23:57:25 +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 FillFlowContainer<PopupDialogButton> buttonsContainer;
|
||||||
private readonly SpriteIcon icon;
|
private readonly SpriteIcon icon;
|
||||||
private readonly SpriteText header;
|
private readonly SpriteText header;
|
||||||
private readonly SpriteText body;
|
private readonly TextFlowContainer body;
|
||||||
|
|
||||||
public FontAwesome Icon
|
public FontAwesome Icon
|
||||||
{
|
{
|
||||||
@ -48,7 +48,6 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
|
|
||||||
public string BodyText
|
public string BodyText
|
||||||
{
|
{
|
||||||
get { return body.Text; }
|
|
||||||
set { body.Text = value; }
|
set { body.Text = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,17 +219,15 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
{
|
{
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Text = @"Header",
|
|
||||||
TextSize = 25,
|
TextSize = 25,
|
||||||
Shadow = true,
|
Shadow = true,
|
||||||
},
|
},
|
||||||
body = new OsuSpriteText
|
body = new OsuTextFlowContainer(t => t.TextSize = 18)
|
||||||
{
|
{
|
||||||
Origin = Anchor.TopCentre,
|
Padding = new MarginPadding(15),
|
||||||
Anchor = Anchor.TopCentre,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = @"Body",
|
AutoSizeAxes = Axes.Y,
|
||||||
TextSize = 18,
|
TextAnchor = Anchor.TopCentre,
|
||||||
Shadow = true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user