Multiline edit everywhere (#15216)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Client.Administration.UI
|
||||
{
|
||||
@@ -16,18 +18,18 @@ namespace Content.Client.Administration.UI
|
||||
RobustXamlLoader.Load(this);
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
Announcement.Placeholder = new Rope.Leaf(_localization.GetString("admin-announce-announcement-placeholder"));
|
||||
AnnounceMethod.AddItem(_localization.GetString("admin-announce-type-station"));
|
||||
AnnounceMethod.SetItemMetadata(0, AdminAnnounceType.Station);
|
||||
AnnounceMethod.AddItem(_localization.GetString("admin-announce-type-server"));
|
||||
AnnounceMethod.SetItemMetadata(1, AdminAnnounceType.Server);
|
||||
AnnounceMethod.OnItemSelected += AnnounceMethodOnOnItemSelected;
|
||||
Announcement.OnTextChanged += AnnouncementOnOnTextChanged;
|
||||
Announcement.OnKeyBindUp += AnnouncementOnOnTextChanged;
|
||||
}
|
||||
|
||||
|
||||
private void AnnouncementOnOnTextChanged(LineEdit.LineEditEventArgs args)
|
||||
private void AnnouncementOnOnTextChanged(GUIBoundKeyEventArgs args)
|
||||
{
|
||||
AnnounceButton.Disabled = args.Text.TrimStart() == "";
|
||||
AnnounceButton.Disabled = Rope.Collapse(Announcement.TextRope).TrimStart() == "";
|
||||
}
|
||||
|
||||
private void AnnounceMethodOnOnItemSelected(OptionButton.ItemSelectedEventArgs args)
|
||||
|
||||
Reference in New Issue
Block a user