1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Add "enter" hint to chatbox placeholder text while in-game

This commit is contained in:
kstefanowicz 2024-08-04 12:32:08 -04:00
parent 7bf96ce49a
commit b0757a13c2
2 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,11 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString MentionUser => new TranslatableString(getKey(@"mention_user"), @"Mention");
/// <summary>
/// "press enter to type message..."
/// </summary>
public static LocalisableString IngameInputPlaceholder => new TranslatableString(getKey("input.ingameplaceholder"), "press enter to type message...");
private static string getKey(string key) => $"{prefix}:{key}";
}
}

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Input.Bindings;
using osu.Game.Localisation;
using osu.Game.Online.Rooms;
using osu.Game.Screens.OnlinePlay.Match.Components;
using osu.Game.Screens.Play;
@ -42,6 +43,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
Background.Alpha = 0.2f;
TextBox.FocusLost = () => expandedFromTextBoxFocus.Value = false;
TextBox.PlaceholderText = ChatStrings.IngameInputPlaceholder;
}
protected override bool OnHover(HoverEvent e) => true; // use UI mouse cursor.