mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:42:56 +08:00
Merge pull request #22337 from Joehuu/fix-comment-editor-sounds
Fix comment editor text boxes not having sound feedback
This commit is contained in:
commit
88d58e8476
@ -262,7 +262,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
AddAssert("Nothing happened", () => this.ChildrenOfType<ReportCommentPopover>().Any());
|
AddAssert("Nothing happened", () => this.ChildrenOfType<ReportCommentPopover>().Any());
|
||||||
AddStep("Set report data", () =>
|
AddStep("Set report data", () =>
|
||||||
{
|
{
|
||||||
var field = this.ChildrenOfType<OsuTextBox>().Single();
|
var field = this.ChildrenOfType<ReportCommentPopover>().Single().ChildrenOfType<OsuTextBox>().Single();
|
||||||
field.Current.Value = report_text;
|
field.Current.Value = report_text;
|
||||||
var reason = this.ChildrenOfType<OsuEnumDropdown<CommentReportReason>>().Single();
|
var reason = this.ChildrenOfType<OsuEnumDropdown<CommentReportReason>>().Single();
|
||||||
reason.Current.Value = CommentReportReason.Other;
|
reason.Current.Value = CommentReportReason.Other;
|
||||||
|
@ -250,13 +250,16 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
protected override void OnFocus(FocusEvent e)
|
protected override void OnFocus(FocusEvent e)
|
||||||
{
|
{
|
||||||
BorderThickness = 3;
|
if (Masking)
|
||||||
|
BorderThickness = 3;
|
||||||
|
|
||||||
base.OnFocus(e);
|
base.OnFocus(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnFocusLost(FocusLostEvent e)
|
protected override void OnFocusLost(FocusLostEvent e)
|
||||||
{
|
{
|
||||||
BorderThickness = 0;
|
if (Masking)
|
||||||
|
BorderThickness = 0;
|
||||||
|
|
||||||
base.OnFocusLost(e);
|
base.OnFocusLost(e);
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
private void updateCommitButtonState() =>
|
private void updateCommitButtonState() =>
|
||||||
commitButton.Enabled.Value = loadingSpinner.State.Value == Visibility.Hidden && !string.IsNullOrEmpty(Current.Value);
|
commitButton.Enabled.Value = loadingSpinner.State.Value == Visibility.Hidden && !string.IsNullOrEmpty(Current.Value);
|
||||||
|
|
||||||
private partial class EditorTextBox : BasicTextBox
|
private partial class EditorTextBox : OsuTextBox
|
||||||
{
|
{
|
||||||
protected override float LeftRightPadding => side_padding;
|
protected override float LeftRightPadding => side_padding;
|
||||||
|
|
||||||
@ -173,12 +173,6 @@ namespace osu.Game.Overlays.Comments
|
|||||||
{
|
{
|
||||||
Font = OsuFont.GetFont(weight: FontWeight.Regular),
|
Font = OsuFont.GetFont(weight: FontWeight.Regular),
|
||||||
};
|
};
|
||||||
|
|
||||||
protected override Drawable GetDrawableCharacter(char c) => new FallingDownContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Child = new OsuSpriteText { Text = c.ToString(), Font = OsuFont.GetFont(size: CalculatedTextSize) }
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected partial class EditorButton : RoundedButton
|
protected partial class EditorButton : RoundedButton
|
||||||
|
Loading…
Reference in New Issue
Block a user