mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Rename and xmldoc members
This commit is contained in:
parent
21bed336c6
commit
786deec296
@ -160,7 +160,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
protected override LocalisableString FooterText => @"Footer text. And it is pretty long. Cool.";
|
||||
|
||||
protected override LocalisableString GetCommitButtonText(bool isLoggedIn) =>
|
||||
protected override LocalisableString GetButtonText(bool isLoggedIn) =>
|
||||
isLoggedIn ? @"Commit" : "You're logged out!";
|
||||
|
||||
protected override LocalisableString GetPlaceholderText(bool isLoggedIn) =>
|
||||
@ -184,7 +184,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
{
|
||||
}
|
||||
|
||||
protected override LocalisableString GetCommitButtonText(bool isLoggedIn) => @"Save";
|
||||
protected override LocalisableString GetButtonText(bool isLoggedIn) => @"Save";
|
||||
protected override LocalisableString GetPlaceholderText(bool isLoggedIn) => @"Multiline textboxes soon";
|
||||
}
|
||||
}
|
||||
|
@ -44,8 +44,17 @@ namespace osu.Game.Overlays.Comments
|
||||
[Resolved]
|
||||
private LoginOverlay? loginOverlay { get; set; }
|
||||
|
||||
protected abstract LocalisableString GetCommitButtonText(bool isLoggedIn);
|
||||
/// <summary>
|
||||
/// Returns the text content of the main action button.
|
||||
/// When <paramref name="isLoggedIn"/> is <see langword="true"/>, the text will apply to a button that posts a comment.
|
||||
/// When <paramref name="isLoggedIn"/> is <see langword="false"/>, the text will apply to a button that directs the user to the login overlay.
|
||||
/// </summary>
|
||||
protected abstract LocalisableString GetButtonText(bool isLoggedIn);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the placeholder text for the comment box.
|
||||
/// </summary>
|
||||
/// <param name="isLoggedIn">Whether the current user is logged in.</param>
|
||||
protected abstract LocalisableString GetPlaceholderText(bool isLoggedIn);
|
||||
|
||||
protected bool ShowLoadingSpinner
|
||||
@ -128,13 +137,13 @@ namespace osu.Game.Overlays.Comments
|
||||
commitButton = new EditorButton
|
||||
{
|
||||
Action = () => OnCommit(Current.Value),
|
||||
Text = GetCommitButtonText(true)
|
||||
Text = GetButtonText(true)
|
||||
},
|
||||
logInButton = new EditorButton
|
||||
{
|
||||
Width = 100,
|
||||
Action = () => loginOverlay?.Show(),
|
||||
Text = GetCommitButtonText(false)
|
||||
Text = GetButtonText(false)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -410,7 +410,7 @@ namespace osu.Game.Overlays.Comments
|
||||
//TODO should match web, left empty due to no multiline support
|
||||
protected override LocalisableString FooterText => default;
|
||||
|
||||
protected override LocalisableString GetCommitButtonText(bool isLoggedIn) =>
|
||||
protected override LocalisableString GetButtonText(bool isLoggedIn) =>
|
||||
isLoggedIn ? CommonStrings.ButtonsPost : CommentsStrings.GuestButtonNew;
|
||||
|
||||
protected override LocalisableString GetPlaceholderText(bool isLoggedIn) =>
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Comments
|
||||
|
||||
protected override LocalisableString FooterText => default;
|
||||
|
||||
protected override LocalisableString GetCommitButtonText(bool isLoggedIn) =>
|
||||
protected override LocalisableString GetButtonText(bool isLoggedIn) =>
|
||||
isLoggedIn ? CommonStrings.ButtonsReply : CommentsStrings.GuestButtonReply;
|
||||
|
||||
protected override LocalisableString GetPlaceholderText(bool isLoggedIn) =>
|
||||
|
Loading…
Reference in New Issue
Block a user